@@ -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 |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -19,13 +19,16 class IssueStatusesController < ApplicationController | |||
|
19 | 19 | layout 'base' |
|
20 | 20 | before_filter :require_admin |
|
21 | 21 | |
|
22 | verify :method => :post, :only => [ :destroy, :create, :update, :move ], | |
|
23 | :redirect_to => { :action => :list } | |
|
24 | ||
|
22 | 25 | def index |
|
23 | 26 | list |
|
24 | 27 | render :action => 'list' unless request.xhr? |
|
25 | 28 | end |
|
26 | 29 | |
|
27 | 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 | 32 | render :action => "list", :layout => false if request.xhr? |
|
30 | 33 | end |
|
31 | 34 | |
@@ -57,6 +60,21 class IssueStatusesController < ApplicationController | |||
|
57 | 60 | end |
|
58 | 61 | end |
|
59 | 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' | |
|
76 | end | |
|
77 | ||
|
60 | 78 | def destroy |
|
61 | 79 | IssueStatus.find(params[:id]).destroy |
|
62 | 80 | redirect_to :action => 'list' |
@@ -25,7 +25,7 class IssuesController < ApplicationController | |||
|
25 | 25 | include IfpdfHelper |
|
26 | 26 | |
|
27 | 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 | 29 | @custom_values = @issue.custom_values.find(:all, :include => :custom_field) |
|
30 | 30 | @journals_count = @issue.journals.count |
|
31 | 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 | 84 | def change_status |
|
85 | 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 | 87 | @new_status = IssueStatus.find(params[:new_status_id]) |
|
88 | 88 | if params[:confirm] |
|
89 | 89 | begin |
@@ -20,7 +20,7 class ReportsController < ApplicationController | |||
|
20 | 20 | before_filter :find_project, :authorize |
|
21 | 21 | |
|
22 | 22 | def issue_report |
|
23 |
@statuses = IssueStatus.find : |
|
|
23 | @statuses = IssueStatus.find(:all, :order => 'position') | |
|
24 | 24 | |
|
25 | 25 | case params[:detail] |
|
26 | 26 | when "tracker" |
@@ -79,6 +79,6 class RolesController < ApplicationController | |||
|
79 | 79 | end |
|
80 | 80 | @roles = Role.find :all |
|
81 | 81 | @trackers = Tracker.find :all |
|
82 | @statuses = IssueStatus.find(:all, :include => :workflows) | |
|
82 | @statuses = IssueStatus.find(:all, :include => :workflows, :order => 'position') | |
|
83 | 83 | end |
|
84 | 84 | end |
@@ -18,6 +18,7 | |||
|
18 | 18 | class IssueStatus < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | has_many :workflows, :foreign_key => "old_status_id" |
|
21 | acts_as_list | |
|
21 | 22 | |
|
22 | 23 | validates_presence_of :name |
|
23 | 24 | validates_uniqueness_of :name |
@@ -69,7 +69,7 class Query < ActiveRecord::Base | |||
|
69 | 69 | |
|
70 | 70 | def available_filters |
|
71 | 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 | 73 | "tracker_id" => { :type => :list, :order => 2, :values => Tracker.find(:all).collect{|s| [s.name, s.id.to_s] } }, |
|
74 | 74 | "priority_id" => { :type => :list, :order => 3, :values => Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect{|s| [s.name, s.id.to_s] } }, |
|
75 | 75 | "subject" => { :type => :text, :order => 8 }, |
@@ -9,6 +9,7 | |||
|
9 | 9 | <th><%=l(:field_status)%></th> |
|
10 | 10 | <th><%=l(:field_is_default)%></th> |
|
11 | 11 | <th><%=l(:field_is_closed)%></th> |
|
12 | <th><%=l(:button_sort)%></th> | |
|
12 | 13 | <th></th> |
|
13 | 14 | </tr></thead> |
|
14 | 15 | <tbody> |
@@ -18,6 +19,12 | |||
|
18 | 19 | <td align="center"><%= image_tag 'true.png' if status.is_default? %></td> |
|
19 | 20 | <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td> |
|
20 | 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 | 28 | <%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %> |
|
22 | 29 | </td> |
|
23 | 30 | </tr> |
@@ -11,6 +11,7 http://redmine.rubyforge.org/ | |||
|
11 | 11 | * settings are now stored in the database and editable through the application in: Admin -> Settings (config_custom.rb is no longer used) |
|
12 | 12 | * mail notifications added when a document, a file or an attachment is added |
|
13 | 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 | 15 | * added missing fields to csv export: priority, start date, due date, done ratio |
|
15 | 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 | 17 | * added back "fixed version" field on issue screen and in filters |
@@ -309,6 +309,10 label_latest_revision: Neueste Neuausgabe | |||
|
309 | 309 | label_view_revisions: Die Neuausgaben ansehen |
|
310 | 310 | label_max_size: Maximale Größe |
|
311 | 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 | 317 | button_login: Einloggen |
|
314 | 318 | button_submit: Einreichen |
@@ -332,6 +336,7 button_move: Bewegen | |||
|
332 | 336 | button_back: Rückkehr |
|
333 | 337 | button_cancel: Annullieren |
|
334 | 338 | button_activate: Aktivieren |
|
339 | button_sort: Sortieren | |
|
335 | 340 | |
|
336 | 341 | text_select_mail_notifications: Aktionen für die Mailbenachrichtigung aktiviert werden soll. |
|
337 | 342 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -309,6 +309,10 label_latest_revision: Latest revision | |||
|
309 | 309 | label_view_revisions: View revisions |
|
310 | 310 | label_max_size: Maximum size |
|
311 | 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 | 317 | button_login: Login |
|
314 | 318 | button_submit: Submit |
@@ -332,6 +336,7 button_move: Move | |||
|
332 | 336 | button_back: Back |
|
333 | 337 | button_cancel: Cancel |
|
334 | 338 | button_activate: Activate |
|
339 | button_sort: Sort | |
|
335 | 340 | |
|
336 | 341 | text_select_mail_notifications: Select actions for which mail notifications should be sent. |
|
337 | 342 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -309,6 +309,10 label_latest_revision: La revisión más última | |||
|
309 | 309 | label_view_revisions: Ver las revisiones |
|
310 | 310 | label_max_size: Tamaño máximo |
|
311 | 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 | 317 | button_login: Conexión |
|
314 | 318 | button_submit: Someter |
@@ -332,6 +336,7 button_move: Mover | |||
|
332 | 336 | button_back: Atrás |
|
333 | 337 | button_cancel: Cancelar |
|
334 | 338 | button_activate: Activar |
|
339 | button_sort: Clasificar | |
|
335 | 340 | |
|
336 | 341 | text_select_mail_notifications: Seleccionar las actividades que necesitan la activación de la notificación por mail. |
|
337 | 342 | text_regexp_info: eg. ^[A-Z0-9]+$ |
@@ -309,6 +309,10 label_latest_revision: Dernière révision | |||
|
309 | 309 | label_view_revisions: Voir les révisions |
|
310 | 310 | label_max_size: Taille maximale |
|
311 | 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 | 317 | button_login: Connexion |
|
314 | 318 | button_submit: Soumettre |
@@ -332,6 +336,7 button_move: Déplacer | |||
|
332 | 336 | button_back: Retour |
|
333 | 337 | button_cancel: Annuler |
|
334 | 338 | button_activate: Activer |
|
339 | button_sort: Trier | |
|
335 | 340 | |
|
336 | 341 | text_select_mail_notifications: Sélectionner les actions pour lesquelles la notification par mail doit être activée. |
|
337 | 342 | text_regexp_info: ex. ^[A-Z0-9]+$ |
General Comments 0
You need to be logged in to leave comments.
Login now