fixed add member option (still needs some tweakin', though)
This commit is contained in:
parent
a8498b46c5
commit
489351fe48
2 changed files with 11 additions and 7 deletions
|
@ -2,9 +2,13 @@
|
|||
* main action
|
||||
*/
|
||||
function main_action() {
|
||||
this.renderView(this, "Members");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
function add_action() {
|
||||
res.data.action = this.href(req.action);
|
||||
res.data.title = "Members of " + this._parent.title;
|
||||
|
||||
if (req.data.keyword) {
|
||||
try {
|
||||
var result = this.searchUser(req.data.keyword);
|
||||
|
@ -35,10 +39,11 @@ function main_action() {
|
|||
res.redirect(result.obj.href("edit"));
|
||||
res.redirect(this.href());
|
||||
}
|
||||
} else
|
||||
res.data.memberlist = this.renderMemberlist();
|
||||
res.data.body = this.renderSkinAsString("main");
|
||||
this._parent.renderSkin("page");
|
||||
}
|
||||
res.data.title = "Search members of " + this._parent.title;
|
||||
res.data.body = this.renderSkinAsString("new");
|
||||
res.handlers.context.renderSkin("page");
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,6 @@ function renderMemberlist() {
|
|||
* @param String Title to use
|
||||
*/
|
||||
function renderView(collection, title) {
|
||||
res.data.action = this.href(req.action);
|
||||
res.data.title = title + " of " + this._parent.title;
|
||||
res.data.memberlist = renderList(collection, "mgrlistitem", 10, req.data.page);
|
||||
res.data.pagenavigation = renderPageNavigation(collection, this.href(req.action), 10, req.data.page);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue