* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann
* @version Release: @package_version@
*/
/**
* Include parent class
*/
require_once("class.Bootstrap.php");
/**
* Class which outputs the html page for FolderAccess view
*
* @category DMS
* @package SeedDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_View_FolderAccess extends SeedDMS_Bootstrap_Style {
function printAccessModeSelection($defMode) { /* {{{ */
print "\n";
} /* }}} */
function show() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$allUsers = $this->params['allusers'];
$allGroups = $this->params['allgroups'];
$rootfolderid = $this->params['rootfolderid'];
$this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))));
$this->globalNavigation($folder);
$this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
?>
contentHeading(getMLText("edit_folder_access"));
$this->contentContainerStart();
if ($user->isAdmin()) {
$this->contentSubHeading(getMLText("set_owner"));
?>
getID() != $rootfolderid && $folder->getParent()){
$this->contentSubHeading(getMLText("access_inheritance"));
if ($folder->inheritsAccess()) {
printMLText("inherits_access_msg");
?>
contentContainerEnd();
$this->htmlEndPage();
return;
}
?>
getAccessList();
$this->contentSubHeading(getMLText("default_access"));
?>
contentSubHeading(getMLText("edit_existing_access"));
if ((count($accessList["users"]) != 0) || (count($accessList["groups"]) != 0)) {
print "";
foreach ($accessList["users"] as $userAccess) {
$userObj = $userAccess->getUser();
print "\n";
print "![](\"images/usericon.gif\") | \n";
print "". htmlspecialchars($userObj->getFullName()) . " | \n";
print "\n";
print "\n";
print "
\n";
}
foreach ($accessList["groups"] as $groupAccess) {
$groupObj = $groupAccess->getGroup();
$mode = $groupAccess->getMode();
print "";
print "![](\"images/groupicon.gif\") | ";
print "". htmlspecialchars($groupObj->getName()) . " | ";
print "";
print "";
print "
\n";
}
print "
";
}
?>
contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>