client/home: view featured post, add search form

This commit is contained in:
rr-
2016-05-29 12:28:52 +02:00
parent 6d6cce20dd
commit 53fd6fb29b
10 changed files with 310 additions and 20 deletions

View File

@ -24,13 +24,22 @@ class HomeController {
api.get('/info')
.then(response => {
this._homeView.render({
canListPosts: api.hasPrivilege('posts:list'),
canListComments: api.hasPrivilege('comments:list'),
canListTags: api.hasPrivilege('tags:list'),
canListUsers: api.hasPrivilege('users:list'),
diskUsage: response.diskUsage,
postCount: response.postCount,
featuredPost: response.featuredPost,
});
},
response => {
this._homeView.render({});
this._homeView.render({
canListPosts: api.hasPrivilege('posts:list'),
canListComments: api.hasPrivilege('comments:list'),
canListTags: api.hasPrivilege('tags:list'),
canListUsers: api.hasPrivilege('users:list'),
});
events.notify(events.Error, response.description);
});
}