summaryrefslogtreecommitdiffstats
path: root/app/views/enumerations/index.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-28 20:23:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-28 20:23:57 +0000
commit2dbbdafbc6c4d2b83565c16ea2c19a824ff3acbf (patch)
treebe563feb8f28d6cea29262cb780eb58e0d619993 /app/views/enumerations/index.html.erb
parentb8a924e4e1cb6e73299b8e13b5ee8ec625cda2b7 (diff)
downloadredmine-2dbbdafbc6c4d2b83565c16ea2c19a824ff3acbf.tar.gz
redmine-2dbbdafbc6c4d2b83565c16ea2c19a824ff3acbf.zip
Removed EnumerationsController#list action.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7973 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/enumerations/index.html.erb')
-rw-r--r--app/views/enumerations/index.html.erb37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/views/enumerations/index.html.erb b/app/views/enumerations/index.html.erb
new file mode 100644
index 000000000..80f7ef3dc
--- /dev/null
+++ b/app/views/enumerations/index.html.erb
@@ -0,0 +1,37 @@
+<h2><%=l(:label_enumerations)%></h2>
+
+<% Enumeration.get_subclasses.each do |klass| %>
+<h3><%= l(klass::OptionName) %></h3>
+
+<% enumerations = klass.shared %>
+<% if enumerations.any? %>
+<table class="list"><thead>
+<tr>
+ <th><%= l(:field_name) %></th>
+ <th style="width:15%;"><%= l(:field_is_default) %></th>
+ <th style="width:15%;"><%= l(:field_active) %></th>
+ <th style="width:15%;"></th>
+ <th align="center" style="width:10%;"> </th>
+</tr></thead>
+<% enumerations.each do |enumeration| %>
+<tr class="<%= cycle('odd', 'even') %>">
+ <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
+ <td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
+ <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
+ <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
+ <td class="buttons">
+ <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
+ :method => :post,
+ :confirm => l(:text_are_you_sure),
+ :class => 'icon icon-del' %>
+ </td>
+</tr>
+<% end %>
+</table>
+<% reset_cycle %>
+<% end %>
+
+<p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
+<% end %>
+
+<% html_title(l(:label_enumerations)) -%>