From 671f20542716cb71c9b783ad2ecb8e0d11edccd8 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 30 May 2003 14:46:27 +0000 Subject: [PATCH] only allow archiving if the document is available and not in collaboration --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc index 5c9cc97..b5a7ba0 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc @@ -13,18 +13,6 @@ * @package presentation.lookAndFeel.knowledgeTree.documentManager */ -/*function renderHeading() { - global $default; - $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); - $sColor = $default->siteMap->getSectionColour($sSectionName, "th"); - $sToRender = "\n"; - $sToRender .= "\n"; - $sToRender .= "\n"; - $sToRender .= "\n"; - $sToRender .= "
Document Detail
\n"; - return $sToRender; -}*/ - function renderDocumentPath($oDocument) { global $default; $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); @@ -221,7 +209,10 @@ function displayActionButtons($oDocument, $bEdit) { } $sToRender .= "graphicsUrl/widgets/download.gif\" border=\"0\" />\n"; $sToRender .= "graphicsUrl/widgets/discussion.gif\" border=\"0\" />\n"; - $sToRender .= "graphicsUrl/widgets/archive.gif\" border=\"0\" />\n"; + // only display the archive button for available documents + if (!$oDocument->getIsCheckedOut() || !$oDocument->hasCollaboration() || (!DocumentCollaboration::documentCollaborationStarted($oDocument->getID()))) { + $sToRender .= "graphicsUrl/widgets/archive.gif\" border=\"0\" />\n"; + } return $sToRender; } @@ -294,7 +285,7 @@ function getEditPage($oDocument) { //if the current user is responsible for an active step in the collaboration process $sToRender .= "\t\t\n"; $sToRender .= "\t\t\n"; - // collaboration cannot be started or approved/rejected unless the document is not checked out + // collaboration cannot be started or approved/rejected if the document is checked out if (!$oDocument->getIsCheckedOut()) { $sToRender .= "\t\t\n"; $sToRender .= "\t\t\n"; -- libgit2 0.21.4
You currently have an active role
in the collaboration process
graphicsUrl/widgets/approve.gif\" border=\"0\"/>rootUrl/control.php?action=collaborationStepReject&fDocumentID=$iDocumentID\">graphicsUrl/widgets/reject.gif\" border=\"0\"/>