Sha256: b7036d44d45016bde8c6bc0335c2c943bb5d6341ff387a1bd410ff85eb309271

Contents?: true

Size: 1.83 KB

Versions: 7

Compression:

Stored size: 1.83 KB

Contents

.cm-navbar
  .cm-navbar__lhs
    - if cm_admin.method_defined?(:"#{@model.name.downcase}_index_path") && (@model.current_action.name == 'show' || @model.current_action.layout_type.present?)
      .bread-crumb-area
        .breadcrumb-text
          = link_to @model.name + ' /', cm_admin.send(:"#{@model.name.downcase}_index_path")
    .nav-title-area
      p.title-text = action_title
      p.title-sub-text = action_description
  .cm-navbar__rhs
    - if @model.current_action.name == 'index'
      .export-container
        .dropdown
          button.secondary-btn data-bs-toggle='dropdown'
            span
              i.fa.fa-arrow-down
            span
              | Export
            span
              i.fa.fa-angle-down
          ul.dropdown-menu.export-popup
            li
              .popup-option.pointer data-bs-toggle='modal' data-bs-target='#exportmodal'
                span Export
      - new_action = @model.available_actions.select{|act| act if act.action_type.eql?(:default) && act.name.eql?('new')}
      - if new_action.any? && policy([:cm_admin, @model.name.classify.constantize]).new?
        = link_to 'Add', "#{page_url('new')}", class: 'primary-btn ml-2'
      - @model.available_actions.select{|act| act if act.route_type == 'collection'}.each do |custom_action|
        = custom_action_items(custom_action, 'index')
    - elsif @model.current_action.name == 'show'
      - @model.available_actions.select{|act| act if act.route_type == 'member'}.each do |custom_action|
        = custom_action_items(custom_action, 'show')

      - edit_action = @model.available_actions.select{|act| act if act.action_type.eql?(:default) && act.name.eql?('edit')}
      - if edit_action.any? && policy([:cm_admin, @model.name.classify.constantize]).edit?
        = link_to "Edit #{@model.name}", "#{page_url('edit', @ar_object)}", class: 'primary-btn ml-2'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cm-admin-0.6.9 app/views/cm_admin/main/_top_navbar.html.slim
cm-admin-0.6.8 app/views/cm_admin/main/_top_navbar.html.slim
cm-admin-0.6.7 app/views/cm_admin/main/_top_navbar.html.slim
cm-admin-0.6.6 app/views/cm_admin/main/_top_navbar.html.slim
cm-admin-0.6.5 app/views/cm_admin/main/_top_navbar.html.slim
cm-admin-0.6.4 app/views/cm_admin/main/_top_navbar.html.slim
cm-admin-0.6.3 app/views/cm_admin/main/_top_navbar.html.slim