mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
users which are subscribers already cannot be selected anymore (Closes #414)
use also the same layout in class.DocumentNotify.php and class.FolderNotify.php
This commit is contained in:
parent
9daf6cb2c5
commit
542ca945f1
|
@ -81,7 +81,13 @@ $(document).ready( function() {
|
|||
$this->contentHeading(getMLText("edit_existing_notify"));
|
||||
|
||||
$userNotifyIDs = array();
|
||||
foreach ($notifyList["users"] as $userNotify) {
|
||||
$userNotifyIDs[] = $userNotify->getID();
|
||||
}
|
||||
$groupNotifyIDs = array();
|
||||
foreach ($notifyList["groups"] as $groupNotify) {
|
||||
$groupNotifyIDs[] = $groupNotify->getID();
|
||||
}
|
||||
|
||||
echo "<div class=\"row-fluid\">\n";
|
||||
echo "<div class=\"span6\">\n";
|
||||
|
@ -114,7 +120,6 @@ $(document).ready( function() {
|
|||
'options'=>$options
|
||||
)
|
||||
);
|
||||
|
||||
$options = array();
|
||||
$options[] = array('-1', getMLText("select_one"));
|
||||
$allGroups = $dms->getAllGroups();
|
||||
|
@ -160,7 +165,6 @@ $(document).ready( function() {
|
|||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
$userNotifyIDs[] = $userNotify->getID();
|
||||
}
|
||||
foreach ($notifyList["groups"] as $groupNotify) {
|
||||
print "<tr>";
|
||||
|
@ -174,11 +178,10 @@ $(document).ready( function() {
|
|||
print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</form>\n";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
$groupNotifyIDs[] = $groupNotify->getID();
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
|
|
|
@ -82,55 +82,20 @@ $(document).ready(function() {
|
|||
$this->contentContainerStart();
|
||||
|
||||
$userNotifyIDs = array();
|
||||
$groupNotifyIDs = array();
|
||||
|
||||
print "<table class=\"table-condensed\">\n";
|
||||
if (empty($notifyList["users"]) && empty($notifyList["groups"])) {
|
||||
print "<tr><td>".getMLText("empty_notify_list")."</td></tr>";
|
||||
}
|
||||
else {
|
||||
foreach ($notifyList["users"] as $userNotify) {
|
||||
print "<tr>";
|
||||
print "<td><i class=\"icon-user\"></i></td>";
|
||||
print "<td>" . htmlspecialchars($userNotify->getFullName()) . "</td>";
|
||||
if ($user->isAdmin() || $user->getID() == $userNotify->getID()) {
|
||||
print "<form action=\"../op/op.FolderNotify.php\" method=\"post\">\n";
|
||||
echo createHiddenFieldWithKey('foldernotify')."\n";
|
||||
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
|
||||
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
$userNotifyIDs[] = $userNotify->getID();
|
||||
}
|
||||
|
||||
$groupNotifyIDs = array();
|
||||
foreach ($notifyList["groups"] as $groupNotify) {
|
||||
print "<tr>";
|
||||
print "<td><i class=\"icon-group\"></i></td>";
|
||||
print "<td>" . htmlspecialchars($groupNotify->getName()) . "</td>";
|
||||
if ($user->isAdmin() || $groupNotify->isMember($user,true)) {
|
||||
print "<form action=\"../op/op.FolderNotify.php\" method=\"post\">\n";
|
||||
echo createHiddenFieldWithKey('foldernotify')."\n";
|
||||
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
|
||||
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
$groupNotifyIDs[] = $groupNotify->getID();
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
echo "<div class=\"row-fluid\">\n";
|
||||
echo "<div class=\"span6\">\n";
|
||||
$this->contentContainerStart();
|
||||
|
||||
?>
|
||||
<br>
|
||||
|
||||
<form class="form-horizontal" action="../op/op.FolderNotify.php" method="post" id="form1" name="form1">
|
||||
<?php echo createHiddenFieldWithKey('foldernotify'); ?>
|
||||
<input type="hidden" name="folderid" value="<?php print $folder->getID()?>">
|
||||
|
@ -176,9 +141,54 @@ $(document).ready(function() {
|
|||
$this->formSubmit(getMLText('add'));
|
||||
?>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
echo "</div>\n";
|
||||
echo "<div class=\"span6\">\n";
|
||||
print "<table class=\"table-condensed\">\n";
|
||||
if (empty($notifyList["users"]) && empty($notifyList["groups"])) {
|
||||
print "<tr><td>".getMLText("empty_notify_list")."</td></tr>";
|
||||
}
|
||||
else {
|
||||
foreach ($notifyList["users"] as $userNotify) {
|
||||
print "<tr>";
|
||||
print "<td><i class=\"icon-user\"></i></td>";
|
||||
print "<td>" . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "</td>";
|
||||
if ($user->isAdmin() || $user->getID() == $userNotify->getID()) {
|
||||
print "<form action=\"../op/op.FolderNotify.php\" method=\"post\">\n";
|
||||
echo createHiddenFieldWithKey('foldernotify')."\n";
|
||||
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
|
||||
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
}
|
||||
foreach ($notifyList["groups"] as $groupNotify) {
|
||||
print "<tr>";
|
||||
print "<td><i class=\"icon-group\"></i></td>";
|
||||
print "<td>" . htmlspecialchars($groupNotify->getName()) . "</td>";
|
||||
if ($user->isAdmin() || $groupNotify->isMember($user,true)) {
|
||||
print "<form action=\"../op/op.FolderNotify.php\" method=\"post\">\n";
|
||||
echo createHiddenFieldWithKey('foldernotify')."\n";
|
||||
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
|
||||
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
echo "</div>\n";
|
||||
echo "</div>\n";
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user