]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/_flash.html.erb
Merge remote-tracking branch 'upstream/pull/6261'
[rails.git] / app / views / layouts / _flash.html.erb
1 <% [[:error, :danger], [:warning, :warning], [:notice, :success]].each do |flash_type, bootstrap_type| %>
2   <% if flash[flash_type] %>
3     <%= tag.div :class => "alert alert-dismissible alert-#{bootstrap_type} mb-0 rounded-0",
4                 :data => { :turbo_temporary => true } do %>
5       <div class="d-flex gap-3 align-items-center">
6         <div class="d-flex">
7           <%= inline_svg_tag "icons/notice.svg" %>
8         </div>
9         <div>
10           <%= render_flash flash[flash_type] %>
11         </div>
12       </div>
13       <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="<%= t("javascripts.close") %>"></button>
14     <% end %>
15   <% end %>
16 <% end %>