mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +00:00
show preview image in list
This commit is contained in:
parent
5cbc63bb7a
commit
dd13814139
|
@ -24,12 +24,17 @@ include("../inc/inc.Language.php");
|
||||||
include("../inc/inc.ClassUI.php");
|
include("../inc/inc.ClassUI.php");
|
||||||
include("../inc/inc.Authentication.php");
|
include("../inc/inc.Authentication.php");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Include class to preview documents
|
||||||
|
*/
|
||||||
|
require_once("SeedDMS/Preview.php");
|
||||||
|
|
||||||
if ($user->isGuest()) {
|
if ($user->isGuest()) {
|
||||||
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
|
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'cachedir'=>$settings->_cacheDir, 'previewWidthList'=>$settings->_previewWidthList));
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->show();
|
$view->show();
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -25,12 +25,17 @@ include("../inc/inc.Language.php");
|
||||||
include("../inc/inc.ClassUI.php");
|
include("../inc/inc.ClassUI.php");
|
||||||
include("../inc/inc.Authentication.php");
|
include("../inc/inc.Authentication.php");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Include class to preview documents
|
||||||
|
*/
|
||||||
|
require_once("SeedDMS/Preview.php");
|
||||||
|
|
||||||
if ($user->isGuest()) {
|
if ($user->isGuest()) {
|
||||||
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
|
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'cachedir'=>$settings->_cacheDir, 'previewWidthList'=>$settings->_previewWidthList));
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->show();
|
$view->show();
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -34,7 +34,10 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
||||||
function show() { /* {{{ */
|
function show() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$db = $dms->getDB();
|
$cachedir = $this->params['cachedir'];
|
||||||
|
$previewwidth = $this->params['previewWidthList'];
|
||||||
|
|
||||||
|
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("approval_summary"));
|
$this->htmlStartPage(getMLText("approval_summary"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
|
@ -54,8 +57,8 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
||||||
$printheader = true;
|
$printheader = true;
|
||||||
foreach ($approvalStatus["indstatus"] as $st) {
|
foreach ($approvalStatus["indstatus"] as $st) {
|
||||||
$document = $dms->getDocument($st['documentID']);
|
$document = $dms->getDocument($st['documentID']);
|
||||||
if($document)
|
$version = $document->getContentByVersion($st['version']);
|
||||||
$version = $document->getContentByVersion($st['version']);
|
$previewer->createPreview($version);
|
||||||
$owner = $document->getOwner();
|
$owner = $document->getOwner();
|
||||||
$moduser = $dms->getUser($st['required']);
|
$moduser = $dms->getUser($st['required']);
|
||||||
|
|
||||||
|
@ -64,6 +67,7 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
||||||
if ($printheader){
|
if ($printheader){
|
||||||
print "<table class=\"table-condensed\">";
|
print "<table class=\"table-condensed\">";
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
|
print "<th></th>\n";
|
||||||
print "<th>".getMLText("name")."</th>\n";
|
print "<th>".getMLText("name")."</th>\n";
|
||||||
print "<th>".getMLText("owner")."</th>\n";
|
print "<th>".getMLText("owner")."</th>\n";
|
||||||
print "<th>".getMLText("status")."</th>\n";
|
print "<th>".getMLText("status")."</th>\n";
|
||||||
|
@ -75,6 +79,14 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
|
$previewer->createPreview($version);
|
||||||
|
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||||
|
if($previewer->hasPreview($version)) {
|
||||||
|
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
} else {
|
||||||
|
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
}
|
||||||
|
print "</a></td>";
|
||||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</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>".htmlspecialchars($owner->getFullName())."</td>";
|
||||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||||
|
@ -100,8 +112,7 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
||||||
$printheader = true;
|
$printheader = true;
|
||||||
foreach ($approvalStatus["grpstatus"] as $st) {
|
foreach ($approvalStatus["grpstatus"] as $st) {
|
||||||
$document = $dms->getDocument($st['documentID']);
|
$document = $dms->getDocument($st['documentID']);
|
||||||
if($document)
|
$version = $document->getContentByVersion($st['version']);
|
||||||
$version = $document->getContentByVersion($st['version']);
|
|
||||||
$owner = $document->getOwner();
|
$owner = $document->getOwner();
|
||||||
$modgroup = $dms->getGroup($st['required']);
|
$modgroup = $dms->getGroup($st['required']);
|
||||||
|
|
||||||
|
@ -110,6 +121,7 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
||||||
if ($printheader){
|
if ($printheader){
|
||||||
print "<table class=\"table-condensed\">";
|
print "<table class=\"table-condensed\">";
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
|
print "<th></th>\n";
|
||||||
print "<th>".getMLText("name")."</th>\n";
|
print "<th>".getMLText("name")."</th>\n";
|
||||||
print "<th>".getMLText("owner")."</th>\n";
|
print "<th>".getMLText("owner")."</th>\n";
|
||||||
print "<th>".getMLText("status")."</th>\n";
|
print "<th>".getMLText("status")."</th>\n";
|
||||||
|
@ -121,6 +133,14 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
|
$previewer->createPreview($version);
|
||||||
|
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||||
|
if($previewer->hasPreview($version)) {
|
||||||
|
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
} else {
|
||||||
|
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
}
|
||||||
|
print "</a></td>";
|
||||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</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>".htmlspecialchars($owner->getFullName())."</td>";
|
||||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||||
|
|
|
@ -34,6 +34,10 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
||||||
function show() { /* {{{ */
|
function show() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
|
$cachedir = $this->params['cachedir'];
|
||||||
|
$previewwidth = $this->params['previewWidthList'];
|
||||||
|
|
||||||
|
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("my_documents"));
|
$this->htmlStartPage(getMLText("my_documents"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
|
@ -56,8 +60,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
||||||
$iRev = array();
|
$iRev = array();
|
||||||
foreach ($reviewStatus["indstatus"] as $st) {
|
foreach ($reviewStatus["indstatus"] as $st) {
|
||||||
$document = $dms->getDocument($st['documentID']);
|
$document = $dms->getDocument($st['documentID']);
|
||||||
if($document)
|
$version = $document->getContentByVersion($st['version']);
|
||||||
$version = $document->getContentByVersion($st['version']);
|
|
||||||
$owner = $document->getOwner();
|
$owner = $document->getOwner();
|
||||||
$moduser = $dms->getUser($st['required']);
|
$moduser = $dms->getUser($st['required']);
|
||||||
|
|
||||||
|
@ -66,6 +69,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
||||||
if ($printheader){
|
if ($printheader){
|
||||||
print "<table class=\"table-condensed\">";
|
print "<table class=\"table-condensed\">";
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
|
print "<th></th>\n";
|
||||||
print "<th>".getMLText("name")."</th>\n";
|
print "<th>".getMLText("name")."</th>\n";
|
||||||
print "<th>".getMLText("owner")."</th>\n";
|
print "<th>".getMLText("owner")."</th>\n";
|
||||||
print "<th>".getMLText("status")."</th>\n";
|
print "<th>".getMLText("status")."</th>\n";
|
||||||
|
@ -77,6 +81,14 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
|
$previewer->createPreview($version);
|
||||||
|
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||||
|
if($previewer->hasPreview($version)) {
|
||||||
|
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
} else {
|
||||||
|
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
}
|
||||||
|
print "</a></td>";
|
||||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</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>".htmlspecialchars($owner->getFullName())."</td>";
|
||||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||||
|
@ -102,8 +114,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
||||||
$printheader=true;
|
$printheader=true;
|
||||||
foreach ($reviewStatus["grpstatus"] as $st) {
|
foreach ($reviewStatus["grpstatus"] as $st) {
|
||||||
$document = $dms->getDocument($st['documentID']);
|
$document = $dms->getDocument($st['documentID']);
|
||||||
if($document)
|
$version = $document->getContentByVersion($st['version']);
|
||||||
$version = $document->getContentByVersion($st['version']);
|
|
||||||
$owner = $document->getOwner();
|
$owner = $document->getOwner();
|
||||||
$modgroup = $dms->getGroup($st['required']);
|
$modgroup = $dms->getGroup($st['required']);
|
||||||
|
|
||||||
|
@ -112,6 +123,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
||||||
if ($printheader){
|
if ($printheader){
|
||||||
print "<table class=\"folderView\">";
|
print "<table class=\"folderView\">";
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
|
print "<th></th>\n";
|
||||||
print "<th>".getMLText("name")."</th>\n";
|
print "<th>".getMLText("name")."</th>\n";
|
||||||
print "<th>".getMLText("owner")."</th>\n";
|
print "<th>".getMLText("owner")."</th>\n";
|
||||||
print "<th>".getMLText("status")."</th>\n";
|
print "<th>".getMLText("status")."</th>\n";
|
||||||
|
@ -123,6 +135,14 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
|
$previewer->createPreview($version);
|
||||||
|
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||||
|
if($previewer->hasPreview($version)) {
|
||||||
|
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
} else {
|
||||||
|
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
}
|
||||||
|
print "</a></td>";
|
||||||
print "<td><a href=\"out.DocumentVersionDetail.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">".htmlspecialchars($document->getName())."</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>".htmlspecialchars($owner->getFullName())."</td>";
|
||||||
print "<td>".getOverallStatusText($st["status"])."</td>";
|
print "<td>".getOverallStatusText($st["status"])."</td>";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user