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>
|
|
|
|
<th style="width:15%;"></th>
|
|
|
|
<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') %>">
|
2008-06-07 19:08:59 +04:00
|
|
|
<td><%= link_to h(enumeration), :action => 'edit', :id => 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>
|
2009-03-01 15:03:48 +03:00
|
|
|
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
|
2009-09-12 13:25:39 +04:00
|
|
|
<td class="buttons">
|
2011-09-17 04:15:22 +04:00
|
|
|
<%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
|
2009-09-12 13:25:39 +04:00
|
|
|
:method => :post,
|
|
|
|
:confirm => l(:text_are_you_sure),
|
|
|
|
:class => 'icon icon-del' %>
|
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
|
|
|
|
2009-05-31 03:30:36 +04:00
|
|
|
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :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)) -%>
|