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

Version Path
itsf_backend-2.1.0 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-2.0.2 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-2.0.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.2.8 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.2.7 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.2.6 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.2.5 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.2.4 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.2.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.2.0 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.15 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.14 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.13 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.12 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.11 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.10 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.9 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-1.1.8 app/views/itsf/backend/resource/base/_table_actions.html.haml