Commit f0ce32e303cd349ea7892cdafd6ec640a3f455af

Authored by rob
1 parent f1686209

Added inline view functionality


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1171 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
... ... @@ -62,7 +62,11 @@ if (checkSession()) {
62 62 $main->setErrorMessage("You cannot edit a document collaboration step that is completed or currently underway");
63 63 $main->setFormAction("$default->rootUrl/control.php?action=modifyDocument&fDocumentID=" . $oDocument->getID());
64 64 $main->render();
65   - } else if (isset($fForDownload) && Permission::userHasDocumentReadPermission($fDocumentID)) {
  65 + } else if (isset($fForInlineView) && Permission::userHasDocumentReadPermission($fDocumentID)) {
  66 + $oDocumentTransaction = & new DocumentTransaction($fDocumentID, "Inline view", DOWNLOAD);
  67 + $oDocumentTransaction->create();
  68 + PhysicalDocumentManager::inlineViewPhysicalDocument($fDocumentID);
  69 + } else if (isset($fForDownload) && Permission::userHasDocumentReadPermission($fDocumentID)) {
66 70 //if the user has document read permission, perform the download
67 71 $oDocumentTransaction = & new DocumentTransaction($fDocumentID, "Document downloaded", DOWNLOAD);
68 72 $oDocumentTransaction->create();
... ...
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
... ... @@ -15,7 +15,7 @@
15 15  
16 16 function renderDocumentPath($oDocument) {
17 17 global $default;
18   - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > " . $oDocument->getName();
  18 + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > <a href=\"" . $_SERVER["PHP_SELF"] . "?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\">" . $oDocument->getName() . "</a>";
19 19 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n";
20 20 }
21 21  
... ...