diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-12-11 06:37:58 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-12-11 06:37:58 +0000 |
commit | 7ae0427c9ee891820954dfbd72c129d65989b3e8 (patch) | |
tree | 5b2db1c623cdf8ce46ea50ed2670bbad6cdcef1f | |
parent | 0e56ef74c95538620c34cb5c4c5546ad9b1e8a25 (diff) | |
download | redmine-7ae0427c9ee891820954dfbd72c129d65989b3e8.tar.gz redmine-7ae0427c9ee891820954dfbd72c129d65989b3e8.zip |
Replaces warning icon with SVG in watcher list and workflow warnings (#41918).
Patch by Takenori TAKAKI (user:takenory).
git-svn-id: https://svn.redmine.org/redmine/trunk@23388 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/assets/stylesheets/application.css | 2 | ||||
-rw-r--r-- | app/helpers/watchers_helper.rb | 2 | ||||
-rw-r--r-- | app/views/issue_statuses/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/issues/_attributes.html.erb | 2 | ||||
-rw-r--r-- | app/views/trackers/index.html.erb | 2 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 5 |
6 files changed, 9 insertions, 6 deletions
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 8590db99a..e385964fb 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1763,7 +1763,7 @@ svg.icon-ok { stroke: #c61a1a } -.icon-warning svg { +.icon-warning svg.icon-svg { stroke: #e4bc4b; } diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 00afd30ae..882325c18 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -52,7 +52,7 @@ module WatchersHelper s << avatar(user, :size => "16").to_s if user.is_a?(User) s << link_to_principal(user, class: user.class.to_s.downcase) if object.respond_to?(:visible?) && user.is_a?(User) && !object.visible?(user) - s << content_tag('span', l(:notice_invalid_watcher), class: 'icon-only icon-warning', title: l(:notice_invalid_watcher)) + s << content_tag('span', sprite_icon('warning', l(:notice_invalid_watcher)), class: 'icon-only icon-warning', title: l(:notice_invalid_watcher)) end if remove_allowed url = {:controller => 'watchers', diff --git a/app/views/issue_statuses/index.html.erb b/app/views/issue_statuses/index.html.erb index a8f7a055f..c38e3b88b 100644 --- a/app/views/issue_statuses/index.html.erb +++ b/app/views/issue_statuses/index.html.erb @@ -28,7 +28,7 @@ <td> <% unless WorkflowTransition.where('old_status_id = ? OR new_status_id = ?', status.id, status.id).exists? %> <span class="icon icon-warning"> - <%= l(:text_status_no_workflow) %> (<%= link_to l(:button_edit), edit_workflows_path(:used_statuses_only => 0) %>) + <%= sprite_icon('warning', l(:text_status_no_workflow)) %> (<%= link_to l(:button_edit), edit_workflows_path(:used_statuses_only => 0) %>) </span> <% end %> </td> diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 65637e51f..970767460 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -9,7 +9,7 @@ :title => @issue.status.description %> <%= content_tag 'a', sprite_icon('help', l(:label_open_issue_statuses_description)), :class => 'icon-only icon-help', :title => l(:label_open_issue_statuses_description), :onclick => "showModal('issue_statuses_description', '500px'); return false;", :href => '#' if @allowed_statuses.any? {|s| s.description.present? } %> <% if @issue.transition_warning %> - <span class="icon-only icon-warning" title="<%= @issue.transition_warning %>"><%= @issue.transition_warning %></span> + <span class="icon-only icon-warning" title="<%= @issue.transition_warning %>"><%= sprite_icon('warning', l(:notice_issue_not_closable_by_open_tasks)) %></span> <% end %> </p> <%= render partial: 'issues/issue_status_description', locals: { issue_statuses: @allowed_statuses } %> diff --git a/app/views/trackers/index.html.erb b/app/views/trackers/index.html.erb index 5896f5388..12dc0aa4c 100644 --- a/app/views/trackers/index.html.erb +++ b/app/views/trackers/index.html.erb @@ -22,7 +22,7 @@ <td> <% unless tracker.workflow_rules.exists? %> <span class="icon icon-warning"> - <%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), edit_workflows_path(:tracker_id => tracker) %>) + <%= sprite_icon('warning', l(:text_tracker_no_workflow)) %> (<%= link_to l(:button_edit), edit_workflows_path(:tracker_id => tracker) %>) </span> <% end %> </td> diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index fbe512122..643345eac 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -5993,7 +5993,10 @@ class IssuesControllerTest < Redmine::ControllerTest assert_response :success reason = l(:notice_issue_not_closable_by_blocking_issue) - assert_select 'span.icon-warning[title=?]', reason, :text => reason + assert_select 'span.icon-warning[title=?]', reason do + assert_select "svg.icon-svg use:match('href', ?)", /assets\/icons-\w+.svg#icon--warning/ + assert_select 'span.icon-label', test: reason + end end def test_get_edit_should_display_visible_spent_time_custom_field |