index.html.erb
36 lines
| 1.2 KiB
| text/plain
|
TextLexer
|
r12 | <h2><%=l(:label_enumerations)%></h2> | |
|
r789 | ||
|
r2677 | <% Enumeration.get_subclasses.each do |klass| %> | |
<h3><%= l(klass::OptionName) %></h3> | |||
|
r789 | ||
|
r2969 | <% enumerations = klass.shared %> | |
|
r789 | <% if enumerations.any? %> | |
|
r14954 | <table class="list enumerations"><thead> | |
|
r2832 | <tr> | |
<th><%= l(:field_name) %></th> | |||
|
r12038 | <th><%= l(:field_is_default) %></th> | |
<th><%= l(:field_active) %></th> | |||
<th></th> | |||
|
r3620 | </tr></thead> | |
|
r789 | <% enumerations.each do |enumeration| %> | |
<tr class="<%= cycle('odd', 'even') %>"> | |||
|
r13661 | <td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td> | |
|
r12038 | <td class="tick"><%= checked_image enumeration.is_default? %></td> | |
<td class="tick"><%= checked_image enumeration.active? %></td> | |||
|
r14954 | <td class="buttons"> | |
<%= reorder_handle(enumeration, :url => enumeration_path(enumeration), :param => 'enumeration') %> | |||
<%= delete_link enumeration_path(enumeration) %> | |||
</td> | |||
|
r789 | </tr> | |
<% end %> | |||
</table> | |||
<% reset_cycle %> | |||
<% end %> | |||
|
r330 | ||
|
r8069 | <p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p> | |
|
r789 | <% end %> | |
|
r951 | ||
|
r1019 | <% html_title(l(:label_enumerations)) -%> | |
|
r14954 | ||
<%= javascript_tag do %> | |||
$(function() { $("table.enumerations tbody").positionedItems(); }); | |||
<% end %> |