Redmine/redmine/app/views/enumerations/list.rhtml

21 lines
613 B
Plaintext

<h2><%=l(:label_enumerations)%></h2>
<% Enumeration::OPTIONS.each do |option, name| %>
<% if @params[:opt]==option %>
<p><%= image_tag 'dir_open' %> <b><%= l(name) %></b></p>
<ul>
<% for value in Enumeration.find(:all, :conditions => ["opt = ?", option]) %>
<li><%= link_to value.name, :action => 'edit', :id => value %></li>
<% end %>
</ul>
<ul>
<li><%= link_to ('&#187; ' + l(:label_new)), :action => 'new', :opt => option %></li>
</ul>
<% else %>
<p><%= image_tag 'dir' %> <%= link_to l(name), :opt => option %></p>
<% end %>
<% end %>