32 lines
938 B
Plaintext
32 lines
938 B
Plaintext
|
<%= csrf_meta_tag %>
|
||
|
<script type="text/javascript" src="/assets/jquery_ujs.js"></script>
|
||
|
<table width="100%" border="1">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th width="100px" >Date</th>
|
||
|
<th>Title</th>
|
||
|
<th width="200px">Action</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<% if !@files.blank? %>
|
||
|
<% @files.each_with_index do |file,idx| %>
|
||
|
<tr>
|
||
|
<td><%= file.created_at.strftime("%y/%m/%d") %></td>
|
||
|
<td><%= file.title %></td>
|
||
|
<td>
|
||
|
<a href="<%= file.file.url %>" target="_blank">Download</a>
|
||
|
<a href="<%= edit_upload_cuser_file_path(file) %>">Edit</a>
|
||
|
<a style="color: red;" href="<%= delete_upload_cuser_file_path(file) %>" data-method="delete" data-confirm="Are you sure?">Delete</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
<% else %>
|
||
|
<tr>
|
||
|
<td colspan="3" style="text-align: center;">No files uploaded.</td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<br />
|
||
|
<a href="<%= upload_cuser_file_path %>" class="btn btn-primary">Upload File</a>
|