- modified main_action to use global renderList() and renderPageNavigation()
- added offline_action() and mystories_action()
This commit is contained in:
parent
699b857bd1
commit
9d4676a0c9
1 changed files with 24 additions and 2 deletions
|
@ -2,8 +2,30 @@
|
|||
* main action
|
||||
*/
|
||||
function main_action() {
|
||||
this.renderStorylist(parseInt(req.data.start, 10), req.data.show);
|
||||
res.data.title = "Stories of " + this._parent.title;
|
||||
res.data.storylist = renderList(this, this.renderManagerView, 10, req.data.page);
|
||||
res.data.pagenavigation = renderPageNavigation(this, this.href(), 10, req.data.page);
|
||||
res.data.title = "Online stories of " + this._parent.title;
|
||||
res.data.body = this.renderSkinAsString("main");
|
||||
this._parent.renderSkin("page");
|
||||
}
|
||||
|
||||
function offline_action() {
|
||||
res.data.storylist = renderList(this.offline, this.renderManagerView, 10, req.data.start);
|
||||
res.data.pagenavigation = renderPageNavigation(this.offline, this.href(req.action), 10, req.data.page);
|
||||
res.data.title = "Online stories of " + this._parent.title;
|
||||
res.data.body = this.renderSkinAsString("main");
|
||||
this._parent.renderSkin("page");
|
||||
}
|
||||
|
||||
/**
|
||||
* list all stories of a user inside the site the
|
||||
* membership belongs to
|
||||
*/
|
||||
function mystories_action() {
|
||||
var ms = this._parent.members.get(session.user.name);
|
||||
res.data.storylist = renderList(ms.stories, this.renderManagerView, 10, req.data.page);
|
||||
res.data.pagenavigation = renderPageNavigation(ms.stories, this.href(req.action), 10, req.data.page);
|
||||
res.data.title = "My stories in " + this._parent.title;
|
||||
res.data.body = this.renderSkinAsString("main");
|
||||
this._parent.renderSkin("page");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue