Project

General

Profile

Download (1.3 KB) Statistics
| Branch: | Tag: | Revision:

root / app / views / admin / artworks / index.rhtml @ 70e65017

1
<h2><%= _("List of Artworks") %></h2>
2

    
3
<p>
4
  <table>
5
    <tr>
6
      <th><%= sortable_header :title, :label => _("Title"), :default => true %></th>
7
      <th><%= sortable_header "artwork_sets.name".to_sym, :label => _("Set") %></th>
8
      <th><%= sortable_header "artwork_groups.name".to_sym, :label => _("Group") %></th>
9
      <th><%= _("Preview") %></th>
10
      <th><%= _("Steps") %></th>
11
      <th><%= _("Actions") %></th>
12
    </tr>
13
    <%
14
      # work around 'sortable-list' plugin not enforcing default sort
15
      params[:sort] ||= :title
16
    %>
17
    <% @artworks = resource_model.paginate(:all, :include => [:artwork_set, :artwork_group], :order => params[:sort], :page => params[:page]) %>
18
    <% @artworks.each do |artwork| %>
19
    <tr>
20
      <td><%= link_to_resource artwork, artwork.title %></td>
21
      <td><%= artwork.artwork_set.name if artwork.artwork_set %></td>
22
      <td><%= artwork.artwork_group.name if artwork.artwork_group %></td>
23
      <td class="admin_artwork_frame"><%= display_thumbnail(artwork.image, :thumb_small) %></td>
24
      <td class="resource_children"><%= link_to_children_index artwork, ArtworkStepImage, _("View Steps") %></td>
25
      <td class="actions"><%= display_standard_item_actions(artwork) %></td>
26
    </tr>
27
    <% end %>
28
  </table>
29
  <%= will_paginate @artworks %>
30
  <%= display_new_action %>
31
</p>
(3-3/5)