[guadec-web-regcfp] Show author info in admin list
- From: Patrick Uiterwijk <puiterwijk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [guadec-web-regcfp] Show author info in admin list
- Date: Thu, 21 May 2015 11:09:36 +0000 (UTC)
commit e7aecbaf7f15fe08ab8053d747ddbd595b28ce92
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date: Thu May 21 13:09:21 2015 +0200
Show author info in admin list
routes/papers.js | 3 ++-
views/papers/list.hbs | 3 +++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/routes/papers.js b/routes/papers.js
index cddbcbb..19b0a4e 100644
--- a/routes/papers.js
+++ b/routes/papers.js
@@ -135,9 +135,10 @@ router.get('/list', function(req, res, next) {
router.all('/admin/list', utils.require_permission('papers/list/all'));
router.get('/admin/list', function(req, res, next) {
- Paper.findAll()
+ Paper.findAll({include: [User]})
.complete(function(err, papers) {
res.render('papers/list', { description: 'All',
+ showAuthors: true,
papers: papers });
});
});
diff --git a/views/papers/list.hbs b/views/papers/list.hbs
index e92c7c4..b694a83 100644
--- a/views/papers/list.hbs
+++ b/views/papers/list.hbs
@@ -2,6 +2,9 @@
{{#each papers}}
<b>{{ this.title }}</b>
+ {{#if ../showAuthors}}
+ ({{ this.User.name }})
+ {{/if}}
-
{{ breaklines this.summary }}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]