.cm-navbar .cm-navbar__lhs - if cm_admin.method_defined?(:"#{@model.name.underscore}_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.underscore}_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' - if has_valid_policy(@model.name, :exportable) .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 - if @model.importer = link_to 'Import', cm_admin.send(:"#{@model.name.underscore}_import_path"), class: 'primary-btn ml-2' - 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', cm_admin.send(:"#{@model.name.underscore}_new_path"), 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}", cm_admin.send(:"#{@model.name.underscore}_edit_path", @ar_object), class: 'primary-btn ml-2'