Sha256: d1884531049addad3b411a08c1dd74107fb656285a7f6f13b0e6886348e55748

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

<h3>Attachments</h3>
<%#= link_to fa_icon("plus-square", text: "Add Attachment", class: "fa-fw"), "javascript: $('#attachment-form').toggle();" %>
<div id="attachment-form" class="hide">
  <div class="row">
    <div class="small-12 columns">
      <div class="panel">
        <%= simple_form_for ProjectAttachment.new(finish: finish), url: [organization, project, :attachments], multipart: true do |f| %>
          <%= f.hidden_field :finish_id %>
          <%= f.input :file, as: :file, label: "Add an attachment", required: false %>

          <%= f.submit "Add Attachment", class: "tiny button radius" %>
        <% end %>
      </div>
    </div>
  </div>
</div>

<table>
  <thead>
  <tr>
    <th>Preview</th>
    <th>File</th>
    <% if project_member_access? %>
      <th>&nbsp;</th>
    <% end %>
  </tr>
  </thead>
  <tbody>
  <% attachments.each do |attachment| -%>
    <tr>
      <td>
        <%= attachment_preview attachment %>
      </td>
      <td><%= link_to attachment.file.display_name, attachment.file.url %></td>
      <% if project_member_access? %>
        <td>
          <%= link_to "Delete", [organization, project, :attachment, id: attachment],
                      method: :delete, data: { confirm: "Are you sure?" }, class: "tiny button radius" %>
        </td>
      <% end %>
    </tr>
  <% end -%>
  </tbody>
</table>


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
self_systeem-0.1.0 test/dummy_app/app/views/shared/finishes/_attachments.html.erb