Sha256: a9cf13a4ab09b4be8789fe45db5e2be3a09aacfea20505664d4c8f4cb1079b5a

Contents?: true

Size: 999 Bytes

Versions: 20

Compression:

Stored size: 999 Bytes

Contents

- resource = (@_effective_resource || Effective::Resource.new(controller_path))
- @resource = instance_variable_get('@' + resource.name) if resource.name

- if @resource
  .row
    .col-sm-6
      %h1= @page_title
    .col-sm-6
      %p.text-right
        - resource.member_post_actions.each do |action|
          - if EffectiveResources.authorized?(controller, action.to_sym, @resource)
            - if resource.action_post_path(action, check: true).present?
              = link_to action.titleize, send(resource.action_post_path(action), @resource), class: 'btn btn-primary',
                data: { confirm: "Really #{action} #{@resource}?", method: :post }

        - if EffectiveResources.authorized?(controller, :destroy, @resource)
          - if resource.destroy_path(check: true).present?
            = link_to 'Delete', send(resource.destroy_path, @resource), class: 'btn btn-danger',
              data: { confirm: "Really delete #{@resource}?", method: :delete }

  = render @resource

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
effective_resources-0.6.9 app/views/application/show.html.haml
effective_resources-0.6.8 app/views/application/show.html.haml
effective_resources-0.6.7 app/views/application/show.html.haml
effective_resources-0.6.6 app/views/application/show.html.haml
effective_resources-0.6.5 app/views/application/show.html.haml
effective_resources-0.6.4 app/views/application/show.html.haml
effective_resources-0.6.3 app/views/application/show.html.haml
effective_resources-0.6.2 app/views/application/show.html.haml
effective_resources-0.6.1 app/views/application/show.html.haml
effective_resources-0.6.0 app/views/application/show.html.haml
effective_resources-0.5.1 app/views/application/show.html.haml
effective_resources-0.5.0 app/views/application/show.html.haml
effective_resources-0.4.10 app/views/application/show.html.haml
effective_resources-0.4.9 app/views/application/show.html.haml
effective_resources-0.4.8 app/views/application/show.html.haml
effective_resources-0.4.7 app/views/application/show.html.haml
effective_resources-0.4.6 app/views/application/show.html.haml
effective_resources-0.4.5 app/views/application/show.html.haml
effective_resources-0.4.4 app/views/application/show.html.haml
effective_resources-0.4.3 app/views/application/show.html.haml