|URL:mailto:parazyd@dyne.org|server|port]
Date: Mon, 21 Jan 2019 22:16:57 +0100
Unify success_.html pages.
Diffstat:
M diaspora.py | 9 +++++----
A templates/success.html | 16 ++++++++++++++++
D templates/success_approve.html | 16 ----------------
D templates/success_delete.html | 18 ------------------
D templates/success_edit.html | 16 ----------------
D templates/success_hide.html | 16 ----------------
6 files changed, 21 insertions(+), 70 deletions(-)
---
[1|diff --git a/diaspora.py b/diaspora.py|/git/diasporadiaries/file/diaspora.py.gph|server|port]
t@@ -215,7 +215,7 @@ def edit():
('abstract', request.form['Abstract']),
]
sql_update_row_where(vals, 'id', request.form['Id'])
- return render_template('success_edit.html')
+ return render_template('success.html', msg='Story redacted!')
@app.route('/view')
t@@ -242,7 +242,8 @@ def delete():
if story_id:
story_id = story_id[0][0]
sql_delete_row_where('id', story_id)
- return render_template('success_delete.html')
+ return render_template('success.html',
+ msg="We're sorry you deleted your story.")
return render_template('fail.html',
msg='No story is linked to your delete key.')
t@@ -317,12 +318,12 @@ def dashboard():
add_id = request.args.get('approveid')
if add_id:
sql_update_row_where([('visible', 1)], 'id', add_id)
- return render_template('success_approve.html')
+ return render_template('success.html', msg='Story approved!')
hide_id = request.args.get('hideid')
if hide_id:
sql_update_row_where([('visible', 0)], 'id', hide_id)
- return render_template('success_hide.html')
+ return render_template('success.html', msg='Story hidden.')
act = request.args.get('list', 'pending')
[1|diff --git a/templates/success.html b/templates/success.html|/git/diasporadiaries/file/templates/success.html.gph|server|port]
t@@ -0,0 +1,16 @@
+{% include 'header.html' %}
+
+ Success | Diaspora Diaries
+
+{% include 'nav.html' %}
+
+
+
+ Success.
+
+
+ {{ msg }}
+
+
+
+{% include 'footer.html' %}
[1|diff --git a/templates/success_approve.html b/templates/success_approve.html|/git/diasporadiaries/file/templates/success_approve.html.gph|server|port]
t@@ -1,16 +0,0 @@
-{% include 'header.html' %}
-
- Approved | Diaspora Diaries
-
-{% include 'nav.html' %}
-
-
-
- Story approved!
-
-
- You can return to the dashboard now.
-
-
-
-{% include 'footer.html' %}
[1|diff --git a/templates/success_delete.html b/templates/success_delete.html|/git/diasporadiaries/file/templates/success_delete.html.gph|server|port]
t@@ -1,18 +0,0 @@
-{% include 'header.html' %}
-
- Deleted | Diaspora Diaries
-
-{% include 'nav.html' %}
-
-
-
- Story deleted!
-
-
- We're sorry you deleted your story.
-
- You can return to the homepage now.
-
-
-
-{% include 'footer.html' %}
[1|diff --git a/templates/success_edit.html b/templates/success_edit.html|/git/diasporadiaries/file/templates/success_edit.html.gph|server|port]
t@@ -1,16 +0,0 @@
-{% include 'header.html' %}
-
- Redacted | Diaspora Diaries
-
-{% include 'nav.html' %}
-
-
-
- Story redacted!
-
-
- You can return to the dashboard now.
-
-
-
-{% include 'footer.html' %}
[1|diff --git a/templates/success_hide.html b/templates/success_hide.html|/git/diasporadiaries/file/templates/success_hide.html.gph|server|port]
t@@ -1,16 +0,0 @@
-{% include 'header.html' %}
-
- Hidden | Diaspora Diaries
-
-{% include 'nav.html' %}
-
-
-
- Story hidden.
-
-
- You can return to the dashboard now.
-
-
-
-{% include 'footer.html' %}