[guadec-web-regcfp/develop] Registration list



commit 8ef1114c49690ab69ef39bf7fdeade2fae7de4b3
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date:   Fri Jun 19 22:28:49 2015 +0200

    Registration list

 routes/registration.js      |    5 ++++-
 views/registration/list.hbs |    4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/routes/registration.js b/routes/registration.js
index b739c5f..992a987 100644
--- a/routes/registration.js
+++ b/routes/registration.js
@@ -22,9 +22,12 @@ router.get('/list', function(req, res, next) {
     .findAll({
       where: {
         is_public: true
-      }
+      },
+      include: [User]
     })
     .complete(function(err, registrations) {
+      console.log("Error: " + err);
+      console.log("Registrations: " + registrations);
       res.render('registration/list', { registrations: registrations });
     });
 });
diff --git a/views/registration/list.hbs b/views/registration/list.hbs
index 31ceb33..3549acc 100644
--- a/views/registration/list.hbs
+++ b/views/registration/list.hbs
@@ -1,6 +1,6 @@
 <table>
-<tr><th>IRC Nick</th></tr>
+<tr><th>Name</th><th>IRC Nick</th></tr>
 {{#each registrations}}
-<tr><td>{{this.irc}}</td></tr>
+<tr><td>{{this.User.name}}</td><td>{{this.irc}}</td></tr>
 {{/each}}
 </table>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]