2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_enumerations)%></h2>
|
2007-01-02 14:15:54 +03:00
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<% Enumeration::OPTIONS.each do |option, name| %>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2006-12-27 00:33:44 +03:00
|
|
|
<% if params[:opt]==option %>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2007-01-02 14:15:54 +03:00
|
|
|
<h3><%= l(name) %></h3>
|
2006-06-28 22:11:03 +04:00
|
|
|
<ul>
|
2006-07-29 23:54:22 +04:00
|
|
|
<% for value in Enumeration.find(:all, :conditions => ["opt = ?", option]) %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<li><%= link_to value.name, :action => 'edit', :id => value %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
2007-01-02 14:15:54 +03:00
|
|
|
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option }, :class => "pic picAdd" %></p>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
|
|
|
<% else %>
|
2007-01-02 14:15:54 +03:00
|
|
|
<h3><%= link_to l(name), :opt => option %></h3>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% end %>
|
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<% end %>
|