From 24d7f9e8255eccad9346215268e91d28c5909797 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 22 Jul 2026 19:13:41 +0200 Subject: factor out flash rendering from layouts/admin --- app/views/layouts/_flash.html.erb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 app/views/layouts/_flash.html.erb (limited to 'app/views/layouts/_flash.html.erb') diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb new file mode 100644 index 00000000..a67fc866 --- /dev/null +++ b/app/views/layouts/_flash.html.erb @@ -0,0 +1,24 @@ +<% if flash.any? %> +
+ <%= flash[:notice] %> + <% if flash[:status_path] %> + <%= link_to 'Go to Status', flash[:status_path] %> + <% end %> + <% if flash[:stale_locale_path] %> + The <%= flash[:stale_locale] %> translation may be out of date — + <%= link_to 'review it', flash[:stale_locale_path] %> too. + <% end %> + <% if flash[:locked_node_path] %> + The page is locked by <%= flash[:locked_by] %> — + <%= link_to 'unlock it there', flash[:locked_node_path] %> first, + then attach from this asset's page. + <% end %> + <% if flash[:headline_kept_path] %> + The page's existing headline was kept — + <%= link_to 'change it there', flash[:headline_kept_path] %> if needed. + <% end %> + <% if flash[:error] %> + <%= flash[:error] %> + <% end %> +
+<% end %> -- cgit v1.3