1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-05-16 02:02:33 +00:00

room info: add small helper text to hint people into giving feedback

This commit is contained in:
Franzi 2023-02-28 10:14:26 +01:00
parent 16350548f5
commit 97784373c0
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 20 additions and 9 deletions

View file

@ -14,6 +14,7 @@ body {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
height: 100vh; height: 100vh;
overflow: hidden;
} }
#broadcast_tools_room_info_header, #broadcast_tools_room_info_qr { #broadcast_tools_room_info_header, #broadcast_tools_room_info_qr {
@ -38,7 +39,11 @@ body {
#broadcast_tools_room_info_qr img { #broadcast_tools_room_info_qr img {
background-color: white; background-color: white;
height: 100%; height: calc(100% - 2em);
}
#broadcast_tools_room_info_qr p {
margin-top: 1em;
} }
#l3box { #l3box {

View file

@ -43,7 +43,7 @@ function update_room_info() {
if (current_talk) { if (current_talk) {
$('#broadcast_tools_room_info_title').text(current_talk['title']); $('#broadcast_tools_room_info_title').text(current_talk['title']);
$('#broadcast_tools_room_info_speaker').text(current_talk['persons'].join(', ')); $('#broadcast_tools_room_info_speaker').text(current_talk['persons'].join(', '));
$('#broadcast_tools_room_info_qr').html('<img src="' + current_talk['feedback_qr_url'] + '" alt="Feedback QR Code">'); $('#broadcast_tools_room_info_qr').html('<img src="' + current_talk['urls']['feedback_qr'] + '" alt="Feedback QR Code"><p>Leave Feedback by scanning the code or visiting ' + current_talk['urls']['feedback'] + '</p>');
} else { } else {
$('#broadcast_tools_room_info_title').text(event_info['no_talk']); $('#broadcast_tools_room_info_title').text(event_info['no_talk']);
$('#broadcast_tools_room_info_speaker').text(''); $('#broadcast_tools_room_info_speaker').text('');

View file

@ -133,13 +133,19 @@ class BroadcastToolsScheduleView(EventPermissionRequired, ScheduleMixin, View):
else None, else None,
"room": room["name"].localize(schedule.event.locale), "room": room["name"].localize(schedule.event.locale),
"infoline": infoline.format(**placeholders(schedule, talk)), "infoline": infoline.format(**placeholders(schedule, talk)),
"feedback_qr_url": reverse( "urls": {
"plugins:pretalx_broadcast_tools:feedback_qr_id", "feedback": "{}{}".format(
kwargs={ schedule.event.custom_domain or settings.SITE_URL,
"event": schedule.event, talk.submission.urls.feedback,
"talk": talk.submission.id, ),
}, "feedback_qr": reverse(
), "plugins:pretalx_broadcast_tools:feedback_qr_id",
kwargs={
"event": schedule.event,
"talk": talk.submission.id,
},
),
},
} }
for day in schedule.data for day in schedule.data
for room in day["rooms"] for room in day["rooms"]