changed signup to subscription + more changes

This commit is contained in:
Robert Gaggl 2002-01-22 19:50:36 +00:00
parent c42ab39afb
commit b6529b91d7

View file

@ -8,7 +8,7 @@ function membership_macro(param) {
if (!ms) if (!ms)
return; return;
res.write(param.prefix); res.write(param.prefix);
ms.renderLvl(); res.write(getRole(ms.level));
res.write(param.suffix); res.write(param.suffix);
} }
@ -17,7 +17,7 @@ function membership_macro(param) {
* but only if user is not a member of this weblog * but only if user is not a member of this weblog
*/ */
function signuplink_macro(param) { function subscribelink_macro(param) {
if (!path.weblog) if (!path.weblog)
return; return;
var ms = this.get(user.name); var ms = this.get(user.name);
@ -25,10 +25,50 @@ function signuplink_macro(param) {
return; return;
res.write(param.prefix); res.write(param.prefix);
var linkParam = new Object(); var linkParam = new Object();
linkParam.to = "signup"; linkParam.to = "subscribe";
path.weblog.openLink(linkParam); path.weblog.openLink(linkParam);
res.write(param.text ? param.text : "sign up"); res.write(param.text ? param.text : "sign up");
this.closeLink(); this.closeLink();
res.write(param.suffix); res.write(param.suffix);
} }
/**
* macro renders a link to signup-action
* but only if user is not a member of this weblog
*/
function subscriptionslink_macro(param) {
if (!user.size())
return;
res.write(param.prefix);
var linkParam = new Object();
linkParam.to = "subscriptions";
this.openLink(linkParam);
res.write(param.text ? param.text : "subscriptions");
this.closeLink();
res.write(param.suffix);
}
/**
* macro renders the list of all members of this weblog
*/
function memberlist_macro(param) {
res.write(param.prefix)
var currLvl;
var sp = new Object();
sp.list = "";
for (var i=0;i<this.size();i++) {
var m = this.get(i);
if (m.level != currLvl) {
this.renderSkin("membergroup",sp);
sp.list = "";
sp.group = getRole(parseInt(m.level,10)); // m.getLvl();
currLvl = m.level;
}
sp.list += m.renderSkinAsString("preview");
}
this.renderSkin("membergroup",sp);
res.write(param.suffix);
}