summaryrefslogtreecommitdiffstats
path: root/app/models/user_preference.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-05-20 22:26:30 +0000
committerGo MAEDA <maeda@farend.jp>2019-05-20 22:26:30 +0000
commit29403e710a8d0d83c81387f236082f209f3ba7ed (patch)
tree5e396ddcc22d5f7f93b75970340e0197a145f825 /app/models/user_preference.rb
parentda78e654f13b9b13e1584bac91dae9631c12f63e (diff)
downloadredmine-29403e710a8d0d83c81387f236082f209f3ba7ed.tar.gz
redmine-29403e710a8d0d83c81387f236082f209f3ba7ed.zip
Adds favorites and recently used projects lists to project jump box (#31355).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@18181 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user_preference.rb')
-rw-r--r--app/models/user_preference.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb
index d55b8ac58..7cb9b0ca6 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -32,7 +32,8 @@ class UserPreference < ActiveRecord::Base
'comments_sorting',
'warn_on_leaving_unsaved',
'no_self_notified',
- 'textarea_font'
+ 'textarea_font',
+ 'recently_used_projects'
TEXTAREA_FONT_OPTIONS = ['monospace', 'proportional']
@@ -90,6 +91,9 @@ class UserPreference < ActiveRecord::Base
def textarea_font; self[:textarea_font] end
def textarea_font=(value); self[:textarea_font]=value; end
+ def recently_used_projects; (self[:recently_used_projects] || 3).to_i; end
+ def recently_used_projects=(value); self[:recently_used_projects] = value.to_i; end
+
# Returns the names of groups that are displayed on user's page
# Example:
# preferences.my_page_groups