Sha256: 3cd95093ebbe39058f1a26b489c9eabd87a8ca6637419fe31589b15f830c4d11
Contents?: true
Size: 1.76 KB
Versions: 6
Compression:
Stored size: 1.76 KB
Contents
- edit_action = available_actions(cm_model, 'edit') - destroy_action = available_actions(cm_model, 'destroy') - custom_actions = available_actions(cm_model, 'custom_actions') - current_model = @associated_model || @model - if custom_actions.any? || edit_action.present? || destroy_action.present? td.row-action-cell .row-action-tool button.secondary-btn.tool-btn span i.fa.fa-bars.bolder span i.fa.fa-angle-down .popup-card.table-export-popup.hidden - if edit_action.present? = link_to cm_admin.send("#{current_model.name.underscore}_edit_path", ar_object.id) do .popup-option span i.fa.fa-edit | Edit - if destroy_action.present? = link_to cm_admin.send("#{current_model.name.underscore}_destroy_path", ar_object.id), method: :delete do .popup-option span i.fa.fa-trash | Destroy - custom_actions.each do |custom_action| - if custom_action.display_if.call(ar_object) - case custom_action.display_type - when :button = link_to cm_admin.send("#{cm_model.name.underscore}_index_path") + '/' + custom_action.path.gsub(':id', ar_object.id.to_s), method: custom_action.verb do .popup-option span i class="#{custom_action.icon_name}" = custom_action.name.humanize - when :modal = link_to '', data: { bs_toggle: 'modal', bs_target: "##{custom_action.name.classify}Modal-#{ar_object.id.to_s}" } do .popup-option span i class="#{custom_action.icon_name}" = custom_action.name.humanize
Version data entries
6 entries across 6 versions & 1 rubygems