Commit 812ef4e57cab02c1d7963ac0eaba6f3c2faec023

Authored by Michael Joseph
1 parent f5a29ea5

phpdoc and added document path and heading


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2169 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/addDocumentLinkBL.php
1 <?php 1 <?php
2 -  
3 /** 2 /**
4 -* Business Logic to link a two documents together in a parent child  
5 -* relationship  
6 -*  
7 -* Expected form variable:  
8 -* o $fDocumentID - primary key of document user is currently viewing  
9 -*  
10 -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa  
11 -* @date 22 May 2003  
12 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
13 -*/ 3 + * $Id$
  4 + *
  5 + * Business Logic to link a two documents together in a parent child
  6 + * relationship
  7 + *
  8 + * Expected form variable:
  9 + * o $fDocumentID - primary key of document user is currently viewing
  10 + *
  11 + * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
  12 + *
  13 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  14 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  15 + */
14 16
15 require_once("../../../../config/dmsDefaults.php"); 17 require_once("../../../../config/dmsDefaults.php");
16 18
@@ -20,6 +22,7 @@ if (checkSession()) { @@ -20,6 +22,7 @@ if (checkSession()) {
20 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); 22 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc");
21 require_once("$default->fileSystemRoot/lib/security/permission.inc"); 23 require_once("$default->fileSystemRoot/lib/security/permission.inc");
22 require_once("$default->fileSystemRoot/presentation/Html.inc"); 24 require_once("$default->fileSystemRoot/presentation/Html.inc");
  25 + require_once("documentUI.inc");
23 require_once("addDocumentLinkUI.inc"); 26 require_once("addDocumentLinkUI.inc");
24 27
25 if (Permission::userHasDocumentWritePermission($fDocumentID)) { 28 if (Permission::userHasDocumentWritePermission($fDocumentID)) {
@@ -40,7 +43,6 @@ if (checkSession()) { @@ -40,7 +43,6 @@ if (checkSession()) {
40 $main->setHasRequiredFields(true); 43 $main->setHasRequiredFields(true);
41 $main->setErrorMessage("An error occured whilst attempting to link the two documents"); 44 $main->setErrorMessage("An error occured whilst attempting to link the two documents");
42 $main->render(); 45 $main->render();
43 -  
44 } 46 }
45 } else { 47 } else {
46 //display the add page 48 //display the add page
@@ -53,10 +55,6 @@ if (checkSession()) { @@ -53,10 +55,6 @@ if (checkSession()) {
53 $main->setHasRequiredFields(true); 55 $main->setHasRequiredFields(true);
54 $main->render(); 56 $main->render();
55 } 57 }
56 -  
57 - }  
58 -  
59 - 58 + }
60 } 59 }
61 -  
62 ?> 60 ?>
63 \ No newline at end of file 61 \ No newline at end of file
presentation/lookAndFeel/knowledgeTree/documentmanagement/addDocumentLinkUI.inc
1 <?php 1 <?php
2 /** 2 /**
3 -* Presentation logic used to link one document to another  
4 -*  
5 -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa  
6 -* @date 22 May 2003  
7 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
8 -*/  
9 -  
10 -  
11 -/*function renderHeading($sHeading) {  
12 - global $default;  
13 - $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));  
14 - $sColor = $default->siteMap->getSectionColour($sSectionName, "th");  
15 - $sToRender = "<table border=\"0\" width=\"100%\">\n";  
16 - $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\"><font color=\"ffffff\">$sHeading</font></th></tr>\n";  
17 - $sToRender .= "<tr/>\n";  
18 - $sToRender .= "<tr/>\n";  
19 - $sToRender .= "</table>\n";  
20 - return $sToRender;  
21 -}*/ 3 + * $Id$
  4 + *
  5 + * Presentation logic used to link one document to another
  6 + *
  7 + * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
  8 + *
  9 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  10 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  11 + */
