changeset 953:e04f2ad5f931

admin: Show flashed messages on edit and publish pages.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 05 Oct 2017 20:36:05 -0700
parents 94fd4f07da83
children d709429f02eb
files piecrust/admin/templates/edit_page.html piecrust/admin/templates/publish.html
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/admin/templates/edit_page.html	Thu Oct 05 00:29:14 2017 -0700
+++ b/piecrust/admin/templates/edit_page.html	Thu Oct 05 20:36:05 2017 -0700
@@ -3,6 +3,17 @@
 {% extends 'layouts/default.html' %}
 
 {% block content %}
+{% with messages = get_flashed_messages() %}
+{% if messages %}
+<div>
+    {% for message in messages %}
+    <p class="bg-info">{{message}}</p>
+    {% endfor %}
+</div>
+{% endif %}
+{% endwith %}
+
+
 <form action="{{url_postback}}" method="POST" class="ft-write-form" id="ft-write-form">
     <div class="row">
         <div class="col-sm-10 col-sm-offset-1">
--- a/piecrust/admin/templates/publish.html	Thu Oct 05 00:29:14 2017 -0700
+++ b/piecrust/admin/templates/publish.html	Thu Oct 05 20:36:05 2017 -0700
@@ -3,6 +3,12 @@
 {% block content %}
 <h1>Publish {{site_title}}</h1>
 
+{% with messages = get_flashed_messages() %}
+{% for message in messages %}
+<p class="bg-info">{{message}}</p>
+{% endfor %}
+{% endwith %}
+
 {% for target in targets %}
 <div>
     <h3>{{target.name}}</h3>