Sha256: e4c52f47ded88183fb7d5fdcebbdfae6670133458091ff4a1ba8e023fa3f05d2
Contents?: true
Size: 1.22 KB
Versions: 18
Compression:
Stored size: 1.22 KB
Contents
= table.column(:actions) do |resource| - id_base = "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-#{resource.to_param}" .btn-group - if !Itsf::Backend.features?(:pundit) || policy(resource).show? - begin = link_to(resource_path(resource), id: "#{id_base}-show", class: 'btn btn-xs btn-responsive btn-default') do %span.glyphicon.glyphicon-eye-open %span.btn-text= t('.show') - rescue ActionController::UrlGenerationError - if !Itsf::Backend.features?(:pundit) || policy(resource).edit? - begin = link_to(edit_resource_path(resource), id: "#{id_base}-edit", class: 'btn btn-xs btn-responsive btn-default') do %span.glyphicon.glyphicon-pencil %span.btn-text= t('.edit') - rescue ActionController::UrlGenerationError - if !Itsf::Backend.features?(:pundit) || policy(resource).destroy? - begin = link_to(resource_path(resource), id: "#{id_base}-destroy", class: 'btn btn-xs btn-responsive btn-danger', method: :delete, data: { confirm: I18n.t('.confirmations.delete') }) do %span.glyphicon.glyphicon-fire %span.btn-text= t('.destroy') - rescue ActionController::UrlGenerationError
Version data entries
18 entries across 18 versions & 1 rubygems