From 35f34fedbb2073e9048327f6afc37a88f6a2148c Mon Sep 17 00:00:00 2001 From: jkaplon Date: Fri, 24 Jul 2015 14:41:00 -0400 Subject: [PATCH] Split date and time on device detail screen, relates to issue #24. --- server.js | 2 ++ views/core.hbs | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 1d1fc7a..75cc84a 100644 --- a/server.js +++ b/server.js @@ -150,6 +150,8 @@ app.get('/core/:id', function(req, res){ var localDtTm = moment.utc(row.published_at); localDtTm = moment(localDtTm).tz('America/New_York').format('MM-DD-YYYY HH:mm:ss'); row.published_at = localDtTm; + row.pubDate = moment(localDtTm).format('MM-DD-YYYY'); + row.pubTime = moment(localDtTm).format('h:mm:ss a'); }); res.render('core', {alerts: rows}, function(err, html) { diff --git a/views/core.hbs b/views/core.hbs index e135a59..32f8809 100644 --- a/views/core.hbs +++ b/views/core.hbs @@ -16,14 +16,16 @@ - + + {{#each alerts}} - + + {{/each}}
TimestampDateTime Status
{{this.published_at}}{{this.pubDate}}{{this.pubTime}} {{this.status}}