Project

General

Profile

« Previous | Next » 

Revision fc30c2a2

Added by Marc Dequènes over 12 years ago

  • ID fc30c2a2a992f7470aeee259d71120ed3d55331e

[fix] added 'selected' parameter to artwork size generic selector and pass currently selected size in artwork edit page (closes #1)

View differences:

app/views/admin/artwork_sizes/_selector.rhtml
1 1
<%
2
  standard_sizes = options_from_collection_for_select ArtworkSize.find(:all, :order => "height ASC, width ASC", :conditions => {:standard => true}), :id, :human_size
3
  custom_sizes = options_from_collection_for_select ArtworkSize.find(:all, :order => "height ASC, width ASC", :conditions => {:standard => false}), :id, :human_size
2
  standard_sizes = options_from_collection_for_select ArtworkSize.find(:all, :order => "height ASC, width ASC", :conditions => {:standard => true}), :id, :human_size, selected
3
  custom_sizes = options_from_collection_for_select ArtworkSize.find(:all, :order => "height ASC, width ASC", :conditions => {:standard => false}), :id, :human_size, selected
4 4

  
5 5
  sizes_choice = title_option(_("== Standard Sizes ==")) + standard_sizes + title_option(_("== Custom Sizes ==")) + custom_sizes
6 6
%>

Also available in: Unified diff