22 12
23 function getPage($iDocumentID) { 13 function getPage($iDocumentID) {
24 global $default; 14 global $default;
25 15
26 $sToRender = renderHeading("Document Linking"); 16 $sToRender = renderHeading("Document Linking");
  17 + $sToRender .= displayDocumentPath($iDocumentID);
27 $sToRender .= "<table>"; 18 $sToRender .= "<table>";
28 $sToRender .= "<tr>"; 19 $sToRender .= "<tr>";
29 //had a slight problem with netscape 4.7x - it doesn't support disabled. So I had to use 20 //had a slight problem with netscape 4.7x - it doesn't support disabled. So I had to use
@@ -75,8 +66,5 @@ function getNetscapeDisableScript() { @@ -75,8 +66,5 @@ function getNetscapeDisableScript() {
75 $sToRender .= "}\n"; 66 $sToRender .= "}\n";
76 $sToRender .= "//--></script>\n\n"; 67 $sToRender .= "//--></script>\n\n";
77 return $sToRender; 68 return $sToRender;
78 -  
79 } 69 }
80 -  
81 -  
82 ?> 70 ?>
83 \ No newline at end of file 71 \ No newline at end of file
presentation/lookAndFeel/knowledgeTree/documentmanagement/collaborationBL.php
1 <?php 1 <?php
2 /** 2 /**
3 -* Document collaboration business logic - contains business logic to set up  
4 -* document approval process  
5 -*  
6 -* Required form variables:  
7 -* o fFolderCollaborationID - primary key of folder collaboration entry we are viewing  
8 -* o fDocumentID - primary key of document this folder collaboration entry is for  
9 -* o fIsActive - whether the document collaboration set is active or not  
10 -*  
11 -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa  
12 -* @date 28 January 2003  
13 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
14 -*  
15 -*/ 3 + * $Id$
  4 + *
  5 + * Document collaboration business logic - contains business logic to set up
  6 + * document approval process
  7 + *
  8 + * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
  9 + *
  10 + * Required form variables:
  11 + * o fFolderCollaborationID - primary key of folder collaboration entry we are viewing
  12 + * o fDocumentID - primary key of document this folder collaboration entry is for
  13 + * o fIsActive - whether the document collaboration set is active or not
  14 + *
  15 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  16 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  17 + */
16 18
17 require_once("../../../../config/dmsDefaults.php"); 19 require_once("../../../../config/dmsDefaults.php");
18 20
@@ -30,6 +32,7 @@ if (checkSession()) { @@ -30,6 +32,7 @@ if (checkSession()) {
30 require_once("$default->fileSystemRoot/presentation/Html.inc"); 32 require_once("$default->fileSystemRoot/presentation/Html.inc");
31 require_once("$default->fileSystemRoot/lib/security/permission.inc"); 33 require_once("$default->fileSystemRoot/lib/security/permission.inc");
32 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); 34 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc");
  35 + require_once("documentUI.inc");
33 require_once("collaborationUI.inc"); 36 require_once("collaborationUI.inc");
34 37
35 38
presentation/lookAndFeel/knowledgeTree/documentmanagement/collaborationUI.inc
1 <?php 1 <?php
2 /** 2 /**
3 -* Presentation data for collaborationBL.php  
4 -*  
5 -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa  
6 -* @date 28 January 2003  
7 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
8 -*  
9 -*/ 3 + * $Id$
  4 + *
  5 + * Presentation data for collaborationBL.php
  6 + *
  7 + * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
  8 + *
  9 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  10 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  11 + */
10 12
11 function getGroupRow($iGroupID) { 13 function getGroupRow($iGroupID) {
12 $oGroup = Group::get($iGroupID); 14 $oGroup = Group::get($iGroupID);
@@ -47,7 +49,9 @@ function getDocumentRoutingPage($iGroupID, $iUserID, $iRoleID, $iSequenceNumber, @@ -47,7 +49,9 @@ function getDocumentRoutingPage($iGroupID, $iUserID, $iRoleID, $iSequenceNumber,
47 $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); 49 $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
48 $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); 50 $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
49 $sTHBGColour = $default->siteMap->getSectionColour($sSectionName, "th"); 51 $sTHBGColour = $default->siteMap->getSectionColour($sSectionName, "th");
50 - return "<table cellspacing=2, cellpadding=2, border=0>\n" . 52 + return renderHeading("Edit Document Approval Routing") .
  53 + displayDocumentPath($fDocumentID) .
  54 + "<table cellspacing=2, cellpadding=2, border=0>\n" .
51 "<caption><b>Document Routing</b></caption>\n" . 55 "<caption><b>Document Routing</b></caption>\n" .
52 "<tr>\n" . 56 "<tr>\n" .
53 "<td bgcolor=\"$sTDBGColour\"><b>Group</b></td><td>".getGroupRow($iGroupID)."</td>\n" . 57 "<td bgcolor=\"$sTDBGColour\"><b>Group</b></td><td>".getGroupRow($iGroupID)."</td>\n" .
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyBL.php
1 <?php 1 <?php
2 /** 2 /**
3 -* Business logic data used to modify documents (will use modifyUI.inc)  
4 -*  
5 -* Expected form variables:  
6 -* o fDocumentID - primary key of document being edited  
7 -* Optional form variables  
8 -* o fForUpdate - generated when user clicks update on page and results in database update  
9 -* o fFirstEdit - generated from the document upload page when the user first uploads a document.  
10 -* Is used to force the user to enter the necessary generic meta data  
11 -*  
12 -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa  
13 -* @date 24 January 2003  
14 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
15 -*  
16 -*/ 3 + * $Id$
  4 + *
  5 + * Business logic data used to modify documents (will use modifyUI.inc)
  6 + *
  7 + * Expected form variables:
  8 + * o fDocumentID - primary key of document being edited
  9 + * Optional form variables
  10 + * o fForUpdate - generated when user clicks update on page and results in database update
  11 + * o fFirstEdit - generated from the document upload page when the user first uploads a document.
  12 + * Is used to force the user to enter the necessary generic meta data
  13 + *
  14 + * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
  15 + *
  16 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  17 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  18 + */
17 19
18 require_once("../../../../config/dmsDefaults.php"); 20 require_once("../../../../config/dmsDefaults.php");
19 21
@@ -29,6 +31,7 @@ if (checkSession()) { @@ -29,6 +31,7 @@ if (checkSession()) {
29 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableTableSqlQuery.inc"); 31 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableTableSqlQuery.inc");
30 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableListFromQuery.inc"); 32 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableListFromQuery.inc");
31 require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc"); 33 require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc");
  34 + require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc");
32 require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); 35 require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc");
33 require_once("$default->fileSystemRoot/presentation/Html.inc"); 36 require_once("$default->fileSystemRoot/presentation/Html.inc");
34 37
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyGenericMetaDataBL.php
1 <?php 1 <?php
2 /** 2 /**
3 -* Expected form variables:  
4 -* o fDocumentID - primary key of document being editid  
5 -* Optional form variables:  
6 -* o fFirstTime - set by addDocumentBL on first time uploads and forces the user to  
7 -* fill out the generic meta data  
8 -*  
9 -*  
10 -*/ 3 + * $Id$
  4 + *
  5 + * Expected form variables:
  6 + * o fDocumentID - primary key of document being editid
  7 + * Optional form variables:
  8 + * o fFirstTime - set by addDocumentBL on first time uploads and forces the user to
  9 + * fill out the generic meta data
  10 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  11 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  12 + */
11 13
12 require_once("../../../../config/dmsDefaults.php"); 14 require_once("../../../../config/dmsDefaults.php");
13 15
@@ -19,6 +21,7 @@ if (checkSession()) { @@ -19,6 +21,7 @@ if (checkSession()) {
19 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableTableSqlQuery.inc"); 21 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableTableSqlQuery.inc");
20 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternMetaData.inc"); 22 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternMetaData.inc");
21 require_once("$default->fileSystemRoot/presentation/Html.inc"); 23 require_once("$default->fileSystemRoot/presentation/Html.inc");
  24 + require_once("documentUI.inc");
22 require_once("modifyGenericMetaDataUI.inc"); 25 require_once("modifyGenericMetaDataUI.inc");
23 26
24 if (Permission::userHasDocumentWritePermission($fDocumentID)) { 27 if (Permission::userHasDocumentWritePermission($fDocumentID)) {
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyGenericMetaDataUI.inc
1 <?php 1 <?php
2 - 2 +/**
  3 + * $Id$
  4 + *
  5 + * Contains HTML information required to display the generic meta data edit page.
  6 + *
  7 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  8 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  9 + */
  10 +
3 function getEditableGenericMetaData($iDocumentID, $iDocumentTypeID) { 11 function getEditableGenericMetaData($iDocumentID, $iDocumentTypeID) {
4 global $default; 12 global $default;
5 $sQuery = "SELECT DISTINCT $iDocumentID AS document_id, COALESCE(DFL.id, -1) AS id, DF.id AS document_field_id, DFL.value AS value, DF.name AS field_name " . 13 $sQuery = "SELECT DISTINCT $iDocumentID AS document_id, COALESCE(DFL.id, -1) AS id, DF.id AS document_field_id, DFL.value AS value, DF.name AS field_name " .
@@ -25,7 +33,10 @@ function getEditableGenericMetaData($iDocumentID, $iDocumentTypeID) { @@ -25,7 +33,10 @@ function getEditableGenericMetaData($iDocumentID, $iDocumentTypeID) {
25 33
26 function getPage($iDocumentID, $iDocumentTypeID, $fFirstEdit) { 34 function getPage($iDocumentID, $iDocumentTypeID, $fFirstEdit) {
27 global $default; 35 global $default;
28 - $sToRender = "<table>\n"; 36 +
  37 + $sToRender .= renderHeading("Edit Generic Meta Data");
  38 + $sToRender .= displayDocumentPath($iDocumentID);
  39 + $sToRender .= "<table>\n";
29 $sToRender .= "<tr>\n"; 40 $sToRender .= "<tr>\n";
30 $sToRender .= "<td>\n"; 41 $sToRender .= "<td>\n";
31 $sToRender .= getEditableGenericMetaData($iDocumentID, $iDocumentTypeID); 42 $sToRender .= getEditableGenericMetaData($iDocumentID, $iDocumentTypeID);
@@ -54,5 +65,4 @@ function getPage($iDocumentID, $iDocumentTypeID, $fFirstEdit) { @@ -54,5 +65,4 @@ function getPage($iDocumentID, $iDocumentTypeID, $fFirstEdit) {
54 65
55 return $sToRender; 66 return $sToRender;
56 } 67 }
57 -  
58 -?> 68 +?>
59 \ No newline at end of file 69 \ No newline at end of file
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifySpecificMetaDataBL.php
1 <?php 1 <?php
2 /** 2 /**
3 -* Business logic to modify type specific meta data for a document  
4 -*  
5 -* @author Rob Cherry, Jam Warehouse South Africa (Pty) Ltd  
6 -* @date 28 February 2003  
7 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
8 -*/ 3 + * $Id$
  4 + *
  5 + * Business logic to modify type specific meta data for a document
  6 + *
  7 + * @author Rob Cherry, Jam Warehouse South Africa (Pty) Ltd
  8 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  9 + */
9 10
10 require_once("../../../../config/dmsDefaults.php"); 11 require_once("../../../../config/dmsDefaults.php");
11 12
12 -if (checkSession()) {  
13 - 13 +if (checkSession()) {
14 require_once("$default->fileSystemRoot/lib/security/permission.inc"); 14 require_once("$default->fileSystemRoot/lib/security/permission.inc");
15 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); 15 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc");
16 require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); 16 require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc");
@@ -18,6 +18,7 @@ if (checkSession()) { @@ -18,6 +18,7 @@ if (checkSession()) {
18 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableTableSqlQuery.inc"); 18 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableTableSqlQuery.inc");
19 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternMetaData.inc"); 19 require_once("$default->fileSystemRoot/lib/visualpatterns/PatternMetaData.inc");
20 require_once("$default->fileSystemRoot/presentation/Html.inc"); 20 require_once("$default->fileSystemRoot/presentation/Html.inc");
  21 + require_once("documentUI.inc");
21 require_once("modifySpecificMetaDataUI.inc"); 22 require_once("modifySpecificMetaDataUI.inc");
22 23
23 if (Permission::userHasDocumentWritePermission($fDocumentID)) { 24 if (Permission::userHasDocumentWritePermission($fDocumentID)) {
@@ -30,7 +31,5 @@ if (checkSession()) { @@ -30,7 +31,5 @@ if (checkSession()) {
30 $main->setHasRequiredFields(true); 31 $main->setHasRequiredFields(true);
31 $main->render(); 32 $main->render();
32 } 33 }
33 -  
34 } 34 }
35 -  
36 -?> 35 +?>
37 \ No newline at end of file 36 \ No newline at end of file
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifySpecificMetaDataUI.inc
1 <?php 1 <?php
2 -  
3 /** 2 /**
4 -* Presentation information used by modifySpecificMetaDataBL.php  
5 -*  
6 -* @author Rob Cherry, Jam Warehouse South Africa (Pty) Ltd  
7 -* @date 28 February 2003  
8 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
9 -*/ 3 + * $Id$
  4 + *
  5 + * Presentation information used by modifySpecificMetaDataBL.php
  6 + *
  7 + * @author Rob Cherry, Jam Warehouse South Africa (Pty) Ltd
  8 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  9 + */
10 10
11 function getEditableTypeSpecificMetaData($iDocumentID, $iDocumentTypeID) { 11 function getEditableTypeSpecificMetaData($iDocumentID, $iDocumentTypeID) {
12 global $default; 12 global $default;
@@ -34,7 +34,9 @@ function getEditableTypeSpecificMetaData($iDocumentID, $iDocumentTypeID) { @@ -34,7 +34,9 @@ function getEditableTypeSpecificMetaData($iDocumentID, $iDocumentTypeID) {
34 34
35 function getPage($iDocumentID, $iDocumentTypeID, $bFirstEdit) { 35 function getPage($iDocumentID, $iDocumentTypeID, $bFirstEdit) {
36 global $default; 36 global $default;
37 - $sToRender = "<table>\n"; 37 + $sToRender .= renderHeading("Edit Type Specific Meta Data");
  38 + $sToRender .= displayDocumentPath($iDocumentID);
  39 + $sToRender .= "<table>\n";
38 $sToRender .= "<tr>\n"; 40 $sToRender .= "<tr>\n";
39 $sToRender .= "<td>\n"; 41 $sToRender .= "<td>\n";
40 $sToRender .= getEditableTypeSpecificMetaData($iDocumentID, $iDocumentTypeID); 42 $sToRender .= getEditableTypeSpecificMetaData($iDocumentID, $iDocumentTypeID);
@@ -62,7 +64,4 @@ function getPage($iDocumentID, $iDocumentTypeID, $bFirstEdit) { @@ -62,7 +64,4 @@ function getPage($iDocumentID, $iDocumentTypeID, $bFirstEdit) {
62 64
63 return $sToRender; 65 return $sToRender;
64 } 66 }
65 -  
66 -?>  
67 -  
68 - 67 +?>
69 \ No newline at end of file 68 \ No newline at end of file
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc
1 <?php 1 <?php
2 -  
3 /** 2 /**
4 -* Presentation data used to modify documents (will be used by modifyBL.inc)  
5 -*  
6 -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa  
7 -* @date 24 January 2003  
8 -* @package presentation.lookAndFeel.knowledgeTree.documentmanagement  
9 -*  
10 -*/ 3 + * $Id$
  4 + *
  5 + * Presentation data used to modify documents (will be used by modifyBL.inc)
  6 + *
  7 + * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
  8 + *
  9 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  10 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  11 + */
11 12
12 function renderDocumentPath($oDocument) { 13 function renderDocumentPath($oDocument) {
13 $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID())) . " > " . $oDocument->getName(); 14 $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID())) . " > " . $oDocument->getName();
@@ -21,8 +22,8 @@ function renderEditableDocumentData($oDocument, $iDocumentTypeID) { @@ -21,8 +22,8 @@ function renderEditableDocumentData($oDocument, $iDocumentTypeID) {
21 22
22 $sToRender; 23 $sToRender;
23 if ($oDocument) { 24 if ($oDocument) {
24 - $sToRender = "<table>\n";  
25 - $sToRender .= "<caption>Document Data</caption>\n"; 25 + $sToRender .= "<table>\n";
  26 + $sToRender .= "<caption><strong>Document Data</strong></caption>\n";
26 $sToRender .= "<tr>\n"; 27 $sToRender .= "<tr>\n";
27 $sToRender .= "<td bgcolor=\"$sTDBGColour\">\n"; 28 $sToRender .= "<td bgcolor=\"$sTDBGColour\">\n";
28 $sToRender .= "<b>Document Title </b>\n"; 29 $sToRender .= "<b>Document Title </b>\n";
@@ -62,7 +63,9 @@ function getDocumentType($iFolderID, $iDocumentTypeID) { @@ -62,7 +63,9 @@ function getDocumentType($iFolderID, $iDocumentTypeID) {
62 63
63 function renderPage($oDocument, $iDocumentTypeID, $fFirstEdit) { 64 function renderPage($oDocument, $iDocumentTypeID, $fFirstEdit) {
64 global $default; 65 global $default;
65 - $sToRender = "<table border = 0>\n"; 66 + $sToRender = renderHeading("Edit Document Details");
  67 + $sToRender .= displayDocumentPath($oDocument->getID());
  68 + $sToRender .= "<table border = 0>\n";
66 $sToRender .= "<tr>\n"; 69 $sToRender .= "<tr>\n";
67 $sToRender .= "<td>\n"; 70 $sToRender .= "<td>\n";
68 $sToRender .= renderEditableDocumentData($oDocument, $iDocumentTypeID) . "\n"; 71 $sToRender .= renderEditableDocumentData($oDocument, $iDocumentTypeID) . "\n";
presentation/lookAndFeel/knowledgeTree/documentmanagement/removeDocumentLinkBL.php
1 <?php 1 <?php
2 2
3 /** 3 /**
4 -* Business logic for unlinking a parent document from a child documenbt  
5 -*  
6 -* Expected form variables:  
7 -* $fDocumentLinkID - primary key of document link to delete  
8 -* $fChildDocumentID - primary key of child document to which parent document is linked  
9 -* $fParentDocumentID - primary key of parent document  
10 -*  
11 -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa  
12 -* @date 22 May 2003  
13 -*  
14 -*/  
15 -  
16 - 4 + * $Id$
  5 + *
  6 + * Business logic for unlinking a parent document from a child documenbt
  7 + *
  8 + * Expected form variables:
  9 + * $fDocumentLinkID - primary key of document link to delete
  10 + * $fChildDocumentID - primary key of child document to which parent document is linked
  11 + * $fParentDocumentID - primary key of parent document
  12 + *
  13 + * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
  14 + *
  15 + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  16 + * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
  17 + */
17 require_once("../../../../config/dmsDefaults.php"); 18 require_once("../../../../config/dmsDefaults.php");
18 19
19 if (checkSession()) { 20 if (checkSession()) {
@@ -21,9 +22,9 @@ if (checkSession()) { @@ -21,9 +22,9 @@ if (checkSession()) {
21 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); 22 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc");
22 require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentLink.inc"); 23 require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentLink.inc");
23 require_once("$default->fileSystemRoot/presentation/Html.inc"); 24 require_once("$default->fileSystemRoot/presentation/Html.inc");
  25 + require_once("documentUI.inc");
24 require_once("removeDocumentLinkUI.inc"); 26 require_once("removeDocumentLinkUI.inc");
25 -  
26 - 27 +
27 if (Permission::userHasDocumentWritePermission($fParentDocumentID)) { 28 if (Permission::userHasDocumentWritePermission($fParentDocumentID)) {
28 if (isset($fForDelete)) { 29 if (isset($fForDelete)) {
29 //deleting a document link 30 //deleting a document link
@@ -69,6 +70,4 @@ if (checkSession()) { @@ -69,6 +70,4 @@ if (checkSession()) {
69 $main->render(); 70 $main->render();
70 } 71 }
71 } 72 }
72 -  
73 -  
74 ?> 73 ?>
75 \ No newline at end of file 74 \ No newline at end of file
presentation/lookAndFeel/knowledgeTree/documentmanagement/removeDocumentLinkUI.inc
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
21 function getPage($sParentDocumentName, $sChildDocumentName, $iParentDocumentID) { 21 function getPage($sParentDocumentName, $sChildDocumentName, $iParentDocumentID) {
22 global $default; 22 global $default;
23 $sToRender = renderHeading("Unlink document"); 23 $sToRender = renderHeading("Unlink document");
  24 + $sToRender .= displayDocumentPath($iParentDocumentID);
24 $sToRender .= "<table>\n"; 25 $sToRender .= "<table>\n";
25 $sToRender .= "<tr>\n"; 26 $sToRender .= "<tr>\n";
26 $sToRender .= "<td>You have chosen to delete the link between the document '$sParentDocumentName' and the document '$sChildDocumentName'</td>\n"; 27 $sToRender .= "<td>You have chosen to delete the link between the document '$sParentDocumentName' and the document '$sChildDocumentName'</td>\n";