diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-22 19:13:41 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-22 19:13:41 +0200 |
| commit | 24d7f9e8255eccad9346215268e91d28c5909797 (patch) | |
| tree | 700a5d349cc94673df28ba7f7fa54982939bcb47 /app/views/layouts/_flash.html.erb | |
| parent | f929caffdaeac836c32819e9d5fcf2433b4a797a (diff) | |
factor out flash rendering from layouts/admin
Diffstat (limited to 'app/views/layouts/_flash.html.erb')
| -rw-r--r-- | app/views/layouts/_flash.html.erb | 24 |
1 files changed, 24 insertions, 0 deletions
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 @@ | |||
| 1 | <% if flash.any? %> | ||
| 2 | <div id="flash"> | ||
| 3 | <%= flash[:notice] %> | ||
| 4 | <% if flash[:status_path] %> | ||
| 5 | <%= link_to 'Go to Status', flash[:status_path] %> | ||
| 6 | <% end %> | ||
| 7 | <% if flash[:stale_locale_path] %> | ||
| 8 | The <%= flash[:stale_locale] %> translation may be out of date — | ||
| 9 | <%= link_to 'review it', flash[:stale_locale_path] %> too. | ||
| 10 | <% end %> | ||
| 11 | <% if flash[:locked_node_path] %> | ||
| 12 | <span class="warning">The page is locked by <%= flash[:locked_by] %> — | ||
| 13 | <%= link_to 'unlock it there', flash[:locked_node_path] %> first, | ||
| 14 | then attach from this asset's page.</span> | ||
| 15 | <% end %> | ||
| 16 | <% if flash[:headline_kept_path] %> | ||
| 17 | <span class="warning">The page's existing headline was kept — | ||
| 18 | <%= link_to 'change it there', flash[:headline_kept_path] %> if needed.</span> | ||
| 19 | <% end %> | ||
| 20 | <% if flash[:error] %> | ||
| 21 | <span id="flash_error"><%= flash[:error] %></span> | ||
| 22 | <% end %> | ||
| 23 | </div> | ||
| 24 | <% end %> | ||
