Sha256: da7e12ac7c0f1ffb4e75e9349c76c2017d155344bce55f34231fd95fd10ec69c

Contents?: true

Size: 997 Bytes

Versions: 6

Compression:

Stored size: 997 Bytes

Contents

= render "dorsale/flash"

.panel.panel-default
  .panel-heading: .panel-title = ::Dorsale::Alexandrie::Attachment.ts

  - url = params[:action] == "edit" ? @attachment : @new_attachment
  = form_for(url, as: :attachment, remote: true) do |f|
    = hidden_field_tag :authenticity_token, form_authenticity_token

    table
      = render "dorsale/alexandrie/attachments/header"

      tbody
        - if policy(::Dorsale::Alexandrie::Attachment).create?
          / Create only on index
          - if params[:action] == "edit"
            = render "dorsale/alexandrie/attachments/new_disabled"
          - else
            = render "dorsale/alexandrie/attachments/new", attachable: @attachable

        - @attachments.each do |attachment|
          - if params[:action] == "edit" && attachment == @attachment
            = render "dorsale/alexandrie/attachments/edit", attachment: attachment
          - else
            = render "dorsale/alexandrie/attachments/attachment", attachment: attachment

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dorsale-3.10.3 app/views/dorsale/alexandrie/attachments/index.html.slim
dorsale-3.10.2 app/views/dorsale/alexandrie/attachments/index.html.slim
dorsale-3.10.1 app/views/dorsale/alexandrie/attachments/index.html.slim
dorsale-3.10.0 app/views/dorsale/alexandrie/attachments/index.html.slim
dorsale-3.9.8 app/views/dorsale/alexandrie/attachments/index.html.slim
dorsale-3.9.7 app/views/dorsale/alexandrie/attachments/index.html.slim