2006-07-29 21:54:22 +02:00
|
|
|
<h2><%=l(:label_enumerations)%></h2>
|
2007-10-04 19:04:50 +02:00
|
|
|
|
2009-05-31 01:30:36 +02:00
|
|
|
<% Enumeration.get_subclasses.each do |klass| %>
|
|
|
|
<h3><%= l(klass::OptionName) %></h3>
|
2007-10-04 19:04:50 +02:00
|
|
|
|
2009-11-21 13:00:49 +01:00
|
|
|
<% enumerations = klass.shared %>
|
2007-10-04 19:04:50 +02:00
|
|
|
<% if enumerations.any? %>
|
2010-05-09 13:19:15 +02:00
|
|
|
<table class="list"><thead>
|
2009-10-22 00:34:28 +02: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 13:19:15 +02:00
|
|
|
</tr></thead>
|
2007-10-04 19:04:50 +02:00
|
|
|
<% enumerations.each do |enumeration| %>
|
|
|
|
<tr class="<%= cycle('odd', 'even') %>">
|
2008-06-07 17:08:59 +02:00
|
|
|
<td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
|
2010-03-17 21:46:22 +01: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 13:03:48 +01:00
|
|
|
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
|
2009-09-12 11:25:39 +02:00
|
|
|
<td class="buttons">
|
|
|
|
<%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
|
|
|
|
:method => :post,
|
|
|
|
:confirm => l(:text_are_you_sure),
|
|
|
|
:class => 'icon icon-del' %>
|
2008-06-17 21:10:54 +02:00
|
|
|
</td>
|
2007-10-04 19:04:50 +02:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<% reset_cycle %>
|
|
|
|
<% end %>
|
2007-03-12 18:59:02 +01:00
|
|
|
|
2009-05-31 01:30:36 +02:00
|
|
|
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
|
2007-10-04 19:04:50 +02:00
|
|
|
<% end %>
|
2007-12-07 19:42:40 +01:00
|
|
|
|
2008-01-02 23:41:53 +01:00
|
|
|
<% html_title(l(:label_enumerations)) -%>
|