mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 13:11:31 +00:00
separate page content in 3 columns
This commit is contained in:
parent
c7a02f2ff1
commit
fd06a08807
|
@ -30,14 +30,18 @@ require_once("class.Bootstrap.php");
|
||||||
* @version Release: @package_version@
|
* @version Release: @package_version@
|
||||||
*/
|
*/
|
||||||
class SeedDMS_View_DocumentAccess extends SeedDMS_Bootstrap_Style {
|
class SeedDMS_View_DocumentAccess extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
function printAccessModeSelection($defMode) { /* {{{ */
|
function printAccessModeSelection($defMode) { /* {{{ */
|
||||||
print "<select name=\"mode\">\n";
|
echo self::getAccessModeSelection($defMode);
|
||||||
print "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "</option>\n";
|
} /* }}} */
|
||||||
print "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "</option>\n";
|
|
||||||
print "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "</option>\n";
|
function getAccessModeSelection($defMode) { /* {{{ */
|
||||||
print "\t<option value=\"".M_ALL."\"" . (($defMode == M_ALL) ? " selected" : "") . ">" . getMLText("access_mode_all") . "</option>\n";
|
$content = "<select name=\"mode\">\n";
|
||||||
print "</select>\n";
|
$content .= "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "</option>\n";
|
||||||
|
$content .= "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "</option>\n";
|
||||||
|
$content .= "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "</option>\n";
|
||||||
|
$content .= "\t<option value=\"".M_ALL."\"" . (($defMode == M_ALL) ? " selected" : "") . ">" . getMLText("access_mode_all") . "</option>\n";
|
||||||
|
$content .= "</select>\n";
|
||||||
|
return $content;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function js() { /* {{{ */
|
function js() { /* {{{ */
|
||||||
|
@ -89,48 +93,53 @@ $(document).ready( function() {
|
||||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||||
|
|
||||||
$this->contentHeading(getMLText("edit_document_access"));
|
$this->contentHeading(getMLText("edit_document_access"));
|
||||||
|
echo "<div class=\"row-fluid\">\n";
|
||||||
|
echo "<div class=\"span4\">\n";
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
|
||||||
if ($user->isAdmin()) {
|
if ($user->isAdmin()) {
|
||||||
|
|
||||||
$this->contentSubHeading(getMLText("set_owner"));
|
|
||||||
?>
|
?>
|
||||||
<form class="form-inline" action="../op/op.DocumentAccess.php">
|
<form class="form-inline" action="../op/op.DocumentAccess.php">
|
||||||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||||
<input type="Hidden" name="action" value="setowner">
|
<input type="Hidden" name="action" value="setowner">
|
||||||
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
|
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
|
||||||
<select name="ownerid">
|
<?php
|
||||||
<?php
|
$owner = $document->getOwner();
|
||||||
$owner = $document->getOwner();
|
$options = array();
|
||||||
foreach ($allUsers as $currUser) {
|
foreach ($allUsers as $currUser) {
|
||||||
if ($currUser->isGuest())
|
if (!$currUser->isGuest())
|
||||||
continue;
|
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$owner->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
||||||
print "<option value=\"".$currUser->getID()."\"";
|
}
|
||||||
if ($currUser->getID() == $owner->getID())
|
$this->formField(
|
||||||
print " selected";
|
getMLText("set_owner"),
|
||||||
print ">" . htmlspecialchars($currUser->getLogin() . " - " . $currUser->getFullname()) . "</option>\n";
|
array(
|
||||||
}
|
'element'=>'select',
|
||||||
?>
|
'name'=>'ownerid',
|
||||||
</select>
|
'class'=>'chzn-select',
|
||||||
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
|
'options'=>$options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('save'));
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
$this->contentSubHeading(getMLText("access_inheritance"));
|
$this->contentSubHeading(getMLText("access_inheritance"));
|
||||||
|
|
||||||
if ($document->inheritsAccess()) {
|
if ($document->inheritsAccess()) {
|
||||||
printMLText("inherits_access_msg");
|
printMLText("inherits_access_msg");
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<form action="../op/op.DocumentAccess.php" style="display: inline-block;">
|
<form class="form-inline" action="../op/op.DocumentAccess.php" style="display: inline-block;">
|
||||||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||||
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
|
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
|
||||||
<input type="hidden" name="action" value="notinherit">
|
<input type="hidden" name="action" value="notinherit">
|
||||||
<input type="hidden" name="mode" value="copy">
|
<input type="hidden" name="mode" value="copy">
|
||||||
<input type="submit" class="btn" value="<?php printMLText("inherits_access_copy_msg")?>">
|
<input type="submit" class="btn" value="<?php printMLText("inherits_access_copy_msg")?>">
|
||||||
</form>
|
</form>
|
||||||
<form action="../op/op.DocumentAccess.php" style="display: inline-block;">
|
<form class="form-inline" action="../op/op.DocumentAccess.php" style="display: inline-block;">
|
||||||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||||
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
|
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
|
||||||
<input type="hidden" name="action" value="notinherit">
|
<input type="hidden" name="action" value="notinherit">
|
||||||
|
@ -139,11 +148,13 @@ $(document).ready( function() {
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
$this->contentEnd();
|
echo "</div>";
|
||||||
$this->htmlEndPage();
|
echo "</div>";
|
||||||
return;
|
$this->contentEnd();
|
||||||
}
|
$this->htmlEndPage();
|
||||||
|
return;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<form action="../op/op.DocumentAccess.php">
|
<form action="../op/op.DocumentAccess.php">
|
||||||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||||
|
@ -152,22 +163,75 @@ $(document).ready( function() {
|
||||||
<input type="submit" class="btn" value="<?php printMLText("does_not_inherit_access_msg")?>">
|
<input type="submit" class="btn" value="<?php printMLText("does_not_inherit_access_msg")?>">
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
$accessList = $document->getAccessList();
|
$this->contentContainerEnd();
|
||||||
|
echo "</div>";
|
||||||
|
echo "<div class=\"span4\">";
|
||||||
|
$this->contentContainerStart();
|
||||||
|
|
||||||
|
$accessList = $document->getAccessList();
|
||||||
|
|
||||||
$this->contentSubHeading(getMLText("default_access"));
|
|
||||||
?>
|
?>
|
||||||
<form class="form-inline" action="../op/op.DocumentAccess.php">
|
<form class="form-horizontal" action="../op/op.DocumentAccess.php">
|
||||||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||||
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
|
<input type="Hidden" name="documentid" value="<?php print $document->getId();?>">
|
||||||
<input type="Hidden" name="action" value="setdefault">
|
<input type="Hidden" name="action" value="setdefault">
|
||||||
<?php $this->printAccessModeSelection($document->getDefaultAccess()); ?>
|
<?php
|
||||||
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
|
$this->formField(
|
||||||
|
getMLText("default_access"),
|
||||||
|
$this->getAccessModeSelection($document->getDefaultAccess())
|
||||||
|
);
|
||||||
|
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('save'));
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form class="form-horizontal" action="../op/op.DocumentAccess.php" name="form1" id="form1">
|
||||||
|
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||||
|
<input type="Hidden" name="documentid" value="<?php print $document->getId()?>">
|
||||||
|
<input type="Hidden" name="action" value="addaccess">
|
||||||
|
<?php
|
||||||
|
$options = array();
|
||||||
|
$options[] = array(-1, getMLText('select_one'));
|
||||||
|
foreach ($allUsers as $currUser) {
|
||||||
|
if (!$currUser->isGuest())
|
||||||
|
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
getMLText("user"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'name'=>'userid',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'options'=>$options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$options = array();
|
||||||
|
$options[] = array(-1, getMLText('select_one'));
|
||||||
|
foreach ($allGroups as $groupObj) {
|
||||||
|
$options[] = array($groupObj->getID(), htmlspecialchars($groupObj->getName()));
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
getMLText("group"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'name'=>'groupid',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'attributes'=>array(array('data-placeholder', getMLText('select_group'))),
|
||||||
|
'options'=>$options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->formField(
|
||||||
|
getMLText("access_mode"),
|
||||||
|
$this->getAccessModeSelection(M_READ)
|
||||||
|
);
|
||||||
|
$this->formSubmit("<i class=\"icon-plus\"></i> ".getMLText('add'));
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
$this->contentContainerEnd();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="span4">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$this->contentSubHeading(getMLText("edit_existing_access"));
|
|
||||||
|
|
||||||
/* memorize users with access rights */
|
/* memorize users with access rights */
|
||||||
$memusers = array();
|
$memusers = array();
|
||||||
/* memorize groups with access rights */
|
/* memorize groups with access rights */
|
||||||
|
@ -240,59 +304,10 @@ $(document).ready( function() {
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form action="../op/op.DocumentAccess.php" name="form1" id="form1">
|
</div>
|
||||||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
</div>
|
||||||
<input type="Hidden" name="documentid" value="<?php print $document->getId()?>">
|
|
||||||
<input type="Hidden" name="action" value="addaccess">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td><?php printMLText("user");?>:</td>
|
|
||||||
<td>
|
|
||||||
<select name="userid">
|
|
||||||
<option value="-1"><?php printMLText("select_one");?></option>
|
|
||||||
<?php
|
|
||||||
foreach ($allUsers as $userObj) {
|
|
||||||
if ($userObj->isGuest() || in_array($userObj->getID(), $memusers)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName()) . "</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><?php printMLText("group");?>:</td>
|
|
||||||
<td>
|
|
||||||
<select name="groupid">
|
|
||||||
<option value="-1"><?php printMLText("select_one");?></option>
|
|
||||||
<?php
|
|
||||||
foreach ($allGroups as $groupObj) {
|
|
||||||
if(in_array($groupObj->getID(), $memgroups))
|
|
||||||
continue;
|
|
||||||
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><?php printMLText("access_mode");?>:</td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
$this->printAccessModeSelection(M_READ);
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td><input type="submit" class="btn" value="<?php printMLText("add");?>"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerEnd();
|
|
||||||
$this->contentEnd();
|
$this->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
|
@ -90,32 +90,37 @@ $(document).ready(function() {
|
||||||
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
|
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
|
||||||
|
|
||||||
$this->contentHeading(getMLText("edit_folder_access"));
|
$this->contentHeading(getMLText("edit_folder_access"));
|
||||||
|
echo "<div class=\"row-fluid\">\n";
|
||||||
|
echo "<div class=\"span4\">\n";
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
|
||||||
if ($user->isAdmin()) {
|
if ($user->isAdmin()) {
|
||||||
|
|
||||||
$this->contentSubHeading(getMLText("set_owner"));
|
|
||||||
?>
|
?>
|
||||||
<form class="form-inline" action="../op/op.FolderAccess.php">
|
<form class="form-inline" action="../op/op.FolderAccess.php">
|
||||||
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
||||||
<input type="Hidden" name="action" value="setowner">
|
<input type="hidden" name="action" value="setowner">
|
||||||
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>">
|
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||||
<select name="ownerid">
|
|
||||||
<?php
|
<?php
|
||||||
$owner = $folder->getOwner();
|
$owner = $folder->getOwner();
|
||||||
foreach ($allUsers as $currUser) {
|
$options = array();
|
||||||
if ($currUser->isGuest())
|
foreach ($allUsers as $currUser) {
|
||||||
continue;
|
if (!$currUser->isGuest())
|
||||||
print "<option value=\"".$currUser->getID()."\"";
|
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$owner->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
||||||
if ($currUser->getID() == $owner->getID())
|
}
|
||||||
print " selected";
|
$this->formField(
|
||||||
print ">" . htmlspecialchars($currUser->getLogin() . " - " . $currUser->getFullname()) . "</option>\n";
|
getMLText("set_owner"),
|
||||||
}
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'name'=>'ownerid',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'options'=>$options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('save'));
|
||||||
?>
|
?>
|
||||||
</select>
|
|
||||||
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
|
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($folder->getID() != $rootfolderid && $folder->getParent()){
|
if ($folder->getID() != $rootfolderid && $folder->getParent()){
|
||||||
|
@ -126,14 +131,14 @@ $(document).ready(function() {
|
||||||
printMLText("inherits_access_msg");
|
printMLText("inherits_access_msg");
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<form class="form-inline" action="../op/op.FolderAccess.php">
|
<form class="form-inline" action="../op/op.FolderAccess.php" style="display: inline-block;">
|
||||||
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
||||||
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||||
<input type="hidden" name="action" value="notinherit">
|
<input type="hidden" name="action" value="notinherit">
|
||||||
<input type="hidden" name="mode" value="copy">
|
<input type="hidden" name="mode" value="copy">
|
||||||
<input type="submit" class="btn" value="<?php printMLText("inherits_access_copy_msg")?>">
|
<input type="submit" class="btn" value="<?php printMLText("inherits_access_copy_msg")?>">
|
||||||
</form>
|
</form>
|
||||||
<form action="../op/op.FolderAccess.php" style="display: inline-block;">
|
<form class="form-inline" action="../op/op.FolderAccess.php" style="display: inline-block;">
|
||||||
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
||||||
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||||
<input type="hidden" name="action" value="notinherit">
|
<input type="hidden" name="action" value="notinherit">
|
||||||
|
@ -143,6 +148,8 @@ $(document).ready(function() {
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
|
echo "</div>";
|
||||||
|
echo "</div>";
|
||||||
$this->contentEnd();
|
$this->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
return;
|
return;
|
||||||
|
@ -156,22 +163,75 @@ $(document).ready(function() {
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
$this->contentContainerEnd();
|
||||||
|
echo "</div>";
|
||||||
|
echo "<div class=\"span4\">";
|
||||||
|
$this->contentContainerStart();
|
||||||
|
|
||||||
$accessList = $folder->getAccessList();
|
$accessList = $folder->getAccessList();
|
||||||
|
|
||||||
$this->contentSubHeading(getMLText("default_access"));
|
|
||||||
?>
|
?>
|
||||||
<form class="form-inline" action="../op/op.FolderAccess.php">
|
<form class="form-horizontal" action="../op/op.FolderAccess.php">
|
||||||
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
||||||
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||||
<input type="hidden" name="action" value="setdefault">
|
<input type="hidden" name="action" value="setdefault">
|
||||||
<?php $this->printAccessModeSelection($folder->getDefaultAccess()); ?>
|
<?php
|
||||||
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
|
$this->formField(
|
||||||
|
getMLText("default_access"),
|
||||||
|
$this->getAccessModeSelection($folder->getDefaultAccess())
|
||||||
|
);
|
||||||
|
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('save'));
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form class="form-horizontal" action="../op/op.FolderAccess.php" id="form1" name="form1">
|
||||||
|
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
||||||
|
<input type="hidden" name="folderid" value="<?php print $folder->getID()?>">
|
||||||
|
<input type="hidden" name="action" value="addaccess">
|
||||||
|
<?php
|
||||||
|
$options = array();
|
||||||
|
$options[] = array(-1, getMLText('select_one'));
|
||||||
|
foreach ($allUsers as $currUser) {
|
||||||
|
if (!$currUser->isGuest())
|
||||||
|
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
getMLText("user"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'name'=>'userid',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'options'=>$options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$options = array();
|
||||||
|
$options[] = array(-1, getMLText('select_one'));
|
||||||
|
foreach ($allGroups as $groupObj) {
|
||||||
|
$options[] = array($groupObj->getID(), htmlspecialchars($groupObj->getName()));
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
getMLText("group"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'name'=>'groupid',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'attributes'=>array(array('data-placeholder', getMLText('select_group'))),
|
||||||
|
'options'=>$options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->formField(
|
||||||
|
getMLText("access_mode"),
|
||||||
|
$this->getAccessModeSelection(M_READ)
|
||||||
|
);
|
||||||
|
$this->formSubmit("<i class=\"icon-plus\"></i> ".getMLText('add'));
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
$this->contentContainerEnd();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="span4">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$this->contentSubHeading(getMLText("edit_existing_access"));
|
|
||||||
|
|
||||||
if ((count($accessList["users"]) != 0) || (count($accessList["groups"]) != 0)) {
|
if ((count($accessList["users"]) != 0) || (count($accessList["groups"]) != 0)) {
|
||||||
|
|
||||||
|
@ -239,51 +299,10 @@ $(document).ready(function() {
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal" action="../op/op.FolderAccess.php" id="form1" name="form1">
|
</div>
|
||||||
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
</div>
|
||||||
<input type="hidden" name="folderid" value="<?php print $folder->getID()?>">
|
|
||||||
<input type="hidden" name="action" value="addaccess">
|
|
||||||
<?php
|
|
||||||
$options = array();
|
|
||||||
$options[] = array(-1, getMLText('select_one'));
|
|
||||||
foreach ($allUsers as $currUser) {
|
|
||||||
if (!$currUser->isGuest())
|
|
||||||
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
|
||||||
}
|
|
||||||
$this->formField(
|
|
||||||
getMLText("user"),
|
|
||||||
array(
|
|
||||||
'element'=>'select',
|
|
||||||
'name'=>'userid',
|
|
||||||
'class'=>'chzn-select',
|
|
||||||
'options'=>$options
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$options = array();
|
|
||||||
$options[] = array(-1, getMLText('select_one'));
|
|
||||||
foreach ($allGroups as $groupObj) {
|
|
||||||
$options[] = array($groupObj->getID(), htmlspecialchars($groupObj->getName()));
|
|
||||||
}
|
|
||||||
$this->formField(
|
|
||||||
getMLText("group"),
|
|
||||||
array(
|
|
||||||
'element'=>'select',
|
|
||||||
'name'=>'groupid',
|
|
||||||
'class'=>'chzn-select',
|
|
||||||
'attributes'=>array(array('data-placeholder', getMLText('select_group'))),
|
|
||||||
'options'=>$options
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$this->formField(
|
|
||||||
getMLText("access_mode"),
|
|
||||||
$this->getAccessModeSelection(M_READ)
|
|
||||||
);
|
|
||||||
$this->formSubmit("<i class=\"icon-plus\"></i> ".getMLText('add'));
|
|
||||||
?>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerEnd();
|
|
||||||
$this->contentEnd();
|
$this->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user