fixed add member option (still needs some tweakin', though)

This commit is contained in:
Tobi Schäfer 2004-01-03 17:43:52 +00:00
parent a8498b46c5
commit 489351fe48
2 changed files with 11 additions and 7 deletions

View file

@ -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;
}
/**

View file

@ -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);