mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
- added printClipboard()
This commit is contained in:
parent
302f0142a3
commit
4dc94c37b1
|
@ -966,7 +966,7 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common {
|
|||
if ($folderID == $this->params['rootfolderid']) print "</ul>\n";
|
||||
} /* }}} */
|
||||
|
||||
function printTreeNavigation($folderid,$showtree){ /* {{{ */
|
||||
function printTreeNavigation($folderid, $showtree){ /* {{{ */
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
function toggleTree(id){
|
||||
|
@ -989,20 +989,86 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common {
|
|||
|
||||
if ($showtree==1){
|
||||
|
||||
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><img src=\"".$this->getImgPath("m.png")."\" border=0></a>", true);
|
||||
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=0\"><i class=\"icon-minus-sign\"></i></a>", true);
|
||||
$this->contentContainerStart();
|
||||
$this->printFoldersTree(M_READ, -1, $this->params['rootfolderid'], $folderid, true);
|
||||
$this->contentContainerEnd();
|
||||
|
||||
}else{
|
||||
|
||||
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><img src=\"".$this->getImgPath("p.png")."\" border=0></a>", true);
|
||||
$this->contentContainerStart();
|
||||
$this->contentContainerEnd();
|
||||
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"icon-plus-sign\"></i></a>", true);
|
||||
}
|
||||
|
||||
} /* }}} */
|
||||
|
||||
function printClipboard($clipboard){ /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$this->contentHeading("Clipboard", true);
|
||||
echo "<div class=\"well\" ondragover=\"allowDrop(event)\" ondrop=\"onAddClipboard(event)\">\n";
|
||||
$clipboard = $this->params['session']->getClipboard();
|
||||
// print_r($clipboard);
|
||||
print "<table class=\"table\">";
|
||||
if($clipboard['folders']) {
|
||||
//echo "<tr><th colspan=\"3\">Folders</th></tr>\n";
|
||||
foreach($clipboard['folders'] as $folderid) {
|
||||
$folder = $dms->getFolder($folderid);
|
||||
$comment = $folder->getComment();
|
||||
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
||||
print "<tr rel=\"folder_".$folder->getID()."\" class=\"folder\" ondragover=\"allowDrop(event)\" ondrop=\"onDrop(event)\">";
|
||||
// print "<td><img src=\"images/folder_closed.gif\" width=18 height=18 border=0></td>";
|
||||
print "<td><a rel=\"folder_".$folder->getID()."\" draggable=\"true\" ondragstart=\"onDragStartFolder(event);\" href=\"out.ViewFolder.php?folderid=".$folder->getID()."&showtree=".$showtree."\"><img src=\"".$this->imgpath."folder.png\" width=\"24\" height=\"24\" border=0></a></td>\n";
|
||||
print "<td><a href=\"out.ViewFolder.php?folderid=".$folder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($folder->getName()) . "</a>";
|
||||
if($comment) {
|
||||
print "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print "<td>\n";
|
||||
print "<a href=\"../op/op.RemoveFromClipboard.php?folderid=".$this->params['folder']->getID()."&id=".$folderid."&type=folder\"><i class=\"icon-remove\"></i></a>";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
$previewer = new LetoDMS_Preview_Previewer($this->params['cachedir'], 40);
|
||||
if($clipboard['docs']) {
|
||||
//echo "<tr><th colspan=\"3\">Documents</th></tr>\n";
|
||||
foreach($clipboard['docs'] as $docid) {
|
||||
$document = $dms->getDocument($docid);
|
||||
$comment = $document->getComment();
|
||||
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
||||
if($latestContent = $document->getLatestContent()) {
|
||||
$previewer->createPreview($latestContent);
|
||||
$version = $latestContent->getVersion();
|
||||
$status = $latestContent->getStatus();
|
||||
|
||||
print "<tr>";
|
||||
|
||||
if (file_exists($dms->contentDir . $latestContent->getPath())) {
|
||||
print "<td><a rel=\"document_".$docid."\" draggable=\"true\" ondragstart=\"onDragStartDocument(event);\" href=\"../op/op.Download.php?documentid=".$docid."&version=".$version."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
print "</a></td>";
|
||||
} else
|
||||
print "<td><img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></td>";
|
||||
|
||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$docid."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a>";
|
||||
if($comment) {
|
||||
print "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print "<td>\n";
|
||||
print "<a href=\"../op/op.RemoveFromClipboard.php?folderid=".$this->params['folder']->getID()."&id=".$docid."&type=document\"><i class=\"icon-remove\"></i></a>";
|
||||
print "</td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
print "</table>";
|
||||
echo "</div>\n";
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Output HTML Code for jumploader
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user