From bb32deb74f7b25d52e33b345cc26a92c83f395ee Mon Sep 17 00:00:00 2001
From: steinm
Date: Wed, 6 Feb 2013 13:59:10 +0000
Subject: [PATCH] - show warning if document is in a workflow
---
views/bootstrap/class.UpdateDocument.php | 29 +++++++++++++-----------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php
index ea24a8323..b74e5f492 100644
--- a/views/bootstrap/class.UpdateDocument.php
+++ b/views/bootstrap/class.UpdateDocument.php
@@ -99,20 +99,20 @@ function checkForm()
print "";
}
- // Retrieve a list of all users and groups that have review / approve
- // privileges.
- $docAccess = $document->getApproversList();
-?>
+ if($workflowmode != 'traditional') {
+ $latestContent = $document->getLatestContent();
+ if($status = $latestContent->getStatus()) {
+ if($status["status"] == S_IN_WORKFLOW) {
+ $this->warningMsg("The current version of this document is in a workflow. This will be interrupted and cannot be completed if you upload a new version.");
+ }
+ }
+ }
-
-
-getID());
- }
-?>
-
-".sprintf(getMLText('link_alt_updatedocument'), "out.AddMultiDocument.php?folderid=".$folder->getID()."&showtree=".showtree())."
";
+ }
+ $this->warningMsg($msg);
$this->contentContainerStart();
?>
@@ -161,6 +161,9 @@ function checkForm()
}
}
if($workflowmode == 'traditional') {
+ // Retrieve a list of all users and groups that have review / approve
+ // privileges.
+ $docAccess = $document->getApproversList();
?>
|