Redmine/app/views/enumerations/list.rhtml

27 lines
993 B
Plaintext
Raw Normal View History

<h2><%=l(:label_enumerations)%></h2>
<% Enumeration::OPTIONS.each do |option, params| %>
<h3><%= l(params[:label]) %></h3>
<% enumerations = Enumeration.values(option) %>
<% if enumerations.any? %>
<table class="list">
<% enumerations.each do |enumeration| %>
<tr class="<%= cycle('odd', 'even') %>">
<td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
<td style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td>
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
<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>
</tr>
<% end %>
</table>
<% reset_cycle %>
<% end %>
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option } %></p>
<% end %>
<% html_title(l(:label_enumerations)) -%>