2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_enumerations)%></h2>
|
2007-10-04 21:04:50 +04:00
|
|
|
|
2009-05-31 03:30:36 +04:00
|
|
|
<% Enumeration.get_subclasses.each do |klass| %>
|
|
|
|
<h3><%= l(klass::OptionName) %></h3>
|
2007-10-04 21:04:50 +04:00
|
|
|
|
2009-11-21 15:00:49 +03:00
|
|
|
<% enumerations = klass.shared %>
|
2007-10-04 21:04:50 +04:00
|
|
|
<% if enumerations.any? %>
|
2010-05-09 15:19:15 +04:00
|
|
|
<table class="list"><thead>
|
2009-10-22 02:34:28 +04:00
|
|
|
<tr>
|
|
|
|
<th><%= l(:field_name) %></th>
|
|
|
|
<th style="width:15%;"><%= l(:field_is_default) %></th>
|
|
|
|
<th style="width:15%;"><%= l(:field_active) %></th>
|
2013-07-28 15:53:28 +04:00
|
|
|
<th style="width:15%;"><%=l(:button_sort)%></th>
|
2009-10-22 02:34:28 +04:00
|
|
|
<th align="center" style="width:10%;"> </th>
|
2010-05-09 15:19:15 +04:00
|
|
|
</tr></thead>
|
2007-10-04 21:04:50 +04:00
|
|
|
<% enumerations.each do |enumeration| %>
|
|
|
|
<tr class="<%= cycle('odd', 'even') %>">
|
2011-12-11 14:26:12 +04:00
|
|
|
<td><%= link_to h(enumeration), edit_enumeration_path(enumeration) %></td>
|
2010-03-17 23:46:22 +03:00
|
|
|
<td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
|
|
|
|
<td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
|
2013-07-28 15:53:28 +04:00
|
|
|
<td align="center" style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td>
|
2009-09-12 13:25:39 +04:00
|
|
|
<td class="buttons">
|
2012-07-07 18:36:49 +04:00
|
|
|
<%= delete_link enumeration_path(enumeration) %>
|
2008-06-17 23:10:54 +04:00
|
|
|
</td>
|
2007-10-04 21:04:50 +04:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<% reset_cycle %>
|
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2011-12-11 14:26:12 +04:00
|
|
|
<p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p>
|
2007-10-04 21:04:50 +04:00
|
|
|
<% end %>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_enumerations)) -%>
|