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