Sha256: 09e907b39cff8984525cde49a046d31f78b63cd12f8e6960cd3fb619c9aa292f

Contents?: true

Size: 1.01 KB

Versions: 9

Compression:

Stored size: 1.01 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?
      = 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')
    - if !Itsf::Backend.features?(:pundit) || policy(resource).edit?
      = 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')
    - if !Itsf::Backend.features?(:pundit) || policy(resource).destroy?
      = 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')

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
itsf_backend-1.1.7 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.6 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.5 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.4 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.3 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.2 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.0 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.0.1 app/views/itsf/backend/resource/base/_table_actions.html.haml