Removes constraint on enumerations name (#1384).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1503 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
042da97f54
commit
d446469f5d
|
@ -23,7 +23,6 @@ class Enumeration < ActiveRecord::Base
|
||||||
validates_presence_of :opt, :name
|
validates_presence_of :opt, :name
|
||||||
validates_uniqueness_of :name, :scope => [:opt]
|
validates_uniqueness_of :name, :scope => [:opt]
|
||||||
validates_length_of :name, :maximum => 30
|
validates_length_of :name, :maximum => 30
|
||||||
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
|
||||||
|
|
||||||
OPTIONS = {
|
OPTIONS = {
|
||||||
"IPRI" => :enumeration_issue_priorities,
|
"IPRI" => :enumeration_issue_priorities,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<% enumerations.each do |enumeration| %>
|
<% enumerations.each do |enumeration| %>
|
||||||
<tr class="<%= cycle('odd', 'even') %>">
|
<tr class="<%= cycle('odd', 'even') %>">
|
||||||
<td><%= link_to enumeration.name, :action => 'edit', :id => enumeration %></td>
|
<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%;"><%= image_tag('true.png') if enumeration.is_default? %></td>
|
||||||
<td style="width:15%;">
|
<td style="width:15%;">
|
||||||
<%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => enumeration, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
|
<%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => enumeration, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% next if hours_for_value.empty? -%>
|
<% next if hours_for_value.empty? -%>
|
||||||
<tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
|
<tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
|
||||||
<%= '<td></td>' * level %>
|
<%= '<td></td>' * level %>
|
||||||
<td><%= format_criteria_value(criterias[level], value) %></td>
|
<td><%= h(format_criteria_value(criterias[level], value)) %></td>
|
||||||
<%= '<td></td>' * (criterias.length - level - 1) -%>
|
<%= '<td></td>' * (criterias.length - level - 1) -%>
|
||||||
<% total = 0 -%>
|
<% total = 0 -%>
|
||||||
<% @periods.each do |period| -%>
|
<% @periods.each do |period| -%>
|
||||||
|
|
Loading…
Reference in New Issue