enumerations/list redesign

git-svn-id: http://redmine.rubyforge.org/svn/trunk@139 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-01-02 11:15:54 +00:00
parent a9efe82117
commit 9f76b4d2ef
1 changed files with 4 additions and 6 deletions

View File

@ -1,21 +1,19 @@
<h2><%=l(:label_enumerations)%></h2>
&nbsp;
<% Enumeration::OPTIONS.each do |option, name| %>
<% if params[:opt]==option %>
<p><%= image_tag 'dir_open' %> <b><%= l(name) %></b></p>
<h3><%= l(name) %></h3>
<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>
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option }, :class => "pic picAdd" %></p>&nbsp;
<% else %>
<p><%= image_tag 'dir' %> <%= link_to l(name), :opt => option %></p>
<h3><%= link_to l(name), :opt => option %></h3>
<% end %>
<% end %>