2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_enumerations)%></h2>
|
2007-10-04 21:04:50 +04:00
|
|
|
|
2008-06-17 23:10:54 +04:00
|
|
|
<% Enumeration::OPTIONS.each do |option, params| %>
|
|
|
|
<h3><%= l(params[:label]) %></h3>
|
2007-10-04 21:04:50 +04:00
|
|
|
|
2009-02-15 16:33:09 +03:00
|
|
|
<% enumerations = Enumeration.values(option) %>
|
2007-10-04 21:04:50 +04:00
|
|
|
<% if enumerations.any? %>
|
|
|
|
<table class="list">
|
|
|
|
<% 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>
|
2007-10-05 21:44:15 +04:00
|
|
|
<td style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td>
|
2007-10-04 21:04:50 +04:00
|
|
|
<td style="width:15%;">
|
|
|
|
<%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => enumeration, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
|
|
|
|
<%= link_to image_tag('1uparrow.png', :alt => l(:label_sort_higher)), {:action => 'move', :id => enumeration, :position => 'higher'}, :method => :post, :title => l(:label_sort_higher) %> -
|
|
|
|
<%= link_to image_tag('1downarrow.png', :alt => l(:label_sort_lower)), {:action => 'move', :id => enumeration, :position => 'lower'}, :method => :post, :title => l(:label_sort_lower) %>
|
|
|
|
<%= link_to image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), {:action => 'move', :id => enumeration, :position => 'lowest'}, :method => :post, :title => l(:label_sort_lowest) %>
|
|
|
|
</td>
|
2008-06-17 23:10:54 +04:00
|
|
|
<td align="center" style="width:10%;">
|
|
|
|
<%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration }, :method => :post, :confirm => l(:text_are_you_sure), :class => "icon icon-del" %>
|
|
|
|
</td>
|
2007-10-04 21:04:50 +04:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<% reset_cycle %>
|
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-10-04 21:04:50 +04:00
|
|
|
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option } %></p>
|
|
|
|
<% end %>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_enumerations)) -%>
|