Sha256: 1652d2943f43c4f9f41edfe5b637cf2014827c064aae782b7524aff1ad101cb5

Contents?: true

Size: 942 Bytes

Versions: 15

Compression:

Stored size: 942 Bytes

Contents

ul.nav.nav-pills
  - @model.available_tabs.each do |nav_item|
    - if nav_item.display_if.call(@ar_object)
      - if nav_item.custom_action.empty? || (nav_item.custom_action.present? && policy([:cm_admin, @model.name.classify.constantize]).send(:"#{nav_item.custom_action}?"))
        li.nav-item
          - nav_item_action_name = nav_item.custom_action.present? ? nav_item.custom_action : 'show'
          = link_to tab_display_name(nav_item.nav_item_name), cm_admin.send("#{@ar_object.model_name.singular}_#{nav_item_action_name}_path", @ar_object.id), class: "nav-link #{ nav_item_action_name == action_name ? 'active' : ''}"
  // current_action_name is defined when action trail is added to that model
  - if defined?(@ar_object.current_action_name)
    li.nav-item
      = link_to 'History', cm_admin.send("#{@ar_object.model_name.singular}_history_path", @ar_object.id), class: "nav-link #{ action_name == 'history' ? 'active' : ''}"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cm-admin-1.1.8 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.7 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.6 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.5 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.4 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.3 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.2 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.1 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.1.0 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.0.9 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.0.8 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.0.7 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.0.6 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.0.5 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.0.3 app/views/cm_admin/main/_tabs.html.slim