1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 19:47:14 +00:00

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
This commit is contained in:
Marius Balteanu 2024-12-11 06:37:58 +00:00
parent 0e56ef74c9
commit 7ae0427c9e
6 changed files with 9 additions and 6 deletions

View File

@ -1763,7 +1763,7 @@ svg.icon-ok {
stroke: #c61a1a
}
.icon-warning svg {
.icon-warning svg.icon-svg {
stroke: #e4bc4b;
}

View File

@ -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',

View File

@ -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>

View File

@ -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 } %>

View File

@ -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>

View File

@ -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