Project

General

Profile

« Previous | Next » 

Revision 4ca83ea1

Added by Marc Dequènes almost 14 years ago

  • ID 4ca83ea199209d27166739b036752b72dd27a6b7

[evol] preliminary artworks context menu (reverted license to GPL2+, to be compatible with Proto.Menu and possibly other plugins)

View differences:

app/views/admin/artworks/index.rhtml
<% use_proto_menu -%>
<h2><%= _("List of Artworks") %></h2>
<p>
<table>
<% form_tag({ :action => 'artworks_selection' }, { :id => 'artworks_selection_form' }) do %>
<table id="artworks_selection_zone">
<tr>
<th>#</th>
<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>
......
<% @artworks = resource_model.paginate(:all, :include => [:artwork_set, :artwork_group], :order => params[:sort], :page => params[:page]) %>
<% @artworks.each do |artwork| %>
<tr>
<td><%= check_box_tag 'artworks_selection_items[]', artwork.id %></td>
<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>
......
</tr>
<% end %>
</table>
<%= hidden_field_tag 'artworks_selection_action' %>
<%
action_list = [[_('Affect to Tag'), 'to_tag'], [_('Delete'), 'delete']]
gen_action_proto_menu('artworks_selection', action_list)
%>
<% end %>
<%= will_paginate @artworks %>
<%= display_new_action %>
</p>

Also available in: Unified diff