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
This commit is contained in:
Jean-Philippe Lang 2007-11-04 11:40:17 +00:00
parent d46e3a501e
commit 7535c211d5
24 changed files with 16 additions and 36 deletions

View File

@ -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?

View File

@ -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>

View File

@ -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

View File

@ -110,7 +110,6 @@ field_status: Статус
field_notes: Бележка
field_is_closed: Затворена задача
field_is_default: Статус по подразбиране
field_html_color: Цвят
field_tracker: Тракер
field_subject: Тема
field_due_date: Крайна дата

View File

@ -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ě

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -112,7 +112,6 @@ field_status: מצב
field_notes: הערות
field_is_closed: נושא סגור
field_is_default: ערך ברירת מחדל
field_html_color: צבע
field_tracker: עוקב
field_subject: שם נושא
field_due_date: תאריך סיום

View File

@ -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

View File

@ -111,7 +111,6 @@ field_status: ステータス
field_notes: 注記
field_is_closed: 終了した問題
field_is_default: デフォルトのステータス
field_html_color:
field_tracker: トラッカー
field_subject: 題名
field_due_date: 期限日

View File

@ -112,7 +112,6 @@ field_status: 상태
field_notes: 노트
field_is_closed: 완료된 문제
field_is_default: 기본값
field_html_color: 색상
field_tracker: 구분
field_subject: 제목
field_due_date: 완료 기한

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -113,7 +113,6 @@ field_status: 状态
field_notes: 说明
field_is_closed: 已关闭的任务
field_is_default: 默认状态
field_html_color: 颜色
field_tracker: 跟踪
field_subject: 主题
field_due_date: 到期日

View File

@ -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|

View File

@ -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

View File

@ -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