diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc index b27c2b8..bd72ee8 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc @@ -183,8 +183,8 @@ function getEditPage($oDocument) { $sToRender .= "graphicsUrl/widgets/delete.gif\" border=\"0\" />\n"; $sToRender .= "graphicsUrl/widgets/history.gif\" border=\"0\" />\n"; - // display the check in button if the document is checked out - if ($oDocument->getIsCheckedOut()) { + // display the check in button if the document is checked out and you checked the document out + if ($oDocument->getIsCheckedOut() && ($oDocument->getCheckedOutUserID() == $_SESSION["userID"])) { $sToRender .= "graphicsUrl/widgets/checkin.gif\" border=\"0\" />\n"; // otherwise display the check out button } else { @@ -287,6 +287,10 @@ function getCheckOutEditPage($oDocument, $bCheckedOut = false) { $sToRender .= "\t\n"; if ($bCheckedOut) { $sToRender .= "\t\t" . wrapInTable("You have now checked out this document. No one else can make updates to the document while you have it checked out. Click the Download button to get the latest version of the file. Please check it back in, as soon as you finish working on it.") . "\n"; + $sToRender .= "\t"; + $sToRender .= "\t\n"; + $sToRender .= "rootUrl/control.php?action=viewDocument&fDocumentID=" . $oDocument->getID() . "&fForDownload=1\">graphicsUrl/widgets/download.gif\" border=\"0\" />\n"; + $sToRender .= "rootUrl/control.php?action=viewDocument&fDocumentID=" . $oDocument->getID() . "\">graphicsUrl/widgets/back.gif\" border=\"0\" />\n"; } else { $sToRender .= "\t\t" . wrapInTable(renderCheckOutPage($oDocument)) . "\n"; }