diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-14 13:41:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-14 13:41:30 +0000 |
commit | 010bfc56e15f442e4e597ddc9c436361c61b1e7a (patch) | |
tree | 498f9a9cea5fac71c0f63c1a2f92ad02ed6f6470 /app/models/issue_query.rb | |
parent | 3c9263221d3d914b3e6b5f0b8c66ebd859d75403 (diff) | |
download | redmine-010bfc56e15f442e4e597ddc9c436361c61b1e7a.tar.gz redmine-010bfc56e15f442e4e597ddc9c436361c61b1e7a.zip |
Ability to save Gantt query filters (#7836).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12020 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r-- | app/models/issue_query.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 323e46f4c..bc2ca7abe 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -97,6 +97,31 @@ class IssueQuery < Query !is_private? end + def draw_relations + r = options[:draw_relations] + r.nil? || r == '1' + end + + def draw_relations=(arg) + options[:draw_relations] = (arg == '0' ? '0' : nil) + end + + def draw_progress_line + r = options[:draw_progress_line] + r == '1' + end + + def draw_progress_line=(arg) + options[:draw_progress_line] = (arg == '1' ? '1' : nil) + end + + def build_from_params(params) + super + self.draw_relations = params[:draw_relations] || (params[:query] && params[:query][:draw_relations]) + self.draw_progress_line = params[:draw_progress_line] || (params[:query] && params[:query][:draw_progress_line]) + self + end + def initialize_available_filters principals = [] subprojects = [] |