diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-29 21:46:40 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-29 21:46:40 +0000 |
commit | ffce07e78556580e503a93d6f8decb25a15823b7 (patch) | |
tree | 740ea59d0469c5857408641df9a32d5f2a7aac39 /app/helpers/watchers_helper.rb | |
parent | fdd90bab2b02d6fdd08a860808560eb2cf382af6 (diff) | |
download | redmine-ffce07e78556580e503a93d6f8decb25a15823b7.tar.gz redmine-ffce07e78556580e503a93d6f8decb25a15823b7.zip |
Start working on replacing old icons with SVG icons (#23980):
* Introduces IconsHelper with methods to render SVG icon from a sprite file.
* Adds SVG sprite file with icons mainly from Font Awesome, but also from Material Design Icons and Fluent UI System Icons (based on the work made by Takashi Kato (@tohosaku)).
* Replaces specific icons with new SVG icons.
* Temporarily keep all old CSS icon definitions for backard compatibility.
git-svn-id: https://svn.redmine.org/redmine/trunk@22988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/watchers_helper.rb')
-rw-r--r-- | app/helpers/watchers_helper.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 8afd5af31..2071879e3 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -25,7 +25,8 @@ module WatchersHelper return '' unless objects.any? watched = Watcher.any_watched?(objects, user) - css = [watcher_css(objects), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ') + icon = watched ? 'fav' : 'fav-off' + css = [watcher_css(objects), '', 'icon', icon].join(' ') text = watched ? l(:button_unwatch) : l(:button_watch) url = watch_path( :object_type => objects.first.class.to_s.underscore, @@ -33,7 +34,7 @@ module WatchersHelper ) method = watched ? 'delete' : 'post' - link_to text, url, :remote => true, :method => method, :class => css + link_to icon_with_label(icon, text), url, :remote => true, :method => method, :class => css end # Returns the css class used to identify watch links for a given +object+ @@ -61,7 +62,7 @@ module WatchersHelper :object_id => object.id, :user_id => user} s << ' ' - s << link_to(l(:button_delete), url, + s << link_to(icon_with_label('del', l(:button_delete)), url, :remote => true, :method => 'delete', :class => "delete icon-only icon-del", :title => l(:button_delete)) |