diff --git a/html/ptg.html b/html/ptg.html
index d58e6b8..54bf0d5 100644
--- a/html/ptg.html
+++ b/html/ptg.html
@@ -114,7 +114,7 @@
{{#if (lookup schedule time.name)}}
{{lookup schedule time.name}} |
{{else}}
- {{room}}-{{time.name}} |
+ {{roomcode schedule room time.name}} |
{{/if}}
{{/each}}
diff --git a/html/ptg.js b/html/ptg.js
index 0612dc6..94dd244 100644
--- a/html/ptg.js
+++ b/html/ptg.js
@@ -18,6 +18,13 @@ Handlebars.registerHelper('hashtag', function(options) {
return new Handlebars.SafeString(sentence);
});
+Handlebars.registerHelper('roomcode', function(schedule, room, timecode) {
+ if (schedule[timecode] == "") {
+ return room + "-" + timecode;
+ }
+ return "";
+});
+
// What is the day today ?
var now = new Date();
var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];