To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / enumerations / index.html.erb @ 1591:63650ae64bf2
History | View | Annotate | Download (1.07 KB)
| 1 |
<h2><%=l(:label_enumerations)%></h2> |
|---|---|
| 2 |
|
| 3 |
<% Enumeration.get_subclasses.each do |klass| %>
|
| 4 |
<h3><%= l(klass::OptionName) %></h3> |
| 5 |
|
| 6 |
<% enumerations = klass.shared %>
|
| 7 |
<% if enumerations.any? %>
|
| 8 |
<table class="list"><thead> |
| 9 |
<tr>
|
| 10 |
<th><%= l(:field_name) %></th> |
| 11 |
<th><%= l(:field_is_default) %></th> |
| 12 |
<th><%= l(:field_active) %></th> |
| 13 |
<th><%=l(:button_sort)%></th> |
| 14 |
<th></th> |
| 15 |
</tr></thead> |
| 16 |
<% enumerations.each do |enumeration| %>
|
| 17 |
<tr class="<%= cycle('odd', 'even') %>"> |
| 18 |
<td class="name"><%= link_to h(enumeration), edit_enumeration_path(enumeration) %></td> |
| 19 |
<td class="tick"><%= checked_image enumeration.is_default? %></td> |
| 20 |
<td class="tick"><%= checked_image enumeration.active? %></td> |
| 21 |
<td class="reorder"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td> |
| 22 |
<td class="buttons"><%= delete_link enumeration_path(enumeration) %></td> |
| 23 |
</tr>
|
| 24 |
<% end %>
|
| 25 |
</table>
|
| 26 |
<% reset_cycle %>
|
| 27 |
<% end %>
|
| 28 |
|
| 29 |
<p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p> |
| 30 |
<% end %>
|
| 31 |
|
| 32 |
<% html_title(l(:label_enumerations)) -%>
|