From 55956246a220fae48b43781049cdcc09b3353431 Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Thu, 8 Feb 2018 14:32:09 +0100 Subject: [PATCH] Add page for digital PTG signage This renders the same ptg.json data in a specific page that will be used for digital signage at the event. Change-Id: I126799a40b2b753096c8366d6fde93d1fbf2ae3d --- html/ptg.html | 2 +- html/ptg.js | 8 ++++-- html/signage.html | 73 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 html/signage.html diff --git a/html/ptg.html b/html/ptg.html index 55dc12a..2a709a5 100644 --- a/html/ptg.html +++ b/html/ptg.html @@ -81,7 +81,7 @@ {{#if (roomactive @root.scheduled @root.additional room times)}} {{room}} {{#each (lookup @root.slots day) as |time|}} - {{ roomcode @root.scheduled @root.additional room time.name }} + {{ roomcode @root.scheduled @root.additional room time.name 0 }} {{/each}} {{/if}} diff --git a/html/ptg.js b/html/ptg.js index 8344d1d..51b6c9d 100644 --- a/html/ptg.js +++ b/html/ptg.js @@ -34,7 +34,7 @@ Handlebars.registerHelper('roomactive', }); Handlebars.registerHelper('roomcode', - function(scheduled, additional, room, timecode) { + function(scheduled, additional, room, timecode, s) { var cell = ''; content = scheduled[room][timecode]; if ((content != undefined) && (content != '')) { @@ -46,7 +46,11 @@ Handlebars.registerHelper('roomcode', console.log(additional[room][timecode]); if (additional[room][timecode] != undefined) { if (additional[room][timecode] == "") { - cell = '' + room + "-" + timecode + ''; + if (s == 1) { + cell = 'Available for booking'; + } else { + cell = '' + room + "-" + timecode + ''; + } } else { cell = ' + + + + OpenStack PTG tracks for today + + + + + +
+
+
+
+ + + + + + + + +