cartodb-4.29/app/views/shared/_flash_message.html.erb

14 lines
776 B
Plaintext
Raw Normal View History

2020-06-15 10:58:47 +08:00
<% error_message = local_assigns[:error_message] %>
<% if flash[:success] %>
<%= render(partial: 'shared/flash_single_message', locals: { message_class: 'success', message: flash[:success], detail: flash[:success_detail] }) %>
<% end %>
<% if error_message || flash[:error] %>
<%= render(partial: 'shared/flash_single_message', locals: { message_class: 'error', message: error_message || flash[:error], detail: flash[:error_detail] }) %>
<% end %>
<% if flash[:warning] %>
<%= render(partial: 'shared/flash_single_message', locals: { message_class: 'warning', message: flash[:warning], detail: flash[:warning_detail] }) %>
<% end %>
<% if cookies[:flash] %>
<%= render(partial: 'shared/flash_single_message', locals: { message: cookies[:flash] }) %>
<% end %>