3 <%= form_tag({:action=>'create'}, :multipart=>true) do %>
4 <fieldset id='document'>
5 <legend>Add Document</legend>
7 <%= file_field :document, :content %><br/>
8 <%= text_field_tag 'document[comment]', nil, placeholder: 'Comment' %><br/>
9 <%= select_tag 'id_portfolio', options_from_collection_for_select(@portfolios, 'id', 'name'), prompt: '-- Link to Portfolio --' %><br/>
11 <%= submit_tag 'Store Document' %>
18 <th><%= paginate @documents %></th>
21 <th>Comment / Relations</th>
25 <% @documents.each do |d| %>
27 <td><%= link_to 'delete', controller: 'documents', action: 'delete_document', id: d.id if d.time_upload > 5.days.ago %></td>
28 <td><%= smr_humanize d.time_upload %></td>
29 <td><%= link_to d.filename, :id=>d.id, :action=>'download' %><em><%= number_to_human_size(d.size, :precision=>2) %></em></td>
31 <em><%= d.relations_text %></em>