mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
Replaces legacy icons with SVG icons in error explanation (#41952).
git-svn-id: https://svn.redmine.org/redmine/trunk@23563 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f8292b56df
commit
a531f805f8
@ -1194,11 +1194,9 @@ input.autocomplete.ajax-loading {
|
||||
}
|
||||
|
||||
div.flash {margin-top: 8px;}
|
||||
div.flash:has(svg) {
|
||||
padding-left: 10px;
|
||||
}
|
||||
div.flash svg.icon-svg {
|
||||
div.flash svg.icon-svg, #errorExplanation svg.icon-svg {
|
||||
margin-right: 4px;
|
||||
margin-left: -26px;
|
||||
}
|
||||
|
||||
div.flash.error, #errorExplanation {
|
||||
@ -1206,13 +1204,25 @@ div.flash.error, #errorExplanation {
|
||||
border-color: #d88;
|
||||
color: #880000;
|
||||
}
|
||||
div.flash.error:not(:has(svg)), #errorExplanation {
|
||||
div.flash.error:not(:has(svg)), #errorExplanation:not(:has(svg)) {
|
||||
background: url(/exclamation.png) 8px 50% no-repeat #ffe3e3;
|
||||
}
|
||||
div.flash.error svg.icon-svg {
|
||||
div.flash.error svg.icon-svg, #errorExplanation svg.icon-svg {
|
||||
stroke: #880000;
|
||||
}
|
||||
|
||||
#errorExplanation:has(svg) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#errorExplanation:has(svg) > svg.icon-svg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
bottom: 50%;
|
||||
margin-left: -24px;
|
||||
margin-top: -9px;
|
||||
}
|
||||
|
||||
div.flash.notice {
|
||||
background-color: #dfffdf;
|
||||
border-color: #9fcf9f;
|
||||
|
||||
@ -1576,7 +1576,9 @@ module ApplicationHelper
|
||||
def render_error_messages(errors)
|
||||
html = +""
|
||||
if errors.present?
|
||||
html << "<div id='errorExplanation'><ul>\n"
|
||||
html << "<div id='errorExplanation'>\n"
|
||||
html << notice_icon('error')
|
||||
html << "<ul>\n"
|
||||
errors.each do |error|
|
||||
html << "<li>#{h error}</li>\n"
|
||||
end
|
||||
|
||||
@ -48,7 +48,11 @@ module SettingsHelper
|
||||
errors.each do |name, message|
|
||||
s << content_tag('li', content_tag('b', l("setting_#{name}")) + " " + message)
|
||||
end
|
||||
content_tag('div', content_tag('ul', s), :id => 'errorExplanation')
|
||||
|
||||
h = ''.html_safe
|
||||
h << notice_icon('error')
|
||||
h << content_tag('ul', s)
|
||||
content_tag('div', h, :id => 'errorExplanation')
|
||||
end
|
||||
|
||||
def setting_value(setting)
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
<h2><%= @status %></h2>
|
||||
|
||||
<% if @message.present? %>
|
||||
<p id="errorExplanation"><%= @message %></p>
|
||||
<p id="errorExplanation">
|
||||
<%= notice_icon('error') %>
|
||||
<%= @message %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @archived_project && User.current.admin? %>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<% if @unsaved_relations && @unsaved_relations.any? %>
|
||||
<% unsaved_relations_ids = @unsaved_relations.map(&:issue_to_id).compact.join(", ") %>
|
||||
<div id="errorExplanation">
|
||||
<%= notice_icon('error') %>
|
||||
<ul>
|
||||
<% relation_error_messages(@unsaved_relations).each do |message| %>
|
||||
<li><%= message %></li>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
<% if @saved_issues && @unsaved_issues.present? %>
|
||||
<div id="errorExplanation">
|
||||
<%= notice_icon('error') %>
|
||||
<span>
|
||||
<%= l(:notice_failed_to_save_issues,
|
||||
:count => @unsaved_issues.size,
|
||||
@ -241,6 +242,7 @@
|
||||
|
||||
<% if @values_by_custom_field.present? %>
|
||||
<div class="flash warning">
|
||||
<%= notice_icon('warning') %>
|
||||
<%= l(:warning_fields_cleared_on_bulk_edit) %>:<br />
|
||||
<%= safe_join(@values_by_custom_field.map {|field, ids| content_tag "span", "#{field.name} (#{ids.size})"}, ', ') %>
|
||||
</div>
|
||||
|
||||
@ -51,7 +51,10 @@
|
||||
</table>
|
||||
</div>
|
||||
<% else %>
|
||||
<p id="errorExplanation"><%= @error_message %></p>
|
||||
<p id="errorExplanation">
|
||||
<%= notice_icon('error') %>
|
||||
<%= @error_message %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:button_annotate)) -%>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
<% if @unsaved_time_entries.present? %>
|
||||
<div id="errorExplanation">
|
||||
<%= notice_icon('error') %>
|
||||
<span>
|
||||
<%= l(:notice_failed_to_save_time_entries,
|
||||
:count => @unsaved_time_entries.size,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user