Sha256: c333d009a991f18976502dddb8d54cfc5704d6c714f7953d67bdd3601b79609b

Contents?: true

Size: 1.22 KB

Versions: 65

Compression:

Stored size: 1.22 KB

Contents

ul.tabs
  - @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'
          - if via_xhr
            = 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), class: "nav-link #{ nav_item_action_name == action_name ? 'active' : ''}", target: '_blank'
          - else
            = 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), class: "nav-link #{ nav_item_action_name == action_name ? 'active' : ''}"
  // current_action_name is defined when action trail is added to that model
  - if policy([:cm_admin, @model.name.classify.constantize]).send(:history?)
    li.nav-item
      = link_to 'History', cm_admin.send("#{@ar_object.model_name.singular}_history_path", @ar_object), class: "nav-link #{ action_name == 'history' ? 'active' : ''}"

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
cm-admin-2.4.0 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.3.4 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.3.3 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.3.2 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.3.1 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.3.0 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.2.1 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.2.0 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.1.5 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.1.4 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.1.3 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.1.2 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.1.1 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.1.0 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.0.2 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.0.1 app/views/cm_admin/main/_tabs.html.slim
cm-admin-2.0.0 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.5.56 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.5.55 app/views/cm_admin/main/_tabs.html.slim
cm-admin-1.5.54 app/views/cm_admin/main/_tabs.html.slim