Sha256: 2b9a3fe82228d8b8efb0edb9284df70c1cfc3a0dde7ff62e6e09013b747b8531

Contents?: true

Size: 1.18 KB

Versions: 18

Compression:

Stored size: 1.18 KB

Contents

= table.column(:actions) do |resource|
  - id_base = "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-#{resource.to_param}"
  .btn-group
    - if !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 !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 !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-4.2.3 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-4.2.2 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-4.2.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-4.2.0 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-4.0.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-4.0.0 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.1.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.1.0 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.7 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.6 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.5 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.4 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.3 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.2 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-3.0.0 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-2.2.1 app/views/itsf/backend/resource/base/_table_actions.html.haml
itsf_backend-2.2.0 app/views/itsf/backend/resource/base/_table_actions.html.haml