From 2e2058071e89f17137f1c8f9e36fb41fb1b46e0c Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Tue, 4 Mar 2003 08:13:15 +0000 Subject: [PATCH] only display the check in button if the current user has the document checked out. display download and back buttons after document has been checked out --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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"; } -- libgit2 0.21.4