Display session tags on voting page
authorMagnus Hagander <magnus@hagander.net>
Thu, 10 Jul 2025 09:24:27 +0000 (11:24 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 10 Jul 2025 09:27:37 +0000 (11:27 +0200)
postgresqleu/confreg/views.py
template/confreg/sessionvotes.html

index 30bab7a32dc941df5447ddf9b593ab226bc5283c..e7f7a51425667fbd26fa188ce4f17504af1f4b7c 100644 (file)
@@ -2877,7 +2877,8 @@ def talkvote(request, confname):
   avg,
   COALESCE(votes, '{{}}'::jsonb) AS votes,
   jsonb_build_object(%(username)s, '') || COALESCE(comments, '{{}}'::jsonb) AS comments,
-  trackname, recordingconsent
+  trackname, recordingconsent,
+  (SELECT array_agg(tag) FROM confreg_conferencesessiontag t INNER JOIN confreg_conferencesession_tags cst ON cst.conferencesessiontag_id=t.id WHERE cst.conferencesession_id=s.id) AS tags
 FROM confreg_conferencesession s
 INNER JOIN confreg_status_strings status ON status.id=s.status
 LEFT JOIN confreg_track track ON track.id=s.track_id
index fd5ac053f75c979f74b795cebd557b46bb8bacb8..53e11e016e63dab12ddbd187dd8c74c4829ba079 100644 (file)
@@ -278,6 +278,9 @@ ul.comments span.username {
 {%endif%}
         <div><strong>Speakers:</strong> {%for sp in s.speakerdata%}{{sp.fullname}}{%if sp.company%} ({{sp.company}}){%endif%}{%if not forloop.last%}, {%endif%}{%endfor%}</div>
         <div><strong>Track:</strong> {{s.trackname|default:""}}</div>
+{%if conference.callforpaperstags%}
+   <div><strong>Tags:</strong> {%for t in s.tags%}<span class="label label-primary">{{t}}</span> {%endfor%}</div><br/>
+{%endif%}
 {%if conference.callforpapersrecording%}
         <div><strong>Recording consent:</strong> {{s.recordingconsent | yesno:"Yes,No" }}
 {%endif%}       <br/>