X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/409fe707a4d05f1986d7bb0c29ec977d19aa63f5..136f77bed67bd349fb73053379dcb7bae6a16592:/apps/workbench/app/views/application/_title_and_buttons.html.erb diff --git a/apps/workbench/app/views/application/_title_and_buttons.html.erb b/apps/workbench/app/views/application/_title_and_buttons.html.erb index e1ec160ec1..713c04e7f2 100644 --- a/apps/workbench/app/views/application/_title_and_buttons.html.erb +++ b/apps/workbench/app/views/application/_title_and_buttons.html.erb @@ -49,3 +49,15 @@ <% end %> <% end %> +<% + # Display any flash messages in an alert. If there is any entry with "error" key, alert-danger is used. + flash_msg = '' + flash_msg_is_error = false + flash.each do |msg| + flash_msg_is_error ||= (msg[0]=='error') + flash_msg += ('

' + msg[1] + '

') + end + if flash_msg != '' +%> +
<%=flash_msg.html_safe%>
+<% end %>