@@ -23,7 +23,6 class Enumeration < ActiveRecord::Base | |||||
23 | validates_presence_of :opt, :name |
|
23 | validates_presence_of :opt, :name | |
24 | validates_uniqueness_of :name, :scope => [:opt] |
|
24 | validates_uniqueness_of :name, :scope => [:opt] | |
25 | validates_length_of :name, :maximum => 30 |
|
25 | validates_length_of :name, :maximum => 30 | |
26 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i |
|
|||
27 |
|
26 | |||
28 | OPTIONS = { |
|
27 | OPTIONS = { | |
29 | "IPRI" => :enumeration_issue_priorities, |
|
28 | "IPRI" => :enumeration_issue_priorities, |
@@ -8,7 +8,7 | |||||
8 | <table class="list"> |
|
8 | <table class="list"> | |
9 | <% enumerations.each do |enumeration| %> |
|
9 | <% enumerations.each do |enumeration| %> | |
10 | <tr class="<%= cycle('odd', 'even') %>"> |
|
10 | <tr class="<%= cycle('odd', 'even') %>"> | |
11 |
<td><%= link_to enumeration |
|
11 | <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td> | |
12 | <td style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td> |
|
12 | <td style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td> | |
13 | <td style="width:15%;"> |
|
13 | <td style="width:15%;"> | |
14 | <%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => enumeration, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %> |
|
14 | <%= 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 | |||||
3 | <% next if hours_for_value.empty? -%> |
|
3 | <% next if hours_for_value.empty? -%> | |
4 | <tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>"> |
|
4 | <tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>"> | |
5 | <%= '<td></td>' * level %> |
|
5 | <%= '<td></td>' * level %> | |
6 | <td><%= format_criteria_value(criterias[level], value) %></td> |
|
6 | <td><%= h(format_criteria_value(criterias[level], value)) %></td> | |
7 | <%= '<td></td>' * (criterias.length - level - 1) -%> |
|
7 | <%= '<td></td>' * (criterias.length - level - 1) -%> | |
8 | <% total = 0 -%> |
|
8 | <% total = 0 -%> | |
9 | <% @periods.each do |period| -%> |
|
9 | <% @periods.each do |period| -%> |
General Comments 0
You need to be logged in to leave comments.
Login now