##// END OF EJS Templates
Move 'New enumeration' links to above the item tables (#24776)....
Jean-Philippe Lang -
r15804:7f3ce996c2c1
parent child
Show More
@@ -1,37 +1,38
1 1 <h2><%=l(:label_enumerations)%></h2>
2 2
3 3 <% Enumeration.get_subclasses.each do |klass| %>
4 4 <h3><%= l(klass::OptionName) %></h3>
5 5
6 6 <% enumerations = klass.shared %>
7
8 <p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p>
9
7 10 <% if enumerations.any? %>
8 11 <table class="list enumerations"><thead>
9 12 <tr>
10 13 <th><%= l(:field_name) %></th>
11 14 <th><%= l(:field_is_default) %></th>
12 15 <th><%= l(:field_active) %></th>
13 16 <th></th>
14 17 </tr></thead>
15 18 <% enumerations.each do |enumeration| %>
16 19 <tr class="<%= cycle('odd', 'even') %>">
17 20 <td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
18 21 <td class="tick"><%= checked_image enumeration.is_default? %></td>
19 22 <td class="tick"><%= checked_image enumeration.active? %></td>
20 23 <td class="buttons">
21 24 <%= reorder_handle(enumeration, :url => enumeration_path(enumeration), :param => 'enumeration') %>
22 25 <%= delete_link enumeration_path(enumeration) %>
23 26 </td>
24 27 </tr>
25 28 <% end %>
26 29 </table>
27 30 <% reset_cycle %>
28 31 <% end %>
29
30 <p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p>
31 32 <% end %>
32 33
33 34 <% html_title(l(:label_enumerations)) -%>
34 35
35 36 <%= javascript_tag do %>
36 37 $(function() { $("table.enumerations tbody").positionedItems(); });
37 38 <% end %> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now