Project

General

Profile

« Previous | Next » 

Revision bf16d414

Added by Marc Dequènes over 13 years ago

  • ID bf16d41408b3309a93dcd0dd0723a4d478023818

[evol] artworks context menu: finished mechanism + checked for empty selection + implemented associate_with_tag action

View differences:

app/views/admin/artworks/index.rhtml
<% @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><%= check_box_tag 'artworks_selection_ids[]', artwork.id, false, :id => "artworks_selection_id_#{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>
......
</table>
<%= hidden_field_tag 'artworks_selection_action' %>
<%
action_list = [[_('Affect to Tag'), 'to_tag'], [_('Delete'), 'delete']]
gen_action_proto_menu('artworks_selection', action_list)
gen_action_proto_menu('artworks_selection', @selection_action_list)
%>
<% end %>
<%= will_paginate @artworks %>

Also available in: Unified diff