From 183a41fedeac16f969e42432e19af8bc69f1d18e Mon Sep 17 00:00:00 2001 From: Mindiell Date: Sun, 23 Apr 2023 18:52:52 +0200 Subject: [PATCH] Separation of status and score in order to be able to sort on score. Closes #22 --- cfp/models.py | 2 +- cfp/templates/cfp/staff/talk_list.html | 6 +++--- cfp/views.py | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cfp/models.py b/cfp/models.py index d233574..697887a 100644 --- a/cfp/models.py +++ b/cfp/models.py @@ -387,7 +387,7 @@ class Talk(PonyConfModel): elif self.accepted is False: return _('Refused') else: - return _('Pending decision, score: %(score).1f') % {'score': self.score} + return _('Pending decision') def get_status_color(self): if self.accepted is True: diff --git a/cfp/templates/cfp/staff/talk_list.html b/cfp/templates/cfp/staff/talk_list.html index 5c40947..1a5ef33 100644 --- a/cfp/templates/cfp/staff/talk_list.html +++ b/cfp/templates/cfp/staff/talk_list.html @@ -58,6 +58,7 @@ {% trans "Track" %} {% trans "Tags" %} {% trans "Status" %} + {% trans "Score" %} @@ -84,9 +85,8 @@ {{ talk.track|default:"–" }} {{ talk.get_tags_html }} - - {{ talk.get_status_str }} - + {{ talk.get_status_str }} + {{ talk.score }} {% if forloop.last%} diff --git a/cfp/views.py b/cfp/views.py index d688fbf..be8c71a 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -730,6 +730,7 @@ def talk_list(request): 'title': 'title', 'category': 'category', 'status': 'accepted', + 'score': 'score', } sort = request.GET.get('sort') if sort in SORT_MAPPING.keys(): -- 2.30.2