From bafdf2ebde76596dc1661ef8a94509f6f3b907b5 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Tue, 15 Jul 2003 10:00:58 +0000 Subject: [PATCH] (#2676) integrated triggering download on successful document checkout --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php index 0c40509..21f1a5b 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php @@ -191,8 +191,13 @@ if (checkSession()) { $oPatternCustom->setHtml(getPage($oDocument, false)); } $main->setDHTMLScrolling(false); - $main->setOnLoadJavaScript("switchDiv('" . (isset($fShowSection) ? $fShowSection : "documentData") . "', 'document')"); - + + $sJavaScript = "switchDiv('" . (isset($fShowSection) ? $fShowSection : "documentData") . "', 'document');"; + if ($fCheckedOut) { + $sCheckOutMessage = "You have now checked out this document. No one else can make updates to the document while you have it checked out. Save the document, make your changes and check it back in as soon as you finish working on it."; + $sJavaScript .= "redirectLink('$sCheckOutMessage', '" . generateControllerUrl("downloadDocument", "fDocumentID=$fDocumentID") . "')"; + } + $main->setOnLoadJavaScript($sJavaScript); } else if ($oDocument->isArchived()) { // allow admins to restore the document -- libgit2 0.21.4