@@ -1,34 +1,34 | |||||
1 | <h2><%=l(:label_enumerations)%></h2> |
|
1 | <h2><%=l(:label_enumerations)%></h2> | |
2 |
|
2 | |||
3 | <% Enumeration.get_subclasses.each do |klass| %> |
|
3 | <% Enumeration.get_subclasses.each do |klass| %> | |
4 | <h3><%= l(klass::OptionName) %></h3> |
|
4 | <h3><%= l(klass::OptionName) %></h3> | |
5 |
|
5 | |||
6 | <% enumerations = klass.shared %> |
|
6 | <% enumerations = klass.shared %> | |
7 | <% if enumerations.any? %> |
|
7 | <% if enumerations.any? %> | |
8 | <table class="list"><thead> |
|
8 | <table class="list"><thead> | |
9 | <tr> |
|
9 | <tr> | |
10 | <th><%= l(:field_name) %></th> |
|
10 | <th><%= l(:field_name) %></th> | |
11 | <th style="width:15%;"><%= l(:field_is_default) %></th> |
|
11 | <th style="width:15%;"><%= l(:field_is_default) %></th> | |
12 | <th style="width:15%;"><%= l(:field_active) %></th> |
|
12 | <th style="width:15%;"><%= l(:field_active) %></th> | |
13 | <th style="width:15%;"></th> |
|
13 | <th style="width:15%;"><%=l(:button_sort)%></th> | |
14 | <th align="center" style="width:10%;"> </th> |
|
14 | <th align="center" style="width:10%;"> </th> | |
15 | </tr></thead> |
|
15 | </tr></thead> | |
16 | <% enumerations.each do |enumeration| %> |
|
16 | <% enumerations.each do |enumeration| %> | |
17 | <tr class="<%= cycle('odd', 'even') %>"> |
|
17 | <tr class="<%= cycle('odd', 'even') %>"> | |
18 | <td><%= link_to h(enumeration), edit_enumeration_path(enumeration) %></td> |
|
18 | <td><%= link_to h(enumeration), edit_enumeration_path(enumeration) %></td> | |
19 | <td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td> |
|
19 | <td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td> | |
20 | <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td> |
|
20 | <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td> | |
21 | <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td> |
|
21 | <td align="center" style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td> | |
22 | <td class="buttons"> |
|
22 | <td class="buttons"> | |
23 | <%= delete_link enumeration_path(enumeration) %> |
|
23 | <%= delete_link enumeration_path(enumeration) %> | |
24 | </td> |
|
24 | </td> | |
25 | </tr> |
|
25 | </tr> | |
26 | <% end %> |
|
26 | <% end %> | |
27 | </table> |
|
27 | </table> | |
28 | <% reset_cycle %> |
|
28 | <% reset_cycle %> | |
29 | <% end %> |
|
29 | <% end %> | |
30 |
|
30 | |||
31 | <p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p> |
|
31 | <p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p> | |
32 | <% end %> |
|
32 | <% end %> | |
33 |
|
33 | |||
34 | <% html_title(l(:label_enumerations)) -%> |
|
34 | <% html_title(l(:label_enumerations)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now