show attachments to user

This commit is contained in:
Stella 2014-04-19 16:40:40 +03:00
parent bacae17b87
commit 7022e5da1d
2 changed files with 27 additions and 12 deletions

View file

@ -13,7 +13,6 @@
= form_for EventAttachment.new, :url => conference_proposal_event_attachment_index_path(@conference.short_title, @event), :html => { :multipart => true, :id => "fileupload" } do |f|
%table.table.table-striped
%thead
%th
%th
%b Filename
%th
@ -24,6 +23,23 @@
%b Public
%th
%tbody.files
- @event.event_attachments.each do |a|
%tr
%td
= link_to a.attachment_file_name, conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id)
%td
= a.title
%td
= number_to_human_size a.attachment_file_size
%td
- if a.public?
Public
- else
Not Public
%td
= link_to "Delete", conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id),
:method => :delete, :confirm => "Are you sure you want to delete this attachment? It's permanant!"
.row-fluid.fileupload-buttonbar
.btn.btn-success.fileinput-button
%span.glyphicon.glyphicon-icon-plus.icon-white