From b2b075f96d73d60f46c0011d1a1e38b9ba30bfd2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 30 Jul 2021 13:05:20 +0200 Subject: [PATCH] dffd --- drama/routes/votes.py | 4 +-- drama/templates/admin/votes.html | 61 -------------------------------- drama/templates/votes.html | 49 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 63 deletions(-) delete mode 100644 drama/templates/admin/votes.html create mode 100644 drama/templates/votes.html diff --git a/drama/routes/votes.py b/drama/routes/votes.py index ce23e27ec0..bcccd5dd5c 100644 --- a/drama/routes/votes.py +++ b/drama/routes/votes.py @@ -11,7 +11,7 @@ def admin_vote_info_get(v): if v and v.is_banned and not v.unban_utc: return render_template("seized.html") link = request.args.get("link") - if not link: return render_template("admin/votes.html", v=v) + if not link: return render_template("votes.html", v=v) ids = re.search("://[^/]+\w+/post/(\w+)/[^/]+(/(\w+))?", link) @@ -54,7 +54,7 @@ def admin_vote_info_get(v): else: abort(400) - return render_template("admin/votes.html", + return render_template("votes.html", v=v, thing=thing, ups=ups, diff --git a/drama/templates/admin/votes.html b/drama/templates/admin/votes.html deleted file mode 100644 index 3fb2437f1a..0000000000 --- a/drama/templates/admin/votes.html +++ /dev/null @@ -1,61 +0,0 @@ -{% extends "default.html" %} - -{% block title %} -Drama - -{% endblock %} - -{% block content %} -

Vote Info

- -
- - - -
- -{% if thing %} - -

Info

-

{{thing.permalink}}

-

Author: @{{thing.author.username}}

-

Author Created At: {{thing.author.created_utc}} ({{thing.author.created_datetime}} UTC)

-

Counted Upvotes: {{thing.upvotes}} out of {{ups | length}}

-

Counted Downvotes: {{thing.downvotes}} out of {{downs | length}}

- -

Upvotes

- - - - - - - - {% for vote in ups %} - - - - {% endfor %} -
User
{{vote.user.username}}
- -

Downvotes

- - - - - - - - {% for vote in downs %} - - - - {% endfor %} -
User
{{vote.user.username}}
- - - -{% endif %} - - -{% endblock %} \ No newline at end of file diff --git a/drama/templates/votes.html b/drama/templates/votes.html new file mode 100644 index 0000000000..194da1eb62 --- /dev/null +++ b/drama/templates/votes.html @@ -0,0 +1,49 @@ +{% extends "default.html" %} + +{% block title %} +Drama + +{% endblock %} + +{% block content %} +

Vote Info

+ +
+ + + +
+ +{% if thing %} + +

Info

+

{{thing.permalink}}

+

Author: @{{thing.author.username}}

+

Author Created At: {{thing.author.created_utc}} ({{thing.author.created_datetime}} UTC)

+

Upvotes:{{ups | length}}

+

Downvotes:{{downs | length}}

+ +

Upvotes

+ + + + {% for vote in ups %} + + {% endfor %} +
User
{{vote.user.username}}
+ +

Downvotes

+ + + + {% for vote in downs %} + + {% endfor %} +
User
{{vote.user.username}}
+ + + +{% endif %} + + +{% endblock %} \ No newline at end of file