summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-09-08 17:25:49 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-09-08 17:25:49 +0000
commit09938ac490b22507516882f3723cbc13d906b26b (patch)
tree0820fc9d172eaa64b58b1788ab74256ee3e57b53 /app/helpers
parent166540d743be89d5544870b69bab7b6a46ca3a9c (diff)
downloadredmine-09938ac490b22507516882f3723cbc13d906b26b.tar.gz
redmine-09938ac490b22507516882f3723cbc13d906b26b.zip
Replaces icon-sorted-asc and icon-sorted-desc with SVG icons (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23042 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/queries_helper.rb4
-rw-r--r--app/helpers/sort_helper.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
index 26d1ee48b..2712b6151 100644
--- a/app/helpers/queries_helper.rb
+++ b/app/helpers/queries_helper.rb
@@ -205,9 +205,11 @@ module QueriesHelper
if column.name.to_s == query.sort_criteria.first_key
if query.sort_criteria.first_asc?
css = 'sort asc icon icon-sorted-desc'
+ icon = 'angle-up'
order = 'desc'
else
css = 'sort desc icon icon-sorted-asc'
+ icon = 'angle-down'
order = 'asc'
end
end
@@ -223,7 +225,7 @@ module QueriesHelper
end
content =
link_to(
- column.caption,
+ icon_with_label(icon, column.caption),
{:params => request.query_parameters.deep_merge(sort_param)},
link_options
)
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb
index 603f0f9f2..b827c61c4 100644
--- a/app/helpers/sort_helper.rb
+++ b/app/helpers/sort_helper.rb
@@ -116,16 +116,18 @@ module SortHelper
if column.to_s == @sort_criteria.first_key
if @sort_criteria.first_asc?
css = 'sort asc icon icon-sorted-desc'
+ icon = 'angle-up'
order = 'desc'
else
css = 'sort desc icon icon-sorted-asc'
+ icon = 'angle-down'
order = 'asc'
end
end
caption = column.to_s.humanize unless caption
sort_options = {:sort => @sort_criteria.add(column.to_s, order).to_param}
- link_to(caption, {:params => request.query_parameters.merge(sort_options)}, :class => css)
+ link_to(icon_with_label(icon, caption), {:params => request.query_parameters.merge(sort_options)}, :class => css)
end
# Returns a table header <th> tag with a sort link for the named column