diff options
Diffstat (limited to 'app/views/enumerations/list.rhtml')
-rw-r--r-- | app/views/enumerations/list.rhtml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/enumerations/list.rhtml b/app/views/enumerations/list.rhtml new file mode 100644 index 000000000..15b91c1ac --- /dev/null +++ b/app/views/enumerations/list.rhtml @@ -0,0 +1,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 ('» ' + l(:label_new)), :action => 'new', :opt => option %></li>
+ </ul>
+
+ <% else %>
+ <p><%= image_tag 'dir' %> <%= link_to l(name), :opt => option %></p>
+ <% end %>
+
+<% end %>
\ No newline at end of file |