From: Tom Hughes Date: Tue, 10 Sep 2024 17:30:02 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/5180' X-Git-Tag: live~257 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/039b3e1c3226689e72ad4c15e80c2f35b91b87f0?hp=173ed570b9ac982692e9da14772363ff1aa928b0 Merge remote-tracking branch 'upstream/pull/5180' --- diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb index d8adbd0fd..8a7ed6fe4 100644 --- a/app/views/layouts/_flash.html.erb +++ b/app/views/layouts/_flash.html.erb @@ -1,26 +1,13 @@ -<% if flash[:error] %> -
-
- <%= notice_svg_tag %> -
-
<%= render_flash(flash[:error]) %>
-
-<% end %> - -<% if flash[:warning] %> -
-
- <%= notice_svg_tag %> -
-
<%= render_flash(flash[:warning]) %>
-
-<% end %> - -<% if flash[:notice] %> -
-
- <%= notice_svg_tag %> -
-
<%= render_flash(flash[:notice]) %>
-
+<% [[:error, :danger], [:warning, :warning], [:notice, :success]].each do |flash_type, bootstrap_type| %> + <% if flash[flash_type] %> + <%= tag.div :class => "alert alert-#{bootstrap_type} row mx-0 mb-0 p-3 rounded-0 align-items-center", + :data => { :turbo_temporary => true } do %> +
+ <%= notice_svg_tag %> +
+
+ <%= render_flash flash[flash_type] %> +
+ <% end %> + <% end %> <% end %>