Module: Elabs::LinksAdminHelper
- Defined in:
- app/helpers/elabs/links_admin_helper.rb
Instance Method Summary collapse
- #admin_action_links(singular_model, entity) ⇒ Object
- #admin_destroy_link(singular_model, entity) ⇒ Object
- #admin_edit_link(singular_model, entity) ⇒ Object
- #admin_lock_link(singular_model, entity) ⇒ Object
- #admin_show_link(singular_model, entity) ⇒ Object
-
#admin_show_online_link(singular_model, entity) ⇒ Object
deprecated
Deprecated.
This will be deprecated in 4.0
Instance Method Details
#admin_action_links(singular_model, entity) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/helpers/elabs/links_admin_helper.rb', line 3 def admin_action_links(singular_model, entity) out = [] out.push(show_online_link(entity)) out.push(admin_lock_link(singular_model, entity)) out.push(admin_destroy_link(singular_model, entity)) raw out.join('') end |
#admin_destroy_link(singular_model, entity) ⇒ Object
30 31 32 |
# File 'app/helpers/elabs/links_admin_helper.rb', line 30 def admin_destroy_link(singular_model, entity) namespace_destroy_link('admin', singular_model, entity) end |
#admin_edit_link(singular_model, entity) ⇒ Object
34 35 36 |
# File 'app/helpers/elabs/links_admin_helper.rb', line 34 def admin_edit_link(singular_model, entity) namespace_edit_link('admin', singular_model, entity) end |
#admin_lock_link(singular_model, entity) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/helpers/elabs/links_admin_helper.rb', line 21 def admin_lock_link(singular_model, entity) link_to send("admin_#{singular_model}_toggle_lock_path", entity), title: (entity.locked? ? _('Unlock') : _('Lock')), class: 'btn btn--small btn--lock', method: :put do icon(entity.locked? ? 'unlock' : 'lock', ['fw']) end end |
#admin_show_link(singular_model, entity) ⇒ Object
17 18 19 |
# File 'app/helpers/elabs/links_admin_helper.rb', line 17 def admin_show_link(singular_model, entity) namespace_show_link('admin', singular_model, entity) end |
#admin_show_online_link(singular_model, entity) ⇒ Object
Deprecated.
This will be deprecated in 4.0
13 14 15 |
# File 'app/helpers/elabs/links_admin_helper.rb', line 13 def admin_show_online_link(singular_model, entity) admin_show_link(singular_model, entity) end |