From f1b2465e820ff98745748466909035071947118a Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 13 Aug 2023 13:29:32 +0100 Subject: [PATCH] Add sorting links to profile page --- app/templates/users/profile.html | 44 ++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/app/templates/users/profile.html b/app/templates/users/profile.html index 4524bb6d..34024e62 100644 --- a/app/templates/users/profile.html +++ b/app/templates/users/profile.html @@ -199,19 +199,37 @@ {% endif %} -{% if current_user == user or user.check_perm(current_user, "CHANGE_AUTHOR") %} - - - {{ _("Create package") }} - -{% endif %} -{% if current_user == user or (current_user.is_authenticated and current_user.rank.at_least(current_user.rank.EDITOR)) %} - - {{ _("View list of tags") }} - -{% endif %} +
+ {% if packages %} +
+ + {{ _("Alphabetical") }} + + + {{ _("Downloads") }} + + + {{ _("Newest") }} + +
+ {% if current_user == user or (current_user.is_authenticated and current_user.rank.at_least(current_user.rank.EDITOR)) %} + + {{ _("View list of tags") }} + + {% endif %} + {% endif %} + {% if current_user == user or user.check_perm(current_user, "CHANGE_AUTHOR") %} + + + {{ _("Create package") }} + + {% endif %} +
+

{{ _("Packages") }}

{% from "macros/packagegridtile.html" import render_pkggrid %}