mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-26 10:21:14 +00:00
* Added migrations to change Enumerations to an STI relationship * Added TimeEntryActivity model (STI) * Added DocumentCategory model (STI) * Added IssuePriority model (STI) * Added Enumeration#get_subclasses to get a list of the subclasses of Enumeration * Changed Enumeration to use the STI type field instead of the opt field * Changed Enumeration#opt to return the old opt values but with a deprecation warning. * Removed Enumeration::OPTIONS * Removed the dynamic named_scopes in favor of specific named_scopes. Kept for compatibility reasons. * Added Enumeration#default so each subclass can easily find it's default record. * Fixed Enumeration#default to use the STI scoping with a fake default scope for finding Enumeration's default. * Added a 'all' named scope for getting all records in order by position. * Added Deprecation warnings to the old named_scopes in Enumerations. * Moved various methods off of Enumeration and onto the concrete classes * Changed the EnumerationsController to use types * Updated the Enumeration list template * Added has_many relationships to the Enumeration STI classes. * Fixes for tests. #3007 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2777 e93f8b46-1217-0410-a6f0-8f06a7374b81
27 lines
981 B
Plaintext
27 lines
981 B
Plaintext
<h2><%=l(:label_enumerations)%></h2>
|
|
|
|
<% Enumeration.get_subclasses.each do |klass| %>
|
|
<h3><%= l(klass::OptionName) %></h3>
|
|
|
|
<% enumerations = klass.all %>
|
|
<% if enumerations.any? %>
|
|
<table class="list">
|
|
<% enumerations.each do |enumeration| %>
|
|
<tr class="<%= cycle('odd', 'even') %>">
|
|
<td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
|
|
<td style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td>
|
|
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
|
|
<td align="center" style="width:10%;">
|
|
<%= 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)) -%>
|