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.

index.html.erb 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <h2><%=l(:label_enumerations)%></h2>
  2. <% Enumeration.get_subclasses.each do |klass| %>
  3. <h3><%= l(klass::OptionName) %></h3>
  4. <% enumerations = klass.shared %>
  5. <p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name), :class => 'icon icon-add' %></p>
  6. <% if enumerations.any? %>
  7. <table class="list enumerations"><thead>
  8. <tr>
  9. <th><%= l(:field_name) %></th>
  10. <th><%= l(:field_is_default) %></th>
  11. <th><%= l(:field_active) %></th>
  12. <th></th>
  13. </tr></thead>
  14. <% enumerations.each do |enumeration| %>
  15. <tr>
  16. <td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
  17. <td class="tick"><%= checked_image enumeration.is_default? %></td>
  18. <td class="tick"><%= checked_image enumeration.active? %></td>
  19. <td class="buttons">
  20. <%= reorder_handle(enumeration, :url => enumeration_path(enumeration), :param => 'enumeration') %>
  21. <%= delete_link enumeration_path(enumeration) %>
  22. </td>
  23. </tr>
  24. <% end %>
  25. </table>
  26. <% else %>
  27. <p class="nodata"><%= l(:label_no_data) %></p>
  28. <% end %>
  29. <% end %>
  30. <% html_title(l(:label_enumerations)) -%>
  31. <%= javascript_tag do %>
  32. $(function() { $("table.enumerations tbody").positionedItems(); });
  33. <% end %>