summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-04 11:40:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-04 11:40:17 +0000
commit7535c211d5e660a7a65ee91e33f14881027836a7 (patch)
tree08e6cef18c43382aff2f77cc10552f5dd1897759
parentd46e3a501e7bad4242d896de36f02c19b8781143 (diff)
downloadredmine-7535c211d5e660a7a65ee91e33f14881027836a7.tar.gz
redmine-7535c211d5e660a7a65ee91e33f14881027836a7.zip
Removed IssueStatus html_color attribute.
Issue list colorization can be done using a custom theme. Each row is given a class that correspond to the issue status (eg. status-1 where 1 is the status position). git-svn-id: http://redmine.rubyforge.org/svn/trunk@881 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/issue_status.rb2
-rw-r--r--app/views/issue_statuses/_form.rhtml3
-rw-r--r--db/migrate/077_remove_issue_statuses_html_color.rb9
-rw-r--r--lang/bg.yml1
-rw-r--r--lang/cs.yml1
-rw-r--r--lang/de.yml1
-rw-r--r--lang/en.yml1
-rw-r--r--lang/es.yml1
-rw-r--r--lang/fr.yml1
-rw-r--r--lang/he.yml1
-rw-r--r--lang/it.yml1
-rw-r--r--lang/ja.yml1
-rw-r--r--lang/ko.yml1
-rw-r--r--lang/nl.yml1
-rw-r--r--lang/pl.yml1
-rw-r--r--lang/pt-br.yml1
-rw-r--r--lang/pt.yml1
-rw-r--r--lang/ro.yml1
-rw-r--r--lang/sr.yml1
-rw-r--r--lang/sv.yml1
-rw-r--r--lang/zh.yml1
-rw-r--r--lib/tasks/load_default_data.rake12
-rw-r--r--test/fixtures/issue_statuses.yml6
-rw-r--r--test/functional/projects_controller_test.rb2
24 files changed, 16 insertions, 36 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb
index 62b2cb762..a5d228405 100644
--- a/app/models/issue_status.rb
+++ b/app/models/issue_status.rb
@@ -24,8 +24,6 @@ class IssueStatus < ActiveRecord::Base
validates_uniqueness_of :name
validates_length_of :name, :maximum => 30
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
- validates_length_of :html_color, :is => 6
- validates_format_of :html_color, :with => /^[a-f0-9]*$/i
def before_save
IssueStatus.update_all "is_default=#{connection.quoted_false}" if self.is_default?
diff --git a/app/views/issue_statuses/_form.rhtml b/app/views/issue_statuses/_form.rhtml
index 7f6dc5be0..6ae0a7c33 100644
--- a/app/views/issue_statuses/_form.rhtml
+++ b/app/views/issue_statuses/_form.rhtml
@@ -11,8 +11,5 @@
<p><label for="issue_status_is_default"><%=l(:field_is_default)%></label>
<%= check_box 'issue_status', 'is_default' %></p>
-<p><label for="issue_status_html_color"><%=l(:field_html_color)%><span class="required"> *</span></label>
-#<%= text_field 'issue_status', 'html_color', :maxlength => 6 %></p>
-
<!--[eoform:issue_status]-->
</div> \ No newline at end of file
diff --git a/db/migrate/077_remove_issue_statuses_html_color.rb b/db/migrate/077_remove_issue_statuses_html_color.rb
new file mode 100644
index 000000000..a3e2c3f8f
--- /dev/null
+++ b/db/migrate/077_remove_issue_statuses_html_color.rb
@@ -0,0 +1,9 @@
+class RemoveIssueStatusesHtmlColor < ActiveRecord::Migration
+ def self.up
+ remove_column :issue_statuses, :html_color
+ end
+
+ def self.down
+ raise IrreversibleMigration
+ end
+end
diff --git a/lang/bg.yml b/lang/bg.yml
index 07360a3c4..a034d4e1b 100644
--- a/lang/bg.yml
+++ b/lang/bg.yml
@@ -110,7 +110,6 @@ field_status: Статус
field_notes: Бележка
field_is_closed: Затворена задача
field_is_default: Статус по подразбиране
-field_html_color: Цвят
field_tracker: Тракер
field_subject: Тема
field_due_date: Крайна дата
diff --git a/lang/cs.yml b/lang/cs.yml
index 86d9a494c..0918e9543 100644
--- a/lang/cs.yml
+++ b/lang/cs.yml
@@ -110,7 +110,6 @@ field_status: Stav
field_notes: Poznámka
field_is_closed: Požadavek uzavřen
field_is_default: Výchozí stav
-field_html_color: Barva
field_tracker: Fronta
field_subject: Předmět
field_due_date: Po lhůtě
diff --git a/lang/de.yml b/lang/de.yml
index c1acaa367..ac6f7a7c3 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -110,7 +110,6 @@ field_status: Status
field_notes: Kommentare
field_is_closed: Problem erledigt
field_is_default: Default
-field_html_color: Farbe
field_tracker: Tracker
field_subject: Thema
field_due_date: Abgabedatum
diff --git a/lang/en.yml b/lang/en.yml
index 480f30a13..ea8ff25b0 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -114,7 +114,6 @@ field_status: Status
field_notes: Notes
field_is_closed: Issue closed
field_is_default: Default value
-field_html_color: Color
field_tracker: Tracker
field_subject: Subject
field_due_date: Due date
diff --git a/lang/es.yml b/lang/es.yml
index 16a2d3ac3..453d1dfcf 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -107,7 +107,6 @@ field_status: Estado
field_notes: Notas
field_is_closed: Petición resuelta
field_is_default: Estado por defecto
-field_html_color: Color
field_tracker: Tracker
field_subject: Tema
field_due_date: Fecha debida
diff --git a/lang/fr.yml b/lang/fr.yml
index 9bd28c082..ee10720ec 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -114,7 +114,6 @@ field_status: Statut
field_notes: Notes
field_is_closed: Demande fermée
field_is_default: Valeur par défaut
-field_html_color: Couleur
field_tracker: Tracker
field_subject: Sujet
field_due_date: Date d'échéance
diff --git a/lang/he.yml b/lang/he.yml
index 97fa51e06..bed09f10c 100644
--- a/lang/he.yml
+++ b/lang/he.yml
@@ -112,7 +112,6 @@ field_status: מצב
field_notes: הערות
field_is_closed: נושא סגור
field_is_default: ערך ברירת מחדל
-field_html_color: צבע
field_tracker: עוקב
field_subject: שם נושא
field_due_date: תאריך סיום
diff --git a/lang/it.yml b/lang/it.yml
index 03442eb41..23761914f 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -110,7 +110,6 @@ field_status: Stato
field_notes: Note
field_is_closed: Chiude il contesto
field_is_default: Stato predefinito
-field_html_color: Colore
field_tracker: Tracker
field_subject: Oggetto
field_due_date: Data ultima
diff --git a/lang/ja.yml b/lang/ja.yml
index 226f56569..6636a440c 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -111,7 +111,6 @@ field_status: ステータス
field_notes: 注記
field_is_closed: 終了した問題
field_is_default: デフォルトのステータス
-field_html_color: 色
field_tracker: トラッカー
field_subject: 題名
field_due_date: 期限日
diff --git a/lang/ko.yml b/lang/ko.yml
index 2ff051e80..a11930a8a 100644
--- a/lang/ko.yml
+++ b/lang/ko.yml
@@ -112,7 +112,6 @@ field_status: 상태
field_notes: 노트
field_is_closed: 완료된 문제
field_is_default: 기본값
-field_html_color: 색상
field_tracker: 구분
field_subject: 제목
field_due_date: 완료 기한
diff --git a/lang/nl.yml b/lang/nl.yml
index 820242869..6b3179141 100644
--- a/lang/nl.yml
+++ b/lang/nl.yml
@@ -110,7 +110,6 @@ field_status: Status
field_notes: Notities
field_is_closed: Issue gesloten
field_is_default: Default status
-field_html_color: Kleur
field_tracker: Tracker
field_subject: Onderwerp
field_due_date: Verwachte datum gereed
diff --git a/lang/pl.yml b/lang/pl.yml
index ea7485d2d..cc8ffb722 100644
--- a/lang/pl.yml
+++ b/lang/pl.yml
@@ -107,7 +107,6 @@ field_status: Status
field_notes: Notatki
field_is_closed: Zgłoszenie zamknięte
field_is_default: Domyślny status
-field_html_color: Kolor
field_tracker: Typ zgłoszenia
field_subject: Temat
field_due_date: Data oddania
diff --git a/lang/pt-br.yml b/lang/pt-br.yml
index bce1d2630..3ab30641a 100644
--- a/lang/pt-br.yml
+++ b/lang/pt-br.yml
@@ -110,7 +110,6 @@ field_status: Status
field_notes: Notas
field_is_closed: Tarefa fechada
field_is_default: Status padrao
-field_html_color: Cor
field_tracker: Tipo
field_subject: Titulo
field_due_date: Data devida
diff --git a/lang/pt.yml b/lang/pt.yml
index e9233f333..0cd5d65c7 100644
--- a/lang/pt.yml
+++ b/lang/pt.yml
@@ -110,7 +110,6 @@ field_status: Status
field_notes: Notas
field_is_closed: Tarefa fechada
field_is_default: Status padrão
-field_html_color: Cor
field_tracker: Tipo
field_subject: Assunto
field_due_date: Data final
diff --git a/lang/ro.yml b/lang/ro.yml
index b6002ac87..ecd09a522 100644
--- a/lang/ro.yml
+++ b/lang/ro.yml
@@ -110,7 +110,6 @@ field_status: Statut
field_notes: Note
field_is_closed: Tichet rezolvat
field_is_default: Statut de baza
-field_html_color: Culoare
field_tracker: Tip tichet
field_subject: Subiect
field_due_date: Data finalizarii
diff --git a/lang/sr.yml b/lang/sr.yml
index 39ae09da3..c48f61320 100644
--- a/lang/sr.yml
+++ b/lang/sr.yml
@@ -114,7 +114,6 @@ field_status: Status
field_notes: Beleške
field_is_closed: Greška zatvorena
field_is_default: Podrazumevana vrednost
-field_html_color: Boja
field_tracker: Tracker
field_subject: Subjekat
field_due_date: Do datuma
diff --git a/lang/sv.yml b/lang/sv.yml
index df814fbae..06fd11eba 100644
--- a/lang/sv.yml
+++ b/lang/sv.yml
@@ -110,7 +110,6 @@ field_status: Status
field_notes: Anteckningar
field_is_closed: Brist stängd
field_is_default: Defaultstatus
-field_html_color: Färg
field_tracker: Tracker
field_subject: Rubrik
field_due_date: Färdigdatum
diff --git a/lang/zh.yml b/lang/zh.yml
index 6b3d095e5..45f1cb012 100644
--- a/lang/zh.yml
+++ b/lang/zh.yml
@@ -113,7 +113,6 @@ field_status: 状态
field_notes: 说明
field_is_closed: 已关闭的任务
field_is_default: 默认状态
-field_html_color: 颜色
field_tracker: 跟踪
field_subject: 主题
field_due_date: 到期日
diff --git a/lib/tasks/load_default_data.rake b/lib/tasks/load_default_data.rake
index 27f59328c..8e89d4ecd 100644
--- a/lib/tasks/load_default_data.rake
+++ b/lib/tasks/load_default_data.rake
@@ -114,12 +114,12 @@ begin
Tracker.create(:name => l(:default_tracker_support), :is_in_chlog => false, :is_in_roadmap => false, :position => 3)
# issue statuses
- new = IssueStatus.create(:name => l(:default_issue_status_new), :is_closed => false, :is_default => true, :html_color => 'F98787', :position => 1)
- assigned = IssueStatus.create(:name => l(:default_issue_status_assigned), :is_closed => false, :is_default => false, :html_color => 'C0C0FF', :position => 2)
- resolved = IssueStatus.create(:name => l(:default_issue_status_resolved), :is_closed => false, :is_default => false, :html_color => '88E0B3', :position => 3)
- feedback = IssueStatus.create(:name => l(:default_issue_status_feedback), :is_closed => false, :is_default => false, :html_color => 'F3A4F4', :position => 4)
- closed = IssueStatus.create(:name => l(:default_issue_status_closed), :is_closed => true, :is_default => false, :html_color => 'DBDBDB', :position => 5)
- rejected = IssueStatus.create(:name => l(:default_issue_status_rejected), :is_closed => true, :is_default => false, :html_color => 'F5C28B', :position => 6)
+ new = IssueStatus.create(:name => l(:default_issue_status_new), :is_closed => false, :is_default => true, :position => 1)
+ assigned = IssueStatus.create(:name => l(:default_issue_status_assigned), :is_closed => false, :is_default => false, :position => 2)
+ resolved = IssueStatus.create(:name => l(:default_issue_status_resolved), :is_closed => false, :is_default => false, :position => 3)
+ feedback = IssueStatus.create(:name => l(:default_issue_status_feedback), :is_closed => false, :is_default => false, :position => 4)
+ closed = IssueStatus.create(:name => l(:default_issue_status_closed), :is_closed => true, :is_default => false, :position => 5)
+ rejected = IssueStatus.create(:name => l(:default_issue_status_rejected), :is_closed => true, :is_default => false, :position => 6)
# workflow
Tracker.find(:all).each { |t|
diff --git a/test/fixtures/issue_statuses.yml b/test/fixtures/issue_statuses.yml
index b5a509f39..c7b10ba07 100644
--- a/test/fixtures/issue_statuses.yml
+++ b/test/fixtures/issue_statuses.yml
@@ -2,36 +2,30 @@
issue_statuses_006:
name: Rejected
is_default: false
- html_color: F5C28B
is_closed: true
id: 6
issue_statuses_001:
name: New
is_default: true
- html_color: F98787
is_closed: false
id: 1
issue_statuses_002:
name: Assigned
is_default: false
- html_color: C0C0FF
is_closed: false
id: 2
issue_statuses_003:
name: Resolved
is_default: false
- html_color: 88E0B3
is_closed: false
id: 3
issue_statuses_004:
name: Feedback
is_default: false
- html_color: F3A4F4
is_closed: false
id: 4
issue_statuses_005:
name: Closed
is_default: false
- html_color: DBDBDB
is_closed: true
id: 5
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 744cc49d6..86cea62f8 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -54,7 +54,7 @@ class ProjectsControllerTest < Test::Unit::TestCase
get :list_documents, :id => 1
assert_response :success
assert_template 'list_documents'
- assert_not_nil assigns(:documents)
+ assert_not_nil assigns(:grouped)
end
def test_list_issues