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 + + + + + +
+
+
+
+ + + + + + + + +