mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-18 15:41:42 +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"));
|
$this->contentHeading(getMLText("edit_existing_notify"));
|
||||||
|
|
||||||
$userNotifyIDs = array();
|
$userNotifyIDs = array();
|
||||||
|
foreach ($notifyList["users"] as $userNotify) {
|
||||||
|
$userNotifyIDs[] = $userNotify->getID();
|
||||||
|
}
|
||||||
$groupNotifyIDs = array();
|
$groupNotifyIDs = array();
|
||||||
|
foreach ($notifyList["groups"] as $groupNotify) {
|
||||||
|
$groupNotifyIDs[] = $groupNotify->getID();
|
||||||
|
}
|
||||||
|
|
||||||
echo "<div class=\"row-fluid\">\n";
|
echo "<div class=\"row-fluid\">\n";
|
||||||
echo "<div class=\"span6\">\n";
|
echo "<div class=\"span6\">\n";
|
||||||
|
@ -114,7 +120,6 @@ $(document).ready( function() {
|
||||||
'options'=>$options
|
'options'=>$options
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[] = array('-1', getMLText("select_one"));
|
$options[] = array('-1', getMLText("select_one"));
|
||||||
$allGroups = $dms->getAllGroups();
|
$allGroups = $dms->getAllGroups();
|
||||||
|
@ -160,7 +165,6 @@ $(document).ready( function() {
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
}else print "<td></td>";
|
}else print "<td></td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$userNotifyIDs[] = $userNotify->getID();
|
|
||||||
}
|
}
|
||||||
foreach ($notifyList["groups"] as $groupNotify) {
|
foreach ($notifyList["groups"] as $groupNotify) {
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
|
@ -174,11 +178,10 @@ $(document).ready( function() {
|
||||||
print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
|
print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
|
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
|
||||||
print "</form>\n";
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
print "</form>\n";
|
||||||
}else print "<td></td>";
|
}else print "<td></td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$groupNotifyIDs[] = $groupNotify->getID();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
|
@ -82,55 +82,20 @@ $(document).ready(function() {
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
|
||||||
$userNotifyIDs = array();
|
$userNotifyIDs = array();
|
||||||
|
foreach ($notifyList["users"] as $userNotify) {
|
||||||
|
$userNotifyIDs[] = $userNotify->getID();
|
||||||
|
}
|
||||||
$groupNotifyIDs = array();
|
$groupNotifyIDs = array();
|
||||||
|
foreach ($notifyList["groups"] as $groupNotify) {
|
||||||
print "<table class=\"table-condensed\">\n";
|
$groupNotifyIDs[] = $groupNotify->getID();
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($notifyList["groups"] as $groupNotify) {
|
echo "<div class=\"row-fluid\">\n";
|
||||||
print "<tr>";
|
echo "<div class=\"span6\">\n";
|
||||||
print "<td><i class=\"icon-group\"></i></td>";
|
$this->contentContainerStart();
|
||||||
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";
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<br>
|
|
||||||
<form class="form-horizontal" action="../op/op.FolderNotify.php" method="post" id="form1" name="form1">
|
<form class="form-horizontal" action="../op/op.FolderNotify.php" method="post" id="form1" name="form1">
|
||||||
<?php echo createHiddenFieldWithKey('foldernotify'); ?>
|
<?php echo createHiddenFieldWithKey('foldernotify'); ?>
|
||||||
<input type="hidden" name="folderid" value="<?php print $folder->getID()?>">
|
<input type="hidden" name="folderid" value="<?php print $folder->getID()?>">
|
||||||
|
@ -176,9 +141,54 @@ $(document).ready(function() {
|
||||||
$this->formSubmit(getMLText('add'));
|
$this->formSubmit(getMLText('add'));
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerEnd();
|
$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->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user