Commit 05633751411b14f7d18f20f06bae6adcc5dee53c
1 parent
f77b76b5
Started adding functionality for editing
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1865 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
25 additions
and
3 deletions
presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php
| ... | ... | @@ -71,6 +71,28 @@ if (checkSession()) { |
| 71 | 71 | $main->setHasRequiredFields(true); |
| 72 | 72 | $main->render(); |
| 73 | 73 | } |
| 74 | + } else if (isset($fForEdit)) { | |
| 75 | + $oFolderCollaboration = FolderCollaboration::get($fFolderCollaborationID); | |
| 76 | + if ($oFolderCollaboration->hasDocumentInProcess()) { | |
| 77 | + include_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 78 | + | |
| 79 | + $oPatternCustom = & new PatternCustom(); | |
| 80 | + $oPatternCustom->setHtml(getViewPage($fFolderCollaborationID, $fFolderID)); | |
| 81 | + $main->setCentralPayload($oPatternCustom); | |
| 82 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID&fFolderCollaborationID=$fFolderCollaborationID&fForAdd=1"); | |
| 83 | + $main->setErrorMessage("You cannot add a new depedant document as there is currently a document in this folder undergoing collaboration"); | |
| 84 | + $main->render(); | |
| 85 | + | |
| 86 | + } else { | |
| 87 | + include_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 88 | + | |
| 89 | + $oPatternCustom = & new PatternCustom(); | |
| 90 | + $oPatternCustom->setHtml(getAddPage($fFolderCollaborationID, $fFolderID, (isset($fUnitID) ? $fUnitID : -1), (isset($fDocumentTitle) ? $fDocumentTitle : ""), (isset($fTemplateDocument) ? $fTemplateDocument : ""), (isset($fDocumentID) ? $fDocumentID : "") )); | |
| 91 | + $main->setCentralPayload($oPatternCustom); | |
| 92 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID&fFolderCollaborationID=$fFolderCollaborationID&fForStore=1"); | |
| 93 | + $main->setHasRequiredFields(true); | |
| 94 | + $main->render(); | |
| 95 | + } | |
| 74 | 96 | } else { |
| 75 | 97 | include_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| 76 | 98 | ... | ... |
presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc
| ... | ... | @@ -33,9 +33,9 @@ function getDocumentLinkFolderCollaborationData($iFolderCollaborationID) { |
| 33 | 33 | $aColumns = array("document_title", "username", "template_document_name","edit"); |
| 34 | 34 | $aColumnHeaders = array("Document title", "Default creator", "Template document", "Edit"); |
| 35 | 35 | $aColumnTypes = array(1,1,3,3); |
| 36 | - $aDBColumnArray = array("id","group_folder_approval_link_id", "template_document_id"); | |
| 37 | - $aQueryStringVariableNames = array("fDependantDocumentTemplateID","fFolderCollaborationID","fDocumentID"); | |
| 38 | - $aLinkURLs = array(2=>"$default->rootUrl/control.php?action=viewDocument", 3=>"$default->rootUrl/control.php?action=linkDocFolderCollaboration"); | |
| 36 | + $aDBColumnArray = array("id","group_folder_approval_link_id","template_document_id"); | |
| 37 | + $aQueryStringVariableNames = array("fDependantDocumentTemplateID", "fFolderCollaborationID", "fDocumentID"); | |
| 38 | + $aLinkURLs = array(2=>"$default->rootUrl/control.php?action=viewDocument", 3=>"$default->rootUrl/control.php?action=viewDependantDocument&fForEdit=1"); | |
| 39 | 39 | |
| 40 | 40 | $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "90%", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames); |
| 41 | 41 | $oPatternTableSqlQuery->setTableHeading("Dependant Documents"); | ... | ... |