added isViewAllowed()-function, using isViewAllowed()-function

This commit is contained in:
Robert Gaggl 2001-08-15 09:04:30 +00:00
parent 8917586e68
commit 8bc35091c1

View file

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