]> source.dussan.org Git - redmine.git/commitdiff
Replaces icon-sorted-asc and icon-sorted-desc with SVG icons (#23980).
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 8 Sep 2024 17:25:49 +0000 (17:25 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 8 Sep 2024 17:25:49 +0000 (17:25 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@23042 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/assets/stylesheets/application.css
app/helpers/queries_helper.rb
app/helpers/sort_helper.rb

index c3ce852c230bd3b9ec0480b9214db4e519530395..1df43a74bbfc11999332b8a48c792109ca557b99 100644 (file)
@@ -1776,8 +1776,8 @@ span.icon-label {
 .icon-bookmark:not(:has(svg)) { background-image: url(/tag_blue_delete.png); }
 .icon-bookmark-off:not(:has(svg)) { background-image: url(/tag_blue_add.png); }
 .icon-bookmarked-project:not(:has(svg)) { background-image: url(/tag_blue.png); }
-.icon-sorted-asc { background-image: url(/arrow_down.png); }
-.icon-sorted-desc { background-image: url(/arrow_up.png); }
+.icon-sorted-asc:not(:has(svg)) { background-image: url(/arrow_down.png); }
+.icon-sorted-desc:not(:has(svg)) { background-image: url(/arrow_up.png); }
 .icon-toggle-plus { background-image: url(/bullet_toggle_plus.png) }
 .icon-toggle-minus { background-image: url(/bullet_toggle_minus.png) }
 .icon-clear-query:not(:has(svg)) { background-image: url(/close_hl.png); }
index 26d1ee48be08463cbaaa7aba7ed72da3e0e038e0..2712b61518404340ce31ff388bd2ffaa4ae56b3a 100644 (file)
@@ -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
         )
index 603f0f9f2b2099fcb0ac8138477425b4172bfd48..b827c61c41aa510793db8a47007b317587a8bf7d 100644 (file)
@@ -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