mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-24 03:21:17 +00:00
34 lines
1.1 KiB
Text
34 lines
1.1 KiB
Text
<table class="movie">
|
|
<tr>
|
|
<td>
|
|
<% if movie.picture %>
|
|
<%= image_tag movie.picture.url, :class => "centered" %>
|
|
<% end %>
|
|
</td>
|
|
|
|
<td>
|
|
<h3 class="title"><%= namelink movie %></h3>
|
|
<%= cascade movie, ["content", "format", ["Author", :user], "length_s", ["Views", "view_count"], ["Date", "file.created_at"]] %>
|
|
|
|
<% (params[:action] == "show" ? movie.all_files : [movie.file]).each do |file| %>
|
|
<b>File: </b> <%= link_to File.basename(file.name.to_s), file.url %>
|
|
<ul>
|
|
<li>
|
|
<strong>MD5:</strong> <%= file.md5_s %>
|
|
</li>
|
|
<li>
|
|
<strong>Size:</strong> <%= file.size_s %> MB
|
|
</li>
|
|
</ul>
|
|
<% end %>
|
|
|
|
<% if cuser and movie.can_update? cuser %>
|
|
<div class="controls">
|
|
<%= link_to 'Edit', edit_movie_path(movie), class: 'button tiny' %>
|
|
<%= link_to 'Make a Preview', { action: "preview", id: movie }, class: 'button tiny' %>
|
|
<%= link_to 'Destroy', movie, confirm: 'Are you sure?', method: :delete, class: 'button tiny' %>
|
|
</div>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
</table>
|