From 07944315a87b81a900dd454653926aff81b93cd5 Mon Sep 17 00:00:00 2001 From: steinm Date: Fri, 25 Jan 2013 07:37:19 +0000 Subject: [PATCH] - added preview images --- .../bootstrap/class.DocumentVersionDetail.php | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/views/bootstrap/class.DocumentVersionDetail.php b/views/bootstrap/class.DocumentVersionDetail.php index e3c600c11..452c22ace 100644 --- a/views/bootstrap/class.DocumentVersionDetail.php +++ b/views/bootstrap/class.DocumentVersionDetail.php @@ -39,6 +39,7 @@ class LetoDMS_View_DocumentVersionDetail extends LetoDMS_Bootstrap_Style { $version = $this->params['version']; $viewonlinefiletypes = $this->params['viewonlinefiletypes']; $enableversionmodification = $this->params['enableversionmodification']; + $cachedir = $this->params['cachedir']; $latestContent = $document->getLatestContent(); $status = $version->getStatus(); @@ -96,7 +97,7 @@ class LetoDMS_View_DocumentVersionDetail extends LetoDMS_Bootstrap_Style { $this->contentHeading(getMLText("details_version", array ("version" => $version->getVersion()))); $this->contentContainerStart(); - print ""; + print "
"; print "\n\n"; print "\n"; print "\n"; @@ -109,12 +110,18 @@ class LetoDMS_View_DocumentVersionDetail extends LetoDMS_Bootstrap_Style { print "\n"; + print ""; + $previewer = new LetoDMS_Preview_Previewer($cachedir, 100); + $previewer->createPreview($version); + if($previewer->hasPreview($version)) { + print("getID()."&version=".$version->getVersion()."&width=100\" title=\"".htmlspecialchars($version->getMimeType())."\">"); + } + print "\n"; print "\n"; print "
".getMLText("version")."".$version->getVersion()."