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 @ 912:5e80956cc792
History | View | Annotate | Download (1.39 KB)
| 1 | 909:cbb26bc654de | Chris | <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 style="width:15%;"><%= l(:field_is_default) %></th> |
||
| 12 | <th style="width:15%;"><%= l(:field_active) %></th> |
||
| 13 | <th style="width:15%;"></th> |
||
| 14 | <th align="center" style="width:10%;"> </th> |
||
| 15 | </tr></thead> |
||
| 16 | <% enumerations.each do |enumeration| %>
|
||
| 17 | <tr class="<%= cycle('odd', 'even') %>"> |
||
| 18 | <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td> |
||
| 19 | <td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td> |
||
| 20 | <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td> |
||
| 21 | <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td> |
||
| 22 | <td class="buttons"> |
||
| 23 | <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
|
||
| 24 | :method => :post,
|
||
| 25 | :confirm => l(:text_are_you_sure),
|
||
| 26 | :class => 'icon icon-del' %>
|
||
| 27 | </td>
|
||
| 28 | </tr>
|
||
| 29 | <% end %>
|
||
| 30 | </table>
|
||
| 31 | <% reset_cycle %>
|
||
| 32 | <% end %>
|
||
| 33 | |||
| 34 | <p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p> |
||
| 35 | <% end %>
|
||
| 36 | |||
| 37 | <% html_title(l(:label_enumerations)) -%> |