From 862097dccf4dbcbe836211da6098bb19062a690e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Thu, 2 Oct 2025 16:52:34 +0200 Subject: [PATCH] Redmine 6.1's watch icon --- app/helpers/dmsf_queries_helper.rb | 6 +++--- app/views/dmsf_context_menus/_watch.html.erb | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/helpers/dmsf_queries_helper.rb b/app/helpers/dmsf_queries_helper.rb index c5066758..10ea292a 100644 --- a/app/helpers/dmsf_queries_helper.rb +++ b/app/helpers/dmsf_queries_helper.rb @@ -133,7 +133,7 @@ module DmsfQueriesHelper end tag += content_tag('div', item.filename, class: 'dmsf-filename') if item.project.watched_by?(User.current) - tag += link_to(sprite_icon('fav', nil, icon_only: true, size: '12'), + tag += link_to(sprite_icon('unwatch', nil, icon_only: true, size: '12'), watch_path(object_type: 'project', object_id: item.project.id), title: l(:button_unwatch), method: 'delete', @@ -167,7 +167,7 @@ module DmsfQueriesHelper end tag += content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download)) if !item&.deleted? && item.watched_by?(User.current) - tag += link_to(sprite_icon('fav', nil, icon_only: true, size: '12'), + tag += link_to(sprite_icon('unwatch', nil, icon_only: true, size: '12'), watch_path(object_type: 'dmsf_folder', object_id: item.id), title: l(:button_unwatch), method: 'delete', @@ -218,7 +218,7 @@ module DmsfQueriesHelper filename = revision ? revision.formatted_name(member) : item.filename tag += content_tag('div', filename, class: 'dmsf-filename', title: l(:title_filename_for_download)) if (item.type == 'file') && !item&.deleted? && revision.dmsf_file&.watched_by?(User.current) - tag += link_to(sprite_icon('fav', nil, icon_only: true, size: '12'), + tag += link_to(sprite_icon('unwatch', nil, icon_only: true, size: '12'), watch_path(object_type: 'dmsf_file', object_id: item.id), title: l(:button_unwatch), method: 'delete', diff --git a/app/views/dmsf_context_menus/_watch.html.erb b/app/views/dmsf_context_menus/_watch.html.erb index 8cf5cbb5..8d4d6319 100644 --- a/app/views/dmsf_context_menus/_watch.html.erb +++ b/app/views/dmsf_context_menus/_watch.html.erb @@ -19,7 +19,8 @@ <% watched = object.watched_by?(User.current) %> <% css = [watcher_css([object]), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ') %> -<% text = sprite_icon('fav', watched ? l(:button_unwatch) : l(:button_watch)) %> +<% icon = watched ? 'unwatch' : 'watch' %> +<% text = watched ? l(:button_unwatch) : l(:button_watch) %> <% url = watch_path(object_type: object.class.to_s.underscore, object_id: object.id) %> <% method = watched ? 'delete' : 'post' %> -<%= context_menu_link text, url, method: method, class: css, disabled: !User.current.logged? %> +<%= context_menu_link sprite_icon(icon, text), url, method: method, class: css, disabled: !User.current.logged? %>