Commit b784735e6741a3bfca3d595edd5a24a21648b541

Authored by rob
1 parent e632c72a

Added collaboration rollback functionality


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1299 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
@@ -109,7 +109,7 @@ if (checkSession()) { @@ -109,7 +109,7 @@ if (checkSession()) {
109 $main->setErrorMessage("The collaboration steps for the folder must be set up before collaboration can begin"); 109 $main->setErrorMessage("The collaboration steps for the folder must be set up before collaboration can begin");
110 $main->render(); 110 $main->render();
111 } 111 }
112 - } else if (isset($fCollaborationStepComplete)) { 112 + } else if ((isset($fCollaborationStepComplete)) && (Document::userIsPerformingCurrentCollaborationStep($fDocumentID))) {
113 //the user has signled that they have completed their step in the collaboration process 113 //the user has signled that they have completed their step in the collaboration process
114 if (Document::isLastStepInCollaborationProcess($fDocumentID)) { 114 if (Document::isLastStepInCollaborationProcess($fDocumentID)) {
115 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); 115 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
@@ -142,8 +142,8 @@ if (checkSession()) { @@ -142,8 +142,8 @@ if (checkSession()) {
142 $main->setCentralPayload($oPatternCustom); 142 $main->setCentralPayload($oPatternCustom);
143 $main->setErrorMessage("The next steps in the collaboration process have been started"); 143 $main->setErrorMessage("The next steps in the collaboration process have been started");
144 $main->render(); 144 $main->render();
145 - }  
146 - } else if (Permission::userHasDocumentWritePermission($fDocumentID) || Permission::userHasDocumentReadPermission($fDocumentID)) { 145 + }
  146 + } else if (Permission::userHasDocumentWritePermission($fDocumentID) || Permission::userHasDocumentReadPermission($fDocumentID)) {
147 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); 147 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
148 require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionEngine.inc"); 148 require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionEngine.inc");
149 149
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
@@ -160,14 +160,15 @@ function getEditPage($oDocument) { @@ -160,14 +160,15 @@ function getEditPage($oDocument) {
160 $sToRender .= "\t<tr>\n"; 160 $sToRender .= "\t<tr>\n";
161 if ((!Document::documentCollaborationStarted($oDocument->getID())) && ($_SESSION["userID"] == $oDocument->getCreatorID())) { 161 if ((!Document::documentCollaborationStarted($oDocument->getID())) && ($_SESSION["userID"] == $oDocument->getCreatorID())) {
162 //if not all collaboration steps have been set, then you cannot start the collaboration process 162 //if not all collaboration steps have been set, then you cannot start the collaboration process
163 - //only the creator of the document can start the collaboration process  
164 - $sToRender .= "\t\t<td><a href=" . $_SERVER['PHP_SELF'] . "?fDocumentID=" . $oDocument->getID() . "&fBeginCollaboration=1><img src=\"$default->graphicsUrl/widgets/begin.gif\" border=\"0\"/></a></td>\n"; 163 + //only the creator of the document can start the collaboration process
  164 + $sToRender .= "\t\t<td><a href=" . $_SERVER['PHP_SELF'] . "?fDocumentID=" . $oDocument->getID() . "&fBeginCollaboration=1><img src=\"$default->graphicsUrl/widgets/begin.gif\" border=\"0\"/></a>".
  165 + "<a href=" . $_SERVER['PHP_SELF'] . "?fDocumentID=" . $oDocument->getID() . "&fPublish=1><img src=\"$default->graphicsUrl/widgets/begin.gif\" border=\"0\"/></a></td>\n";
165 } else if (Document::userIsPerformingCurrentCollaborationStep($oDocument->getID())) { 166 } else if (Document::userIsPerformingCurrentCollaborationStep($oDocument->getID())) {
166 //if the current user is responsible for an active step in the collaboration process 167 //if the current user is responsible for an active step in the collaboration process
167 $sToRender .= "\t\t<td><table border=\"0\"><tr>\n"; 168 $sToRender .= "\t\t<td><table border=\"0\"><tr>\n";
168 $sToRender .= "\t\t<td><b>You currently have an active role<br> in the collaboration process</b></td>\n"; 169 $sToRender .= "\t\t<td><b>You currently have an active role<br> in the collaboration process</b></td>\n";
169 $sToRender .= "\t\t<td align=\"center\"><a href=" . $_SERVER['PHP_SELF'] . "?fDocumentID=" . $oDocument->getID() . "&fCollaborationStepComplete=1><img src=\"$default->graphicsUrl/widgets/update.gif\" border=\"0\"/></a></td>\n"; 170 $sToRender .= "\t\t<td align=\"center\"><a href=" . $_SERVER['PHP_SELF'] . "?fDocumentID=" . $oDocument->getID() . "&fCollaborationStepComplete=1><img src=\"$default->graphicsUrl/widgets/update.gif\" border=\"0\"/></a></td>\n";
170 - $sToRender .= "\t\t<td align=\"center\"><a href=" . $_SERVER['PHP_SELF'] . "?fDocumentID=" . $oDocument->getID() . "&fCollaborationStepReject=1><img src=\"$default->graphicsUrl/widgets/update.gif\" border=\"0\"/></a></td>\n"; 171 + $sToRender .= "\t\t<td align=\"center\"><a href=\"$default->rootUrl/control.php?action=collaborationStepReject&fDocumentID=$iDocumentID\"><img src=\"$default->graphicsUrl/widgets/reject.gif\" border=\"0\"/></a></td>\n";
171 $sToRender .= "\t\t</tr></table></td>\n"; 172 $sToRender .= "\t\t</tr></table></td>\n";
172 } 173 }
173 $sToRender .= "\t</tr>"; 174 $sToRender .= "\t</tr>";