From aab186c3a3102ad651de957a6c2f64b11c0b203b Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 1 Aug 2003 13:30:29 +0000 Subject: [PATCH] (#2806) corrected publishing conditions and error messages --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc index 39a082f..04a4693 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc @@ -460,7 +460,8 @@ function displayDependantDocumentButton($oDocument, $bEdit) { function displayPublishButton($oDocument, $bEdit) { // only display the publish button for unpublished documents - if (DocumentCollaboration::documentIsPendingWebPublishing($oDocument->getID())) { + if (!DocumentCollaboration::documentIsPublished($oDocument->getID()) && + !DocumentCollaboration::documentIsPendingWebPublishing($oDocument->getID())) { // if there is collaboration if ($oDocument->hasCollaboration()) { // only display publish button if collaboration is complete and you're the last user in the collaboration process (or a sysadmin) @@ -478,7 +479,11 @@ function displayPublishButton($oDocument, $bEdit) { } } } else { - $sDisabledText = "This document is already published."; + if (DocumentCollaboration::documentIsPublished($oDocument->getID())) { + $sDisabledText = "This document is already published."; + } else if (DocumentCollaboration::documentIsPendingWebPublishing($oDocument->getID())) { + $sDisabledText = "This document has been marked as pending publishing and the web publisher has been notified."; + } } return "" . displayButton("viewDocument", "fDocumentID=" . $oDocument->getID() . "&fForPublish=1", "publish", $sDisabledText) . "\n"; } -- libgit2 0.21.4