From 98523273e557ccddb1585aabc06ded2e55c9cc2b Mon Sep 17 00:00:00 2001 From: Richard Enlow Date: Thu, 18 Jul 2013 16:09:08 -0700 Subject: [PATCH] Added event metrics route and action. --- assets/css/events.less | 1 + assets/css/events/metrics.less | 3 + controllers/events.js | 4 ++ routes.js | 2 +- views/events/metrics.html | 123 +-------------------------------- 5 files changed, 10 insertions(+), 123 deletions(-) create mode 100644 assets/css/events/metrics.less diff --git a/assets/css/events.less b/assets/css/events.less index dbd45bb..d60e0e5 100644 --- a/assets/css/events.less +++ b/assets/css/events.less @@ -3,6 +3,7 @@ @import "events/map"; @import "events/party"; @import "events/admin"; +@import "events/metrics"; body#events { * { box-sizing: border-box; } diff --git a/assets/css/events/metrics.less b/assets/css/events/metrics.less new file mode 100644 index 0000000..56fd3fb --- /dev/null +++ b/assets/css/events/metrics.less @@ -0,0 +1,3 @@ +body#events.metrics { + +} diff --git a/controllers/events.js b/controllers/events.js index cda9208..1460ee1 100644 --- a/controllers/events.js +++ b/controllers/events.js @@ -149,6 +149,10 @@ module.exports = function(init) { }) }); }); + }, + metrics: function(req, res) + { + res.reply('metrics'); } }; diff --git a/routes.js b/routes.js index fd0955d..f2e47db 100644 --- a/routes.js +++ b/routes.js @@ -5,9 +5,9 @@ module.exports = function (C, app) { // Admin Interface route( 'GET', '/events/admin', C.Events.admin ); + route( 'GET', '/events/metrics', C.Events.metrics ); route( 'GET', '/events', C.Events.index ); - route( 'GET', '/events/metrics', C.Events.metrics ); route( 'GET', '/events/:id', C.Events.details ); route( 'POST', '/events', C.Events.create ); route( 'PATCH', '/events/:id', C.Events.change ); diff --git a/views/events/metrics.html b/views/events/metrics.html index 926ed5f..cd38eb6 100644 --- a/views/events/metrics.html +++ b/views/events/metrics.html @@ -1,128 +1,7 @@ {% extends "events/layout.html" %} -{% block title %}{{ event.title }}{% endblock %} +{% block title %}Event Metrics{% endblock %} {% block body %} -{{ super() }} -
- -
-
- - -
-

{{ event.title }}

- -
- {% if email and event.organizer == email %} -
- - - - -
- {% endif %} -
- {% if event.beginDate or event.endDate or event.beginTime %} - -
- -
-
- {{ event.beginDate }} - {% if event.beginDate and event.endDate %} - {% endif %} - {{ event.endDate }} -
-
- {{ event.beginTime }} - {% if event.beginTime and event.endTime %} - {% endif %} - {{ event.endTime }} -
-
-
-
- {% endif %} - -
- {% if event.address %} - - -
{{ event.address }}
-
- {% endif %} - -
-
-
- - Organized by {{ event.organizerId }} -
-
- {{ event.description|markdown|safe }} - - -
-
-
-
-
{% endblock %}