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.html.erb 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <h2><%=l(:label_enumerations)%></h2>
  2. <% Enumeration.get_subclasses.each do |klass| %>
  3. <h3><%= l(klass::OptionName) %></h3>
  4. <% enumerations = klass.shared %>
  5. <% if enumerations.any? %>
  6. <table class="list"><thead>
  7. <tr>
  8. <th><%= l(:field_name) %></th>
  9. <th style="width:15%;"><%= l(:field_is_default) %></th>
  10. <th style="width:15%;"><%= l(:field_active) %></th>
  11. <th style="width:15%;"></th>
  12. <th align="center" style="width:10%;"> </th>
  13. </tr></thead>
  14. <% enumerations.each do |enumeration| %>
  15. <tr class="<%= cycle('odd', 'even') %>">
  16. <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
  17. <td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
  18. <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
  19. <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
  20. <td class="buttons">
  21. <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
  22. :method => :post,
  23. :confirm => l(:text_are_you_sure),
  24. :class => 'icon icon-del' %>
  25. </td>
  26. </tr>
  27. <% end %>
  28. </table>
  29. <% reset_cycle %>
  30. <% end %>
  31. <p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
  32. <% end %>
  33. <% html_title(l(:label_enumerations)) -%>