tUnify success_.html pages. - diasporadiaries - a platform for writing stories with personal accounts and messages [h|git clone git://parazyd.org/diasporadiaries.git|URL:git://parazyd.org/diasporadiaries.git|server|port] [1|Log|/git/diasporadiaries/log.gph|server|port] [1|Files|/git/diasporadiaries/files.gph|server|port] [1|Refs|/git/diasporadiaries/refs.gph|server|port] [1|Submodules|/git/diasporadiaries/file/.gitmodules.gph|server|port] [1|README|/git/diasporadiaries/file/README.md.gph|server|port] [1|LICENSE|/git/diasporadiaries/file/LICENSE.gph|server|port] --- [1|commit 06db3518cac83a68ba50fc46f4ae6f0e12f90612|/git/diasporadiaries/commit/06db3518cac83a68ba50fc46f4ae6f0e12f90612.gph|server|port] [1|parent 412325db64ae974bc748357565ce78c6c972498c|/git/diasporadiaries/commit/412325db64ae974bc748357565ce78c6c972498c.gph|server|port] [h|Author: parazyd |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' %}