You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

list.rhtml 613B

123456789101112131415161718192021
  1. <h2><%=l(:label_enumerations)%></h2>
  2. <% Enumeration::OPTIONS.each do |option, name| %>
  3. <% if @params[:opt]==option %>
  4. <p><%= image_tag 'dir_open' %> <b><%= l(name) %></b></p>
  5. <ul>
  6. <% for value in Enumeration.find(:all, :conditions => ["opt = ?", option]) %>
  7. <li><%= link_to value.name, :action => 'edit', :id => value %></li>
  8. <% end %>
  9. </ul>
  10. <ul>
  11. <li><%= link_to ('&#187; ' + l(:label_new)), :action => 'new', :opt => option %></li>
  12. </ul>
  13. <% else %>
  14. <p><%= image_tag 'dir' %> <%= link_to l(name), :opt => option %></p>
  15. <% end %>
  16. <% end %>