summaryrefslogtreecommitdiffstats
path: root/app/views/enumerations/list.rhtml
blob: 15b91c1ac95515760c46921ddb29bae573cb24f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<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 %>