From e63507e1adf4faa25e7b99f09a27279bf2ac5669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20B=C4=82LTEANU?= Date: Mon, 9 Dec 2024 03:27:24 +0200 Subject: [PATCH] WIP diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index a45f821b6..ebd5dfe09 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1206,6 +1206,34 @@ div.flash.warning, .conflict { text-align: left; } +div.flash.error, #errorExplanation, div.flash.notice, div.flash.warning, .conflict { + &:has(svg){ + background-image: none; + padding-left: 4px; + } + + &.errorMessages svg { + position: absolute; + margin-top: 1em; + } + + .conflict-details { + padding-left: 18px; + } +} + +div.flash.notice:has(svg) svg { + stroke: #005f00; + stroke-width: 2px; + margin-right: 4px; +} +div.flash.warning:has(svg) svg, .conflict:has(svg) svg { + stroke: #A6750C; +} +div.flash.error:has(svg) svg, #errorExplanation:has(svg) svg { + stroke: #880000; +} + .nodata, .warning { text-align: center; background-color: #F3EDD1; @@ -1218,6 +1246,7 @@ div.flash.warning, .conflict { .conflict-details {font-size:93%;} + /***** Ajax indicator ******/ #ajax-indicator { position: absolute; /* fixed not supported by IE */ diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d708019c9..074e9a6d1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -510,7 +510,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 @@ -1568,7 +1568,7 @@ module ApplicationHelper def render_error_messages(errors) html = +"" if errors.present? - html << "