changed signup to subscription + more changes
This commit is contained in:
parent
c42ab39afb
commit
b6529b91d7
1 changed files with 43 additions and 3 deletions
|
@ -8,7 +8,7 @@ function membership_macro(param) {
|
|||
if (!ms)
|
||||
return;
|
||||
res.write(param.prefix);
|
||||
ms.renderLvl();
|
||||
res.write(getRole(ms.level));
|
||||
res.write(param.suffix);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ function membership_macro(param) {
|
|||
* but only if user is not a member of this weblog
|
||||
*/
|
||||
|
||||
function signuplink_macro(param) {
|
||||
function subscribelink_macro(param) {
|
||||
if (!path.weblog)
|
||||
return;
|
||||
var ms = this.get(user.name);
|
||||
|
@ -25,10 +25,50 @@ function signuplink_macro(param) {
|
|||
return;
|
||||
res.write(param.prefix);
|
||||
var linkParam = new Object();
|
||||
linkParam.to = "signup";
|
||||
linkParam.to = "subscribe";
|
||||
path.weblog.openLink(linkParam);
|
||||
res.write(param.text ? param.text : "sign up");
|
||||
this.closeLink();
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue