summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-29 18:32:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-29 18:32:41 +0000
commit9f148e098b07e95e2d7088844b111bb8c1280d87 (patch)
treeffe2d6ff1f819c95f1ac2491508e451b39d9d199 /app/helpers
parent1fc324b74c089e2d74d0ba189aee80316f7cad68 (diff)
downloadredmine-9f148e098b07e95e2d7088844b111bb8c1280d87.tar.gz
redmine-9f148e098b07e95e2d7088844b111bb8c1280d87.zip
Ability to sort issues by grouped column (#3511).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10765 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/sort_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb
index 9fda5982b..fd797951a 100644
--- a/app/helpers/sort_helper.rb
+++ b/app/helpers/sort_helper.rb
@@ -89,6 +89,10 @@ module SortHelper
sql.blank? ? nil : sql
end
+ def to_a
+ @criteria.dup
+ end
+
def add!(key, asc)
@criteria.delete_if {|k,o| k == key}
@criteria = [[key, asc]] + @criteria
@@ -182,6 +186,10 @@ module SortHelper
@sort_criteria.to_sql
end
+ def sort_criteria
+ @sort_criteria
+ end
+
# Returns a link which sorts by the named column.
#
# - column is the name of an attribute in the sorted record collection.