@@ -0,0 +1,10 | |||||
|
1 | class AddIssueStatusPosition < ActiveRecord::Migration | |||
|
2 | def self.up | |||
|
3 | add_column :issue_statuses, :position, :integer, :default => 1, :null => false | |||
|
4 | IssueStatus.find(:all).each_with_index {|status, i| status.update_attribute(:position, i+1)} | |||
|
5 | end | |||
|
6 | ||||
|
7 | def self.down | |||
|
8 | remove_column :issue_statuses, :position | |||
|
9 | end | |||
|
10 | end |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
@@ -19,13 +19,16 class IssueStatusesController < ApplicationController | |||||
19 | layout 'base' |
|
19 | layout 'base' | |
20 | before_filter :require_admin |
|
20 | before_filter :require_admin | |
21 |
|
21 | |||
|
22 | verify :method => :post, :only => [ :destroy, :create, :update, :move ], | |||
|
23 | :redirect_to => { :action => :list } | |||
|
24 | ||||
22 | def index |
|
25 | def index | |
23 | list |
|
26 | list | |
24 | render :action => 'list' unless request.xhr? |
|
27 | render :action => 'list' unless request.xhr? | |
25 | end |
|
28 | end | |
26 |
|
29 | |||
27 | def list |
|
30 | def list | |
28 |
@issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => |
|
31 | @issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 25, :order => "position" | |
29 | render :action => "list", :layout => false if request.xhr? |
|
32 | render :action => "list", :layout => false if request.xhr? | |
30 | end |
|
33 | end | |
31 |
|
34 | |||
@@ -55,6 +58,21 class IssueStatusesController < ApplicationController | |||||
55 | else |
|
58 | else | |
56 | render :action => 'edit' |
|
59 | render :action => 'edit' | |
57 | end |
|
60 | end | |
|
61 | end | |||
|
62 | ||||
|
63 | def move | |||
|
64 | @issue_status = IssueStatus.find(params[:id]) | |||
|
65 | case params[:position] | |||
|
66 | when 'highest' | |||
|
67 | @issue_status.move_to_top | |||
|
68 | when 'higher' | |||
|
69 | @issue_status.move_higher | |||
|
70 | when 'lower' | |||
|
71 | @issue_status.move_lower | |||
|
72 | when 'lowest' | |||
|
73 | @issue_status.move_to_bottom | |||
|
74 | end if params[:position] | |||
|
75 | redirect_to :action => 'list' | |||
58 | end |
|
76 | end | |
59 |
|
77 | |||
60 | def destroy |
|
78 | def destroy |
@@ -25,7 +25,7 class IssuesController < ApplicationController | |||||
25 | include IfpdfHelper |
|
25 | include IfpdfHelper | |
26 |
|
26 | |||
27 | def show |
|
27 | def show | |
28 | @status_options = @issue.status.workflows.find(:all, :include => :new_status, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user |
|
28 | @status_options = @issue.status.workflows.find(:all, :order => 'position', :include => :new_status, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user | |
29 | @custom_values = @issue.custom_values.find(:all, :include => :custom_field) |
|
29 | @custom_values = @issue.custom_values.find(:all, :include => :custom_field) | |
30 | @journals_count = @issue.journals.count |
|
30 | @journals_count = @issue.journals.count | |
31 | @journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "journals.created_on desc") |
|
31 | @journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "journals.created_on desc") | |
@@ -83,7 +83,7 class IssuesController < ApplicationController | |||||
83 |
|
83 | |||
84 | def change_status |
|
84 | def change_status | |
85 | #@history = @issue.histories.build(params[:history]) |
|
85 | #@history = @issue.histories.build(params[:history]) | |
86 | @status_options = @issue.status.workflows.find(:all, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user |
|
86 | @status_options = @issue.status.workflows.find(:all, :order => 'position', :include => :new_status, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user | |
87 | @new_status = IssueStatus.find(params[:new_status_id]) |
|
87 | @new_status = IssueStatus.find(params[:new_status_id]) | |
88 | if params[:confirm] |
|
88 | if params[:confirm] | |
89 | begin |
|
89 | begin |
@@ -20,7 +20,7 class ReportsController < ApplicationController | |||||
20 | before_filter :find_project, :authorize |
|
20 | before_filter :find_project, :authorize | |
21 |
|
21 | |||
22 | def issue_report |
|
22 | def issue_report | |
23 |
@statuses = IssueStatus.find : |
|
23 | @statuses = IssueStatus.find(:all, :order => 'position') | |
24 |
|
24 | |||
25 | case params[:detail] |
|
25 | case params[:detail] | |
26 | when "tracker" |
|
26 | when "tracker" |
@@ -79,6 +79,6 class RolesController < ApplicationController | |||||
79 | end |
|
79 | end | |
80 | @roles = Role.find :all |
|
80 | @roles = Role.find :all | |
81 | @trackers = Tracker.find :all |
|
81 | @trackers = Tracker.find :all | |
82 | @statuses = IssueStatus.find(:all, :include => :workflows) |
|
82 | @statuses = IssueStatus.find(:all, :include => :workflows, :order => 'position') | |
83 | end |
|
83 | end | |
84 | end |
|
84 | end |
@@ -18,6 +18,7 | |||||
18 | class IssueStatus < ActiveRecord::Base |
|
18 | class IssueStatus < ActiveRecord::Base | |
19 | before_destroy :check_integrity |
|
19 | before_destroy :check_integrity | |
20 | has_many :workflows, :foreign_key => "old_status_id" |
|
20 | has_many :workflows, :foreign_key => "old_status_id" | |
|
21 | acts_as_list | |||
21 |
|
22 | |||
22 | validates_presence_of :name |
|
23 | validates_presence_of :name | |
23 | validates_uniqueness_of :name |
|
24 | validates_uniqueness_of :name |
@@ -69,7 +69,7 class Query < ActiveRecord::Base | |||||
69 |
|
69 | |||
70 | def available_filters |
|
70 | def available_filters | |
71 | return @available_filters if @available_filters |
|
71 | return @available_filters if @available_filters | |
72 | @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all).collect{|s| [s.name, s.id.to_s] } }, |
|
72 | @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } }, | |
73 | "tracker_id" => { :type => :list, :order => 2, :values => Tracker.find(:all).collect{|s| [s.name, s.id.to_s] } }, |
|
73 | "tracker_id" => { :type => :list, :order => 2, :values => Tracker.find(:all).collect{|s| [s.name, s.id.to_s] } }, | |
74 | "priority_id" => { :type => :list, :order => 3, :values => Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect{|s| [s.name, s.id.to_s] } }, |
|
74 | "priority_id" => { :type => :list, :order => 3, :values => Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect{|s| [s.name, s.id.to_s] } }, | |
75 | "subject" => { :type => :text, :order => 8 }, |
|
75 | "subject" => { :type => :text, :order => 8 }, |
@@ -9,6 +9,7 | |||||
9 | <th><%=l(:field_status)%></th> |
|
9 | <th><%=l(:field_status)%></th> | |
10 | <th><%=l(:field_is_default)%></th> |
|
10 | <th><%=l(:field_is_default)%></th> | |
11 | <th><%=l(:field_is_closed)%></th> |
|
11 | <th><%=l(:field_is_closed)%></th> | |
|
12 | <th><%=l(:button_sort)%></th> | |||
12 | <th></th> |
|
13 | <th></th> | |
13 | </tr></thead> |
|
14 | </tr></thead> | |
14 | <tbody> |
|
15 | <tbody> | |
@@ -18,6 +19,12 | |||||
18 | <td align="center"><%= image_tag 'true.png' if status.is_default? %></td> |
|
19 | <td align="center"><%= image_tag 'true.png' if status.is_default? %></td> | |
19 | <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td> |
|
20 | <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td> | |
20 | <td align="center"> |
|
21 | <td align="center"> | |
|
22 | <%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => status, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %> | |||
|
23 | <%= link_to image_tag('1uparrow.png', :alt => l(:label_sort_higher)), {:action => 'move', :id => status, :position => 'higher'}, :method => :post, :title => l(:label_sort_higher) %> - | |||
|
24 | <%= link_to image_tag('1downarrow.png', :alt => l(:label_sort_lower)), {:action => 'move', :id => status, :position => 'lower'}, :method => :post, :title => l(:label_sort_lower) %> | |||
|
25 | <%= link_to image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), {:action => 'move', :id => status, :position => 'lowest'}, :method => :post, :title => l(:label_sort_lowest) %> | |||
|
26 | </td> | |||
|
27 | <td align="center"> | |||
21 | <%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %> |
|
28 | <%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %> | |
22 | </td> |
|
29 | </td> | |
23 | </tr> |
|
30 | </tr> |
@@ -11,6 +11,7 http://redmine.rubyforge.org/ | |||||
11 | * settings are now stored in the database and editable through the application in: Admin -> Settings (config_custom.rb is no longer used) |
|
11 | * settings are now stored in the database and editable through the application in: Admin -> Settings (config_custom.rb is no longer used) | |
12 | * mail notifications added when a document, a file or an attachment is added |
|
12 | * mail notifications added when a document, a file or an attachment is added | |
13 | * tooltips added on Gantt chart and calender to view the details of the issues |
|
13 | * tooltips added on Gantt chart and calender to view the details of the issues | |
|
14 | * ability to set the sort order for issue statuses | |||
14 | * added missing fields to csv export: priority, start date, due date, done ratio |
|
15 | * added missing fields to csv export: priority, start date, due date, done ratio | |
15 | * all icons replaced (new icons are based on GPL icon set: "KDE Crystal Diamond 2.5" -by paolino- and "kNeu! Alpha v0.1" -by Pablo Fabregat-) |
|
16 | * all icons replaced (new icons are based on GPL icon set: "KDE Crystal Diamond 2.5" -by paolino- and "kNeu! Alpha v0.1" -by Pablo Fabregat-) | |
16 | * added back "fixed version" field on issue screen and in filters |
|
17 | * added back "fixed version" field on issue screen and in filters |
@@ -309,6 +309,10 label_latest_revision: Neueste Neuausgabe | |||||
309 | label_view_revisions: Die Neuausgaben ansehen |
|
309 | label_view_revisions: Die Neuausgaben ansehen | |
310 | label_max_size: Maximale Größe |
|
310 | label_max_size: Maximale Größe | |
311 | label_on: auf |
|
311 | label_on: auf | |
|
312 | label_sort_highest: Erste | |||
|
313 | label_sort_higher: Aufzurichten | |||
|
314 | label_sort_lower: Herabzusteigen | |||
|
315 | label_sort_lowest: Letzter | |||
312 |
|
316 | |||
313 | button_login: Einloggen |
|
317 | button_login: Einloggen | |
314 | button_submit: Einreichen |
|
318 | button_submit: Einreichen | |
@@ -332,6 +336,7 button_move: Bewegen | |||||
332 | button_back: Rückkehr |
|
336 | button_back: Rückkehr | |
333 | button_cancel: Annullieren |
|
337 | button_cancel: Annullieren | |
334 | button_activate: Aktivieren |
|
338 | button_activate: Aktivieren | |
|
339 | button_sort: Sortieren | |||
335 |
|
340 | |||
336 | text_select_mail_notifications: Aktionen für die Mailbenachrichtigung aktiviert werden soll. |
|
341 | text_select_mail_notifications: Aktionen für die Mailbenachrichtigung aktiviert werden soll. | |
337 | text_regexp_info: eg. ^[A-Z0-9]+$ |
|
342 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -309,6 +309,10 label_latest_revision: Latest revision | |||||
309 | label_view_revisions: View revisions |
|
309 | label_view_revisions: View revisions | |
310 | label_max_size: Maximum size |
|
310 | label_max_size: Maximum size | |
311 | label_on: 'on' |
|
311 | label_on: 'on' | |
|
312 | label_sort_highest: Move to top | |||
|
313 | label_sort_higher: Move up | |||
|
314 | label_sort_lower: Move down | |||
|
315 | label_sort_lowest: Move to bottom | |||
312 |
|
316 | |||
313 | button_login: Login |
|
317 | button_login: Login | |
314 | button_submit: Submit |
|
318 | button_submit: Submit | |
@@ -332,6 +336,7 button_move: Move | |||||
332 | button_back: Back |
|
336 | button_back: Back | |
333 | button_cancel: Cancel |
|
337 | button_cancel: Cancel | |
334 | button_activate: Activate |
|
338 | button_activate: Activate | |
|
339 | button_sort: Sort | |||
335 |
|
340 | |||
336 | text_select_mail_notifications: Select actions for which mail notifications should be sent. |
|
341 | text_select_mail_notifications: Select actions for which mail notifications should be sent. | |
337 | text_regexp_info: eg. ^[A-Z0-9]+$ |
|
342 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -309,6 +309,10 label_latest_revision: La revisión más última | |||||
309 | label_view_revisions: Ver las revisiones |
|
309 | label_view_revisions: Ver las revisiones | |
310 | label_max_size: Tamaño máximo |
|
310 | label_max_size: Tamaño máximo | |
311 | label_on: en |
|
311 | label_on: en | |
|
312 | label_sort_highest: Primero | |||
|
313 | label_sort_higher: Subir | |||
|
314 | label_sort_lower: Bajar | |||
|
315 | label_sort_lowest: Último | |||
312 |
|
316 | |||
313 | button_login: Conexión |
|
317 | button_login: Conexión | |
314 | button_submit: Someter |
|
318 | button_submit: Someter | |
@@ -332,6 +336,7 button_move: Mover | |||||
332 | button_back: Atrás |
|
336 | button_back: Atrás | |
333 | button_cancel: Cancelar |
|
337 | button_cancel: Cancelar | |
334 | button_activate: Activar |
|
338 | button_activate: Activar | |
|
339 | button_sort: Clasificar | |||
335 |
|
340 | |||
336 | text_select_mail_notifications: Seleccionar las actividades que necesitan la activación de la notificación por mail. |
|
341 | text_select_mail_notifications: Seleccionar las actividades que necesitan la activación de la notificación por mail. | |
337 | text_regexp_info: eg. ^[A-Z0-9]+$ |
|
342 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -309,6 +309,10 label_latest_revision: Dernière révision | |||||
309 | label_view_revisions: Voir les révisions |
|
309 | label_view_revisions: Voir les révisions | |
310 | label_max_size: Taille maximale |
|
310 | label_max_size: Taille maximale | |
311 | label_on: sur |
|
311 | label_on: sur | |
|
312 | label_sort_highest: Remonter en premier | |||
|
313 | label_sort_higher: Remonter | |||
|
314 | label_sort_lower: Descendre | |||
|
315 | label_sort_lowest: Descendre en dernier | |||
312 |
|
316 | |||
313 | button_login: Connexion |
|
317 | button_login: Connexion | |
314 | button_submit: Soumettre |
|
318 | button_submit: Soumettre | |
@@ -332,6 +336,7 button_move: Déplacer | |||||
332 | button_back: Retour |
|
336 | button_back: Retour | |
333 | button_cancel: Annuler |
|
337 | button_cancel: Annuler | |
334 | button_activate: Activer |
|
338 | button_activate: Activer | |
|
339 | button_sort: Trier | |||
335 |
|
340 | |||
336 | text_select_mail_notifications: Sélectionner les actions pour lesquelles la notification par mail doit être activée. |
|
341 | text_select_mail_notifications: Sélectionner les actions pour lesquelles la notification par mail doit être activée. | |
337 | text_regexp_info: ex. ^[A-Z0-9]+$ |
|
342 | text_regexp_info: ex. ^[A-Z0-9]+$ |
General Comments 0
You need to be logged in to leave comments.
Login now