mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
3b4cecabcc
|
@ -134,6 +134,8 @@
|
|||
Changes in version 5.1.16
|
||||
--------------------------------------------------------------------------------
|
||||
- initialize categories to empty array. Closes #458
|
||||
- add new parameter $skipcont to hook folderListitem()
|
||||
- use standard output format for documents and folders on ManageNotify page
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.15
|
||||
|
|
|
@ -41,6 +41,7 @@ if($view) {
|
|||
$view->setParam('previewconverters', $settings->_converters['preview']);
|
||||
$view->setParam('timeout', $settings->_cmdTimeout);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax
|
||||
$view->setParam('xsendfile', $settings->_enableXsendfile);
|
||||
$view($_GET);
|
||||
exit;
|
||||
|
|
|
@ -281,6 +281,7 @@ div.popupbox {
|
|||
display: none;
|
||||
position: absolute;
|
||||
min-width: 230px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
div.popupbox dt {
|
||||
|
|
|
@ -2688,7 +2688,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
return "</tr>\n";
|
||||
} /* }}} */
|
||||
|
||||
function folderListRow($subFolder, $extracontent=array()) { /* {{{ */
|
||||
function folderListRow($subFolder, $skipcont=false, $extracontent=array()) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
// $folder = $this->params['folder'];
|
||||
|
@ -2703,7 +2703,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
||||
|
||||
$content = '';
|
||||
$content .= $this->folderListRowStart($subFolder);
|
||||
if(!$skipcont)
|
||||
$content .= $this->folderListRowStart($subFolder);
|
||||
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
|
||||
if($onepage)
|
||||
$content .= "<td style=\"cursor: pointer;\">" . "<b title=\"Id:".$subFolder->getId()."\">".htmlspecialchars($subFolder->getName())."</b>";
|
||||
|
@ -2764,7 +2765,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
}
|
||||
$content .= "</div>";
|
||||
$content .= "</td>";
|
||||
$content .= $this->folderListRowEnd($subFolder);
|
||||
if(!$skipcont)
|
||||
$content .= $this->folderListRowEnd($subFolder);
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
@ -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>";
|
||||
|
@ -98,42 +101,30 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
$previewer = new SeedDMS_Preview_Previewer($this->cachedir, $this->previewwidth, $this->timeout, $this->xsendfile);
|
||||
$previewer->setConverters($this->previewconverters);
|
||||
|
||||
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>";
|
||||
|
@ -145,6 +136,8 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
$this->printFolderChooserJs("form1");
|
||||
$this->printDocumentChooserJs("form2");
|
||||
$this->printClickDocumentJs();
|
||||
$this->printClickFolderJs();
|
||||
} /* }}} */
|
||||
|
||||
function show() { /* {{{ */
|
||||
|
@ -213,28 +206,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>";
|
||||
|
||||
|
@ -242,4 +227,3 @@ class SeedDMS_View_ManageNotify extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -661,7 +661,7 @@ $(document).ready( function() {
|
|||
$extracontent = array();
|
||||
if($attrstr)
|
||||
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-default">'.getMLText('attributes').'</span>', $attrstr, true);
|
||||
print $this->folderListRow($folder, $extracontent);
|
||||
print $this->folderListRow($folder, false, $extracontent);
|
||||
}
|
||||
}
|
||||
print "</tbody></table>\n";
|
||||
|
|
|
@ -359,7 +359,7 @@ $('body').on('click', '.order-btn', function(ev) {
|
|||
|
||||
foreach($subFolders as $subFolder) {
|
||||
if(!$maxItemsPerPage || $i < $maxItemsPerPage) {
|
||||
$txt = $this->callHook('folderListItem', $subFolder, 'viewfolder');
|
||||
$txt = $this->callHook('folderListItem', $subFolder, false, 'viewfolder');
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
|
@ -467,7 +467,7 @@ $('body').on('click', '.order-btn', function(ev) {
|
|||
$j = 0; // counts only returned entries
|
||||
foreach($subFolders as $subFolder) {
|
||||
if($i >= $offset && $j < $limit) {
|
||||
$txt = $this->callHook('folderListItem', $subFolder, 'viewfolder');
|
||||
$txt = $this->callHook('folderListItem', $subFolder, false, 'viewfolder');
|
||||
if(is_string($txt))
|
||||
$content .= $txt;
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user