mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
overhaul ManageNotify, support onepage mode, use standard output for documents and folders
This commit is contained in:
parent
09f5943eb0
commit
49bebebdae
|
@ -38,6 +38,7 @@ if($view) {
|
|||
$view->setParam('cachedir', $settings->_cacheDir);
|
||||
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
||||
$view->setParam('timeout', $settings->_cmdTimeout);
|
||||
$view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax
|
||||
$view->setParam('xsendfile', $settings->_enableXsendfile);
|
||||
$view($_GET);
|
||||
exit;
|
||||
|
|
|
@ -64,7 +64,7 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
else {
|
||||
|
||||
print "<table class=\"table-condensed\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead><tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
|
@ -74,15 +74,18 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
foreach($notifications as $notification) {
|
||||
$fld = $this->dms->getFolder($notification->getTarget());
|
||||
if (is_object($fld)) {
|
||||
$owner = $fld->getOwner();
|
||||
print "<tr class=\"folder\">";
|
||||
print "<td><i class=\"icon-folder-close-alt\"></i></td>";
|
||||
print "<td><a href=\"../out/out.ViewFolder.php?folderid=".$fld->getID()."\">" . htmlspecialchars($fld->getName()) . "</a></td>\n";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
echo $this->folderListRowStart($fld);
|
||||
$txt = $this->callHook('folderListItem', $fld, true, 'viewfolder');
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo $this->folderListRow($fld, true);
|
||||
}
|
||||
print "<td>";
|
||||
if ($deleteaction) print "<a href='../op/op.ManageNotify.php?id=".$fld->getID()."&type=folder&action=del' class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</a>";
|
||||
else print "<a href='../out/out.FolderNotify.php?folderid=".$fld->getID()."' class=\"btn btn-mini\">".getMLText("edit")."</a>";
|
||||
print "</td></tr>";
|
||||
print "</td>";
|
||||
echo $this->folderListRowEnd($fld);
|
||||
}
|
||||
}
|
||||
print "</tbody></table>";
|
||||
|
@ -97,42 +100,30 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
else {
|
||||
$previewer = new SeedDMS_Preview_Previewer($this->cachedir, $this->previewwidth, $this->timeout, $this->xsendfile);
|
||||
|
||||
print "<table class=\"table-condensed\">";
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("action")."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr></thead>\n<tbody>\n";
|
||||
foreach ($notifications as $notification) {
|
||||
$doc = $this->dms->getDocument($notification->getTarget());
|
||||
if (is_object($doc)) {
|
||||
$owner = $doc->getOwner();
|
||||
$latest = $doc->getLatestContent();
|
||||
$status = $latest->getStatus();
|
||||
$previewer->createPreview($latest);
|
||||
print "<tr>\n";
|
||||
print "<td>";
|
||||
if($previewer->hasPreview($latest)) {
|
||||
print "<img class=\"mimeicon\" width=\"".$this->previewwidth."\" src=\"../op/op.Preview.php?documentid=".$doc->getID()."&version=".$latest->getVersion()."&width=".$this->previewwidth."\" title=\"".htmlspecialchars($latest->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" width=\"".$this->previewwidth."\" src=\"".$this->getMimeIcon($latest->getFileType())."\" title=\"".htmlspecialchars($latest->getMimeType())."\">";
|
||||
$doc->verifyLastestContentExpriry();
|
||||
echo $this->documentListRowStart($doc);
|
||||
$txt = $this->callHook('documentListItem', $doc, $previewer, true, 'managenotify');
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo $this->documentListRow($doc, $previewer, true);
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$doc->getID()."\">" . htmlspecialchars($doc->getName()) . "</a>";
|
||||
print "<br /><span style=\"font-size: 85%; font-style: italic; color: #666; \">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $doc->getDate())."</b>, ".getMLText('version')." <b>".$latest->getVersion()."</b> - <b>".date('Y-m-d', $latest->getDate())."</b></span>";
|
||||
$comment = $latest->getComment();
|
||||
if($comment) {
|
||||
print "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
print "<td>".getOverallStatusText($status["status"])."</td>";
|
||||
print "<td>";
|
||||
if ($deleteaction) print "<a href='../op/op.ManageNotify.php?id=".$doc->getID()."&type=document&action=del' class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</a>";
|
||||
else print "<a href='../out/out.DocumentNotify.php?documentid=".$doc->getID()."' class=\"btn btn-mini\">".getMLText("edit")."</a>";
|
||||
print "</td></tr>\n";
|
||||
print "</td>\n";
|
||||
echo $this->documentListRowEnd($doc);
|
||||
}
|
||||
}
|
||||
print "</tbody></table>";
|
||||
|
@ -144,6 +135,8 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
$this->printFolderChooserJs("form1");
|
||||
$this->printDocumentChooserJs("form2");
|
||||
$this->printClickDocumentJs();
|
||||
$this->printClickFolderJs();
|
||||
} /* }}} */
|
||||
|
||||
function show() { /* {{{ */
|
||||
|
@ -211,28 +204,20 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
echo "<div class=\"row-fluid\">";
|
||||
echo "<div class=\"span6\">";
|
||||
$this->contentHeading(getMLText("user"));
|
||||
$this->contentContainerStart();
|
||||
$ret=$this->getNotificationList(false,true);
|
||||
$this->printFolderNotificationList($ret);
|
||||
$this->contentContainerEnd();
|
||||
$this->contentHeading(getMLText("group"));
|
||||
$this->contentContainerStart();
|
||||
$ret=$this->getNotificationList(true,true);
|
||||
$this->printFolderNotificationList($ret,false);
|
||||
$this->contentContainerEnd();
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class=\"span6\">";
|
||||
$this->contentHeading(getMLText("user"));
|
||||
$this->contentContainerStart();
|
||||
$ret=$this->getNotificationList(false,false);
|
||||
$this->printDocumentNotificationList($ret);
|
||||
$this->contentContainerEnd();
|
||||
$this->contentHeading(getMLText("group"));
|
||||
$this->contentContainerStart();
|
||||
$ret=$this->getNotificationList(true,false);
|
||||
$this->printDocumentNotificationList($ret,false);
|
||||
$this->contentContainerEnd();
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
@ -240,4 +225,3 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user