From d2e62ed5b66659085b64dc7c220dcdf90a118f88 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 4 Jun 2018 18:53:44 +0200 Subject: [PATCH] Add delete and block in the UI --- app.py | 5 +++++ templates/utils.html | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/app.py b/app.py index f0677e1..be06f0e 100644 --- a/app.py +++ b/app.py @@ -142,6 +142,11 @@ def quote_plus(t): return urllib.parse.quote_plus(t) +@app.template_filter() +def is_from_outbox(t): + return t.startswith(ID) + + @app.template_filter() def clean(html): return clean_html(html) diff --git a/templates/utils.html b/templates/utils.html index 2535e9c..4d7ce89 100644 --- a/templates/utils.html +++ b/templates/utils.html @@ -125,6 +125,26 @@ {% endif %} {% endif %} + +{% if session.logged_in %} +{% if item.activity.id | is_from_outbox %} +
+ + + + +
+{% else %} +
+ + + + +
+{% endif %} +{% endif %} + + {% if likes or shares %}