mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
use configured preview image width
This commit is contained in:
parent
9b58c1fcfa
commit
b078102c19
|
@ -38,8 +38,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$showInProcess = $this->params['showinprocess'];
|
||||
$cachedir = $this->params['cachedir'];
|
||||
$workflowmode = $this->params['workflowmode'];
|
||||
|
||||
$previewwidth = 40;
|
||||
$previewwidth = $this->params['previewWidthList'];
|
||||
|
||||
$db = $dms->getDB();
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
|
|
|
@ -77,7 +77,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
|
||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</a></td>";
|
||||
print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
|
|
|
@ -81,6 +81,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$enableownerrevapp = $this->params['enableownerrevapp'];
|
||||
$workflowmode = $this->params['workflowmode'];
|
||||
$cachedir = $this->params['cachedir'];
|
||||
$previewwidthlist = $this->params['previewWidthList'];
|
||||
$previewwidthdetail = $this->params['previewWidthDetail'];
|
||||
$documentid = $document->getId();
|
||||
|
||||
$versions = $document->getContent();
|
||||
|
@ -292,8 +294,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentContainerStart();
|
||||
print "<table class=\"table\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th width='10%'></th>\n";
|
||||
print "<th width='30%'>".getMLText("file")."</th>\n";
|
||||
print "<th width='*'></th>\n";
|
||||
print "<th width='*'>".getMLText("file")."</th>\n";
|
||||
print "<th width='25%'>".getMLText("comment")."</th>\n";
|
||||
print "<th width='15%'>".getMLText("status")."</th>\n";
|
||||
print "<th width='20%'></th>\n";
|
||||
|
@ -311,14 +313,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
print "</ul>";
|
||||
*/
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 100);
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail);
|
||||
$previewer->createPreview($latestContent);
|
||||
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
|
||||
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=". $latestContent->getVersion()."\">";
|
||||
else
|
||||
print "<a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=100\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
|
||||
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
@ -901,23 +903,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
print "<tr>\n";
|
||||
print "<td nowrap>";
|
||||
/*
|
||||
print "<ul class=\"actions unstyled\">";
|
||||
if ($file_exists){
|
||||
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-download\"></i>".getMLText("download")."</a>";
|
||||
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a>";
|
||||
}else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
|
||||
print "</ul>";
|
||||
*/
|
||||
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\">";
|
||||
else
|
||||
print "<a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$version->getVersion()."\">";
|
||||
$previewer->createPreview($version);
|
||||
if($previewer->hasPreview($version)) {
|
||||
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=100\" title=\"".htmlspecialchars($version->getMimeType())."\">");
|
||||
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($version->getMimeType())."\">");
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
}
|
||||
|
@ -998,13 +990,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
print "<tr>";
|
||||
print "<td>";
|
||||
$previewer->createPreview($file);
|
||||
$previewer->createPreview($file, $previewwidthdetail);
|
||||
if ($viewonlinefiletypes && in_array(strtolower($file->getFileType()), $viewonlinefiletypes))
|
||||
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\">";
|
||||
else
|
||||
print "<a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\">";
|
||||
if($previewer->hasPreview($file)) {
|
||||
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&file=".$file->getID()."&width=100\" title=\"".htmlspecialchars($file->getMimeType())."\">");
|
||||
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&file=".$file->getID()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($file->getMimeType())."\">");
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
|
||||
}
|
||||
|
@ -1066,11 +1058,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$targetDoc = $link->getTarget();
|
||||
$targetlc = $targetDoc->getLatestContent();
|
||||
|
||||
$previewer->createPreview($targetlc);
|
||||
$previewer->createPreview($targetlc, $previewwidthlist);
|
||||
print "<tr>";
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$targetDoc->getID()."&version=".$targetlc->getVersion()."\">";
|
||||
if($previewer->hasPreview($targetlc)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$targetDoc->getID()."&version=".$targetlc->getVersion()."&width=40\" title=\"".htmlspecialchars($targetlc->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidthlist."\"src=\"../op/op.Preview.php?documentid=".$targetDoc->getID()."&version=".$targetlc->getVersion()."&width=".$previewwidthlist."\" title=\"".htmlspecialchars($targetlc->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($targetlc->getFileType())."\" title=\"".htmlspecialchars($targetlc->getMimeType())."\">";
|
||||
}
|
||||
|
@ -1137,11 +1129,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$sourceDoc = $link->getDocument();
|
||||
$sourcelc = $sourceDoc->getLatestContent();
|
||||
|
||||
$previewer->createPreview($sourcelc);
|
||||
$previewer->createPreview($sourcelc, $previewwidthlist);
|
||||
print "<tr>";
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$sourceDoc->getID()."&version=".$sourcelc->getVersion()."\">";
|
||||
if($previewer->hasPreview($sourcelc)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$sourceDoc->getID()."&version=".$sourcelc->getVersion()."&width=40\" title=\"".htmlspecialchars($sourcelc->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidthlist."\"src=\"../op/op.Preview.php?documentid=".$sourceDoc->getID()."&version=".$sourcelc->getVersion()."&width=".$previewwidthlist."\" title=\"".htmlspecialchars($sourcelc->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($sourcelc->getFileType())."\" title=\"".htmlspecialchars($sourcelc->getMimeType())."\">";
|
||||
}
|
||||
|
|
|
@ -84,8 +84,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
$workflowmode = $this->params['workflowmode'];
|
||||
$enableRecursiveCount = $this->params['enableRecursiveCount'];
|
||||
$maxRecursiveCount = $this->params['maxRecursiveCount'];
|
||||
|
||||
$previewwidth = 40;
|
||||
$previewwidth = $this->params['previewWidthList'];
|
||||
|
||||
$folderid = $folder->getId();
|
||||
|
||||
|
|
|
@ -35,8 +35,7 @@ class SeedDMS_View_WorkflowSummary extends SeedDMS_Bootstrap_Style {
|
|||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$cachedir = $this->params['cachedir'];
|
||||
|
||||
$previewwidth = 40;
|
||||
$previewwidth = $this->params['previewWidthList'];
|
||||
|
||||
$this->htmlStartPage(getMLText("my_documents"));
|
||||
$this->globalNavigation();
|
||||
|
|
Loading…
Reference in New Issue
Block a user