##// END OF EJS Templates
Add a user preference to choose how comments/replies are displayed: in chronological or reverse chronological order (#589, #776)....
Jean-Philippe Lang -
r1183:e951d8458413
parent child
Show More
@@ -92,6 +92,8 class IssuesController < ApplicationController
92 def show
92 def show
93 @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| @issue.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x, :customized => @issue) }
93 @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| @issue.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x, :customized => @issue) }
94 @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
94 @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
95 @journals.each_with_index {|j,i| j.indice = i+1}
96 @journals.reverse! if User.current.wants_comments_in_reverse_order?
95 @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
97 @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
96 @edit_allowed = User.current.allowed_to?(:edit_issues, @project)
98 @edit_allowed = User.current.allowed_to?(:edit_issues, @project)
97 @activities = Enumeration::get_values('ACTI')
99 @activities = Enumeration::get_values('ACTI')
@@ -29,6 +29,8 class MessagesController < ApplicationController
29
29
30 # Show a topic and its replies
30 # Show a topic and its replies
31 def show
31 def show
32 @replies = @topic.children
33 @replies.reverse! if User.current.wants_comments_in_reverse_order?
32 @reply = Message.new(:subject => "RE: #{@message.subject}")
34 @reply = Message.new(:subject => "RE: #{@message.subject}")
33 render :action => "show", :layout => false if request.xhr?
35 render :action => "show", :layout => false if request.xhr?
34 end
36 end
@@ -36,6 +36,8 class NewsController < ApplicationController
36 end
36 end
37
37
38 def show
38 def show
39 @comments = @news.comments
40 @comments.reverse! if User.current.wants_comments_in_reverse_order?
39 end
41 end
40
42
41 def new
43 def new
@@ -23,6 +23,7 class Journal < ActiveRecord::Base
23
23
24 belongs_to :user
24 belongs_to :user
25 has_many :details, :class_name => "JournalDetail", :dependent => :delete_all
25 has_many :details, :class_name => "JournalDetail", :dependent => :delete_all
26 attr_accessor :indice
26
27
27 acts_as_searchable :columns => 'notes',
28 acts_as_searchable :columns => 'notes',
28 :include => :issue,
29 :include => :issue,
@@ -144,6 +144,10 class User < ActiveRecord::Base
144 self.pref.time_zone.nil? ? nil : TimeZone[self.pref.time_zone]
144 self.pref.time_zone.nil? ? nil : TimeZone[self.pref.time_zone]
145 end
145 end
146
146
147 def wants_comments_in_reverse_order?
148 self.pref[:comments_sorting] == 'desc'
149 end
150
147 # Return user's RSS key (a 40 chars long string), used to access feeds
151 # Return user's RSS key (a 40 chars long string), used to access feeds
148 def rss_key
152 def rss_key
149 token = self.rss_token || Token.create(:user => self, :action => 'feeds')
153 token = self.rss_token || Token.create(:user => self, :action => 'feeds')
@@ -46,4 +46,7 class UserPreference < ActiveRecord::Base
46 self.others.store attr_name, value
46 self.others.store attr_name, value
47 end
47 end
48 end
48 end
49
50 def comments_sorting; self[:comments_sorting] end
51 def comments_sorting=(order); self[:comments_sorting]=order end
49 end
52 end
@@ -1,8 +1,7
1 <% note_id = 1 %>
2 <% for journal in journals %>
1 <% for journal in journals %>
3 <div id="change-<%= journal.id %>">
2 <div id="change-<%= journal.id %>">
4 <h4><div style="float:right;"><%= link_to "##{note_id}", :anchor => "note-#{note_id}" %></div>
3 <h4><div style="float:right;"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
5 <%= content_tag('a', '', :name => "note-#{note_id}")%>
4 <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
6 <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
5 <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
7 <ul>
6 <ul>
8 <% for detail in journal.details %>
7 <% for detail in journal.details %>
@@ -11,5 +10,4
11 </ul>
10 </ul>
12 <%= render_notes(journal) unless journal.notes.blank? %>
11 <%= render_notes(journal) unless journal.notes.blank? %>
13 </div>
12 </div>
14 <% note_id += 1 %>
15 <% end %>
13 <% end %>
@@ -1,6 +1,6
1 <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%=h @message.subject %></h2>
1 <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%=h @message.subject %></h2>
2
2
3 <% form_for :message, @message, :url => {:action => 'edit'}, :html => {:multipart => true} do |f| %>
3 <% form_for :message, @message, :url => {:action => 'edit'}, :html => {:multipart => true} do |f| %>
4 <%= render :partial => 'form', :locals => {:f => f} %>
4 <%= render :partial => 'form', :locals => {:f => f, :replying => !@message.parent.nil?} %>
5 <%= submit_tag l(:button_save) %>
5 <%= submit_tag l(:button_save) %>
6 <% end %>
6 <% end %>
@@ -15,11 +15,11
15 <br />
15 <br />
16
16
17 <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3>
17 <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3>
18 <% @topic.children.each do |message| %>
18 <% @replies.each do |message| %>
19 <a name="<%= "message-#{message.id}" %>"></a>
19 <a name="<%= "message-#{message.id}" %>"></a>
20 <div class="contextual">
20 <div class="contextual">
21 <%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => message}, :class => 'icon icon-edit' %>
21 <%= link_to_if_authorized image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit) %>
22 <%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %>
22 <%= link_to_if_authorized image_tag('delete.png'), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :title => l(:button_delete) %>
23 </div>
23 </div>
24 <div class="message reply">
24 <div class="message reply">
25 <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4>
25 <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4>
@@ -15,11 +15,6
15 <p><%= f.text_field :lastname, :required => true %></p>
15 <p><%= f.text_field :lastname, :required => true %></p>
16 <p><%= f.text_field :mail, :required => true %></p>
16 <p><%= f.text_field :mail, :required => true %></p>
17 <p><%= f.select :language, lang_options_for_select %></p>
17 <p><%= f.select :language, lang_options_for_select %></p>
18
19 <% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
20 <p><%= pref_fields.select :time_zone, TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
21 <p><%= pref_fields.check_box :hide_mail %></p>
22 <% end %>
23 </div>
18 </div>
24
19
25 <%= submit_tag l(:button_save) %>
20 <%= submit_tag l(:button_save) %>
@@ -38,6 +33,15
38 <% end %>
33 <% end %>
39 <p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p>
34 <p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p>
40 </div>
35 </div>
36
37 <h3><%=l(:label_preferences)%></h3>
38 <div class="box tabular">
39 <% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
40 <p><%= pref_fields.check_box :hide_mail %></p>
41 <p><%= pref_fields.select :time_zone, TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
42 <p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
43 <% end %>
44 </div>
41 </div>
45 </div>
42 <% end %>
46 <% end %>
43
47
@@ -34,14 +34,15
34
34
35 <div id="comments" style="margin-bottom:16px;">
35 <div id="comments" style="margin-bottom:16px;">
36 <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
36 <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
37 <% @news.comments.each do |comment| %>
37 <% @comments.each do |comment| %>
38 <% next if comment.new_record? %>
38 <% next if comment.new_record? %>
39 <h4><%= authoring comment.created_on, comment.author %></h4>
40 <div class="contextual">
39 <div class="contextual">
41 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
40 <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment},
41 :confirm => l(:text_are_you_sure), :method => :post, :title => l(:button_delete) %>
42 </div>
42 </div>
43 <h4><%= authoring comment.created_on, comment.author %></h4>
43 <%= textilizable(comment.comments) %>
44 <%= textilizable(comment.comments) %>
44 <% end if @news.comments_count > 0 %>
45 <% end if @comments.any? %>
45 </div>
46 </div>
46
47
47 <% if authorize_for 'news', 'add_comment' %>
48 <% if authorize_for 'news', 'add_comment' %>
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -609,3 +609,7 enumeration_issue_priorities: Ticket-Prioritäten
609 enumeration_doc_categories: Dokumentenkategorien
609 enumeration_doc_categories: Dokumentenkategorien
610 enumeration_activities: Aktivitäten (Zeiterfassung)
610 enumeration_activities: Aktivitäten (Zeiterfassung)
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -177,6 +177,7 field_column_names: Columns
177 field_time_zone: Time zone
177 field_time_zone: Time zone
178 field_searchable: Searchable
178 field_searchable: Searchable
179 field_default_value: Default value
179 field_default_value: Default value
180 field_comments_sorting: Afficher les commentaires
180
181
181 setting_app_title: Application title
182 setting_app_title: Application title
182 setting_app_subtitle: Application subtitle
183 setting_app_subtitle: Application subtitle
@@ -501,6 +502,9 label_ldap_authentication: LDAP authentication
501 label_downloads_abbr: D/L
502 label_downloads_abbr: D/L
502 label_optional_description: Optional description
503 label_optional_description: Optional description
503 label_add_another_file: Add another file
504 label_add_another_file: Add another file
505 label_preferences: Preferences
506 label_chronological_order: In chronological order
507 label_reverse_chronological_order: In reverse chronological order
504
508
505 button_login: Login
509 button_login: Login
506 button_submit: Submit
510 button_submit: Submit
@@ -611,3 +611,7 text_assign_time_entries_to_project: Assign reported hours to the project
611 text_destroy_time_entries: Delete reported hours
611 text_destroy_time_entries: Delete reported hours
612 text_reassign_time_entries: 'Reassign reported hours to this issue:'
612 text_reassign_time_entries: 'Reassign reported hours to this issue:'
613 setting_activity_days_default: Days displayed on project activity
613 setting_activity_days_default: Days displayed on project activity
614 label_chronological_order: In chronological order
615 field_comments_sorting: Afficher les commentaires
616 label_reverse_chronological_order: In reverse chronological order
617 label_preferences: Preferences
@@ -612,3 +612,7 text_destroy_time_entries: Delete reported hours
612 text_reassign_time_entries: 'Reassign reported hours to this issue:'
612 text_reassign_time_entries: 'Reassign reported hours to this issue:'
613 label_on: 'on'
613 label_on: 'on'
614 setting_activity_days_default: Days displayed on project activity
614 setting_activity_days_default: Days displayed on project activity
615 label_chronological_order: In chronological order
616 field_comments_sorting: Afficher les commentaires
617 label_reverse_chronological_order: In reverse chronological order
618 label_preferences: Preferences
@@ -177,6 +177,7 field_column_names: Colonnes
177 field_time_zone: Fuseau horaire
177 field_time_zone: Fuseau horaire
178 field_searchable: Utilisé pour les recherches
178 field_searchable: Utilisé pour les recherches
179 field_default_value: Valeur par défaut
179 field_default_value: Valeur par défaut
180 field_comments_sorting: Afficher les commentaires
180
181
181 setting_app_title: Titre de l'application
182 setting_app_title: Titre de l'application
182 setting_app_subtitle: Sous-titre de l'application
183 setting_app_subtitle: Sous-titre de l'application
@@ -501,6 +502,9 label_ldap_authentication: Authentification LDAP
501 label_downloads_abbr: D/L
502 label_downloads_abbr: D/L
502 label_optional_description: Description facultative
503 label_optional_description: Description facultative
503 label_add_another_file: Ajouter un autre fichier
504 label_add_another_file: Ajouter un autre fichier
505 label_preferences: Préférences
506 label_chronological_order: Dans l'ordre chronologique
507 label_reverse_chronological_order: Dans l'ordre chronologique inverse
504
508
505 button_login: Connexion
509 button_login: Connexion
506 button_submit: Soumettre
510 button_submit: Soumettre
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -609,3 +609,7 label_optional_description: Optional description
609 text_destroy_time_entries: Delete reported hours
609 text_destroy_time_entries: Delete reported hours
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -608,3 +608,7 label_last_month: last month
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -609,3 +609,7 text_assign_time_entries_to_project: Assign reported hours to the project
609 text_destroy_time_entries: Delete reported hours
609 text_destroy_time_entries: Delete reported hours
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -609,3 +609,7 text_assign_time_entries_to_project: Assign reported hours to the project
609 text_destroy_time_entries: Delete reported hours
609 text_destroy_time_entries: Delete reported hours
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -608,3 +608,7 text_assign_time_entries_to_project: Assign reported hours to the project
608 text_destroy_time_entries: Delete reported hours
608 text_destroy_time_entries: Delete reported hours
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
609 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 setting_activity_days_default: Days displayed on project activity
610 setting_activity_days_default: Days displayed on project activity
611 label_chronological_order: In chronological order
612 field_comments_sorting: Afficher les commentaires
613 label_reverse_chronological_order: In reverse chronological order
614 label_preferences: Preferences
@@ -612,3 +612,7 text_assign_time_entries_to_project: Прикрепить зарегистрир
612 text_destroy_time_entries: Удалить зарегистрированное время
612 text_destroy_time_entries: Удалить зарегистрированное время
613 text_reassign_time_entries: 'Перенести зарегистрированное время на следующую задачу:'
613 text_reassign_time_entries: 'Перенести зарегистрированное время на следующую задачу:'
614 setting_activity_days_default: Days displayed on project activity
614 setting_activity_days_default: Days displayed on project activity
615 label_chronological_order: In chronological order
616 field_comments_sorting: Afficher les commentaires
617 label_reverse_chronological_order: In reverse chronological order
618 label_preferences: Preferences
@@ -609,3 +609,7 text_assign_time_entries_to_project: Assign reported hours to the project
609 text_destroy_time_entries: Delete reported hours
609 text_destroy_time_entries: Delete reported hours
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -609,3 +609,7 text_assign_time_entries_to_project: Assign reported hours to the project
609 text_destroy_time_entries: Delete reported hours
609 text_destroy_time_entries: Delete reported hours
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
610 text_reassign_time_entries: 'Reassign reported hours to this issue:'
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -610,3 +610,7 text_assign_time_entries_to_project: Assign reported hours to the project
610 text_destroy_time_entries: Delete reported hours
610 text_destroy_time_entries: Delete reported hours
611 text_reassign_time_entries: 'Reassign reported hours to this issue:'
611 text_reassign_time_entries: 'Reassign reported hours to this issue:'
612 setting_activity_days_default: Days displayed on project activity
612 setting_activity_days_default: Days displayed on project activity
613 label_chronological_order: In chronological order
614 field_comments_sorting: Afficher les commentaires
615 label_reverse_chronological_order: In reverse chronological order
616 label_preferences: Preferences
@@ -609,3 +609,7 enumeration_issue_priorities: 項目優先權
609 enumeration_doc_categories: 文件分類
609 enumeration_doc_categories: 文件分類
610 enumeration_activities: 活動 (time tracking)
610 enumeration_activities: 活動 (time tracking)
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -609,3 +609,7 enumeration_issue_priorities: 问题优先级
609 enumeration_doc_categories: 文档类别
609 enumeration_doc_categories: 文档类别
610 enumeration_activities: 活动(时间跟踪)
610 enumeration_activities: 活动(时间跟踪)
611 setting_activity_days_default: Days displayed on project activity
611 setting_activity_days_default: Days displayed on project activity
612 label_chronological_order: In chronological order
613 field_comments_sorting: Afficher les commentaires
614 label_reverse_chronological_order: In reverse chronological order
615 label_preferences: Preferences
@@ -144,4 +144,12 class UserTest < Test::Unit::TestCase
144 @jsmith.reload
144 @jsmith.reload
145 assert !@jsmith.projects.first.recipients.include?(@jsmith.mail)
145 assert !@jsmith.projects.first.recipients.include?(@jsmith.mail)
146 end
146 end
147
148 def test_comments_sorting_preference
149 assert !@jsmith.wants_comments_in_reverse_order?
150 @jsmith.pref.comments_sorting = 'asc'
151 assert !@jsmith.wants_comments_in_reverse_order?
152 @jsmith.pref.comments_sorting = 'desc'
153 assert @jsmith.wants_comments_in_reverse_order?
154 end
147 end
155 end
General Comments 0
You need to be logged in to leave comments. Login now