Sha256: 1c59faa4851905298fe73342a2b90152ede433054cd3c1608da9006bc15bcdb1

Contents?: true

Size: 1.43 KB

Versions: 41

Compression:

Stored size: 1.43 KB

Contents

- if show_action
  - url = (polymorphic_path([*controller_namespace, resource]) rescue nil) || (polymorphic_path(resource) rescue nil)
  - if url.present?
    %a{href: url, title: 'Show'}
      %span.glyphicon.glyphicon-eye-open

- if edit_action
  - url = (edit_polymorphic_path([*controller_namespace, resource]) rescue nil) || (edit_polymorphic_path(resource) rescue nil)
  - if url.present?
    %a{href: url, title: 'Edit'}
      %span.glyphicon.glyphicon-edit

- if destroy_action
  - url = (polymorphic_path([*controller_namespace, resource]) rescue nil) || (polymorphic_path(resource) rescue nil)
  - if url.present?
    - if resource.respond_to?(:archived?) && !resource.archived?
      %a{href: url, title: 'Archive', data: {method: :delete, confirm: "Are you sure you want to archive this item?"}}
        %span.glyphicon.glyphicon-trash
    - elsif resource.respond_to?(:archived?) == false
      %a{href: url, title: 'Delete', data: {method: :delete, confirm: "Are you sure you want to delete this item?"}}
        %span.glyphicon.glyphicon-trash

- if unarchive_action && resource.respond_to?(:archived?) && resource.archived?
  - url = (polymorphic_path([*controller_namespace, resource], action: :unarchive) rescue nil) || (polymorphic_path(resource, action: :unarchive) rescue nil)
  - if url.present?
    %a{href: url, title: 'Unarchive', data: {confirm: 'Are you sure you want to unarchive this item?'}}
      %span.glyphicon.glyphicon-retweet

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
effective_datatables-2.4.1 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.4.0 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.8 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.7 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.6 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.5 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.4 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.3 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.2 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.1 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.3.0 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.11 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.10 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.9 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.8 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.7 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.6 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.5 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.4 app/views/effective/datatables/_actions_column.html.haml
effective_datatables-2.2.3 app/views/effective/datatables/_actions_column.html.haml