Sha256: 912ed4fa003176613d55d49ff5703237ae7cf089e65e83cb250c3d17cb5c05b5

Contents?: true

Size: 623 Bytes

Versions: 5

Compression:

Stored size: 623 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 nav_item.nav_item_name.to_s.titleize, "/cm_admin/#{@model.name.underscore.pluralize}/#{@ar_object.id}/#{nav_item.custom_action}", class: "nav-link #{ nav_item_action_name == action_name ? 'active' : ''}"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cm-admin-0.7.7 app/views/cm_admin/main/_tabs.html.slim
cm-admin-0.7.6 app/views/cm_admin/main/_tabs.html.slim
cm-admin-0.7.5 app/views/cm_admin/main/_tabs.html.slim
cm-admin-0.7.4 app/views/cm_admin/main/_tabs.html.slim
cm-admin-0.7.3 app/views/cm_admin/main/_tabs.html.slim