2006-07-29 19:54:22 +00:00
|
|
|
<h2><%=l(:label_enumerations)%></h2>
|
2007-10-04 17:04:50 +00:00
|
|
|
|
2009-05-30 23:30:36 +00:00
|
|
|
<% Enumeration.get_subclasses.each do |klass| %>
|
|
|
|
|
<h3><%= l(klass::OptionName) %></h3>
|
2007-10-04 17:04:50 +00:00
|
|
|
|
2009-11-21 12:00:49 +00:00
|
|
|
<% enumerations = klass.shared %>
|
2007-10-04 17:04:50 +00:00
|
|
|
<% if enumerations.any? %>
|
2016-04-17 07:40:39 +00:00
|
|
|
<table class="list enumerations"><thead>
|
2009-10-21 22:34:28 +00:00
|
|
|
<tr>
|
|
|
|
|
<th><%= l(:field_name) %></th>
|
2013-11-11 21:01:21 +00:00
|
|
|
<th><%= l(:field_is_default) %></th>
|
|
|
|
|
<th><%= l(:field_active) %></th>
|
|
|
|
|
<th></th>
|
2010-05-09 11:19:15 +00:00
|
|
|
</tr></thead>
|
2007-10-04 17:04:50 +00:00
|
|
|
<% enumerations.each do |enumeration| %>
|
|
|
|
|
<tr class="<%= cycle('odd', 'even') %>">
|
2015-02-23 10:11:08 +00:00
|
|
|
<td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
|
2013-11-11 21:01:21 +00:00
|
|
|
<td class="tick"><%= checked_image enumeration.is_default? %></td>
|
|
|
|
|
<td class="tick"><%= checked_image enumeration.active? %></td>
|
2016-04-17 07:40:39 +00:00
|
|
|
<td class="buttons">
|
|
|
|
|
<%= reorder_handle(enumeration, :url => enumeration_path(enumeration), :param => 'enumeration') %>
|
|
|
|
|
<%= delete_link enumeration_path(enumeration) %>
|
|
|
|
|
</td>
|
2007-10-04 17:04:50 +00:00
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
</table>
|
|
|
|
|
<% reset_cycle %>
|
|
|
|
|
<% end %>
|
2007-03-12 17:59:02 +00:00
|
|
|
|
2011-12-11 10:26:12 +00:00
|
|
|
<p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p>
|
2007-10-04 17:04:50 +00:00
|
|
|
<% end %>
|
2007-12-07 18:42:40 +00:00
|
|
|
|
2008-01-02 22:41:53 +00:00
|
|
|
<% html_title(l(:label_enumerations)) -%>
|
2016-04-17 07:40:39 +00:00
|
|
|
|
|
|
|
|
<%= javascript_tag do %>
|
|
|
|
|
$(function() { $("table.enumerations tbody").positionedItems(); });
|
|
|
|
|
<% end %>
|