From fb8726bb08b1b27f6f312d099bcf2148160fa79f Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Wed, 26 Mar 2025 22:13:26 +0000 Subject: [PATCH] Merged r23562-r23565 and r23565 from trunk to 6.0-stable (#41952). git-svn-id: https://svn.redmine.org/redmine/branches/6.0-stable@23569 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/assets/stylesheets/application.css | 37 ++++++++++++++++++++++-- app/assets/stylesheets/rtl.css | 17 +++++++---- app/helpers/application_helper.rb | 6 ++-- app/helpers/icons_helper.rb | 11 +++++++ app/helpers/settings_helper.rb | 6 +++- app/views/common/error.html.erb | 5 +++- app/views/issue_relations/_form.html.erb | 1 + app/views/issues/_conflict.html.erb | 1 + app/views/issues/bulk_edit.html.erb | 2 ++ app/views/repositories/annotate.html.erb | 5 +++- app/views/timelog/bulk_edit.html.erb | 1 + 11 files changed, 78 insertions(+), 14 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 3c31b0318..846e3adc9 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1191,28 +1191,59 @@ input.autocomplete.ajax-loading { } div.flash {margin-top: 8px;} +div.flash svg.icon-svg, #errorExplanation svg.icon-svg, .conflict svg.icon-svg { + margin-right: 4px; + margin-left: -26px; +} div.flash.error, #errorExplanation { - background: url(/exclamation.png) 8px 50% no-repeat; background-color: #ffe3e3; border-color: #d88; color: #880000; } +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, #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: url(/true.png) 8px 5px no-repeat; background-color: #dfffdf; border-color: #9fcf9f; color: #005f00; } +div.flash.notice:not(:has(svg)) { + background: url(/true.png) 8px 50% no-repeat #dfffdf; +} +div.flash.notice svg.icon-svg { + stroke: #005f00; +} div.flash.warning, .conflict { - background: url(/warning.png) 8px 5px no-repeat; background-color: #F3EDD1; border-color: #eadbbc; color: #A6750C; text-align: left; } +div.flash.warning:not(:has(svg)), .conflict:not(:has(svg)) { + background: url(/warning.png) 8px 5px no-repeat #F3EDD1; +} +div.flash.warning svg.icon-svg, .conflict svg.icon-svg { + stroke: #A6750C; +} .nodata, .warning { text-align: center; diff --git a/app/assets/stylesheets/rtl.css b/app/assets/stylesheets/rtl.css index 83b08b23b..550071462 100644 --- a/app/assets/stylesheets/rtl.css +++ b/app/assets/stylesheets/rtl.css @@ -241,16 +241,21 @@ input.autocomplete { padding: 4px 30px 4px 4px; } -div.flash.error, #errorExplanation { - background: url(/exclamation.png) right 8px top 50% no-repeat; +div.flash svg.icon-svg, #errorExplanation svg.icon-svg { + margin-right: -26px; + margin-left: 4px; } -div.flash.notice { - background: url(/true.png) right 8px top 5px no-repeat; +div.flash.error:not(:has(svg)), #errorExplanation:not(:has(svg)) { + background: url(/exclamation.png) right 8px top 50% no-repeat #ffe3e3; } -div.flash.warning, .conflict { - background: url(/warning.png) right 8px top 5px no-repeat; +div.flash.notice:not(:has(svg)) { + background: url(/true.png) right 8px top 5px no-repeat #dfffdf; +} + +div.flash.warning:not(:has(svg)), .conflict { + background: url(/warning.png) right 8px top 5px no-repeat #F3EDD1; text-align:right; } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7e8c764dd..26a1941ac 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -511,7 +511,7 @@ module ApplicationHelper def render_flash_messages s = +'' flash.each do |k, v| - s << content_tag('div', v.html_safe, :class => "flash #{k}", :id => "flash_#{k}") + s << content_tag('div', notice_icon(k) + v.html_safe, :class => "flash #{k}", :id => "flash_#{k}") end s.html_safe end @@ -1569,7 +1569,9 @@ module ApplicationHelper def render_error_messages(errors) html = +"" if errors.present? - html << "