added isViewAllowed()-function, using isViewAllowed()-function
This commit is contained in:
parent
8917586e68
commit
8bc35091c1
1 changed files with 4 additions and 5 deletions
|
@ -1,30 +1,29 @@
|
|||
/**
|
||||
* function checks if a link to the given group makes sense
|
||||
*/
|
||||
|
||||
|
||||
function renderCalendarDay(currGroupname,text) {
|
||||
var now = new Date();
|
||||
var currGroup = this.get(currGroupname);
|
||||
if (currGroup && currGroup.size()) {
|
||||
if (this.isUserAdmin() || this.isUserContributor())
|
||||
if (this.isUserAdmin())
|
||||
var linkit = true;
|
||||
else {
|
||||
var linkit = false;
|
||||
if (currGroupname <= now.format("yyyyMMdd")) {
|
||||
for (var i=0;i<currGroup.size();i++) {
|
||||
if (currGroup.get(i).isOnline())
|
||||
if (currGroup.get(i).isOnline() || currGroup.get(i).isViewAllowed())
|
||||
linkit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (linkit) {
|
||||
var text = "<a href=\"" + this.href("main") + "?show=" + currGroupname + "\">" + text + "</a>";
|
||||
var text = "<a href=\"" + currGroup.href() + "\">" + text + "</a>";
|
||||
}
|
||||
}
|
||||
return (text);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function renders image-tag
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue