Project

General

Profile

Download (1.3 KB) Statistics
| Branch: | Tag: | Revision:
b689e231 Marc Dequènes (Duck)
<h2><%= _("List of Artworks") %></h2>

<p>
<table>
<tr>
<th><%= sortable_header :title, :label => _("Title"), :default => true %></th>
<th><%= sortable_header "artwork_sets.name".to_sym, :label => _("Set") %></th>
<th><%= sortable_header "artwork_groups.name".to_sym, :label => _("Group") %></th>
<th><%= _("Preview") %></th>
<th><%= _("Steps") %></th>
<th><%= _("Actions") %></th>
</tr>
ca0e6553 Marc Dequènes (Duck)
<%
# work around 'sortable-list' plugin not enforcing default sort
params[:sort] ||= :title
%>
b689e231 Marc Dequènes (Duck)
<% @artworks = resource_model.paginate(:all, :include => [:artwork_set, :artwork_group], :order => params[:sort], :page => params[:page]) %>
<% @artworks.each do |artwork| %>
<tr>
<td><%= link_to_resource artwork, artwork.title %></td>
<td><%= artwork.artwork_set.name if artwork.artwork_set %></td>
<td><%= artwork.artwork_group.name if artwork.artwork_group %></td>
b247fd58 Marc Dequènes (Duck)
<td class="admin_artwork_frame"><%= display_thumbnail(artwork.image, :thumb_small) %></td>
b689e231 Marc Dequènes (Duck)
<td class="resource_children"><%= link_to_children_index artwork, ArtworkStepImage, _("View Steps") %></td>
<td class="actions"><%= display_standard_item_actions(artwork) %></td>
</tr>
<% end %>
</table>
<%= will_paginate @artworks %>
<%= display_new_action %>
</p>