Commit 43dcb8678d6996abd1f3f7eca99d0bb9f2ee93cd

Authored by Michael Joseph
1 parent 32806cf9

added heading and folder path colour coding


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1402 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc
... ... @@ -9,9 +9,23 @@
9 9 *
10 10 */
11 11  
  12 +function renderHeading($sHeading) {
  13 + global $default;
  14 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  15 + $sColor = $default->siteMap->getSectionColour($sSectionName, "th");
  16 + $sToRender = "<table border=\"0\" width=\"600\">\n";
  17 + $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\">$sHeading</th></tr>\n";
  18 + $sToRender .= "<tr/>\n";
  19 + $sToRender .= "<tr/>\n";
  20 + $sToRender .= "</table>\n";
  21 + return $sToRender;
  22 +}
  23 +
  24 +
12 25 function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) {
13 26 global $default;
14   - $sToRender = "<table border=\"1\" width=\"100%\"><tr><td>" . getFolderPath($iFolderID) . "</td></tr></table>\n";
  27 + $sToRender = renderHeading("Add Folder Collaboration Step");
  28 + $sToRender .= getFolderPath($iFolderID);
15 29 $sToRender .= "<br>\n";
16 30 $sToRender .= "<table>\n";
17 31 $sToRender .= "<tr>\n";
... ... @@ -34,15 +48,16 @@ function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) {
34 48 $sToRender .= "\t\treturn false;\n\t}\n";
35 49 $sToRender .= "return true;\n}\n";
36 50 $sToRender .= "//-->\n</script>\n\n";
37   -
38   -
39   - return $sToRender;
40 51  
  52 + return $sToRender;
41 53 }
42 54  
43 55 function getFolderPath($iFolderID) {
44 56 global $default;
45   - return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse");
  57 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  58 + $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
  59 + $sFolderPathLink = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse");
  60 + return "<table border=\"0\" width = 100%><tr><td bgcolor=\"$sTDBGColour\">$sFolderPathLink</td></tr></table>\n";
46 61 }
47 62  
48 63 function getGroupDropDown($iGroupID) {
... ...
presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderDocTypeUI.inc
... ... @@ -7,17 +7,30 @@
7 7 * @package presentation.lookAndFeel.knowledgeTree.foldermanagement
8 8 */
9 9  
  10 +function renderHeading($sHeading) {
  11 + global $default;
  12 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  13 + $sColor = $default->siteMap->getSectionColour($sSectionName, "th");
  14 + $sToRender = "<table border=\"0\" width=\"600\">\n";
  15 + $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\">$sHeading</th></tr>\n";
  16 + $sToRender .= "<tr/>\n";
  17 + $sToRender .= "<tr/>\n";
  18 + $sToRender .= "</table>\n";
  19 + return $sToRender;
  20 +}
  21 +
10 22 function getPage($iFolderID, $iDocumentTypeID) {
11 23 global $default;
12 24 $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
13 25 $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
14   - $sToRender = "<table border=\"0\">\n";
  26 + $sToRender = renderHeading("Add Folder Document Type");
  27 + $sToRender .= "<table border=\"0\">\n";
15 28 $sToRender .= "<tr>\n";
16   - $sToRender .= "\t<td>" . renderFolderPath($iFolderID, "$default->uiUrl/foldermanagement/addFolderBL.php") . "</td>\n";
  29 + $sToRender .= "\t<td width=\"100%\">" . renderFolderPath($iFolderID, "$default->uiUrl/foldermanagement/addFolderBL.php") . "</td>\n";
17 30 $sToRender .= "</tr>\n";
18 31 $sToRender .= "</table>\n";
19 32 $sToRender .= "<br>";
20   - $sToRender .= "<table border=\"1\">\n";
  33 + $sToRender .= "<table border=\"0\">\n";
21 34 $sToRender .= "<tr>\n";
22 35 $sToRender .= "<td bgcolor=\"$sTDBGColour\">Document type</td>\n";
23 36 $sToRender .= "<td>" . getDocumentTypeDropDown($iDocumentTypeID) . "</td>\n";
... ...
presentation/lookAndFeel/knowledgeTree/foldermanagement/collaborationUI.inc
... ... @@ -8,9 +8,23 @@
8 8 *
9 9 */
10 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=\"600\">\n";
  16 + $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\">$sHeading</th></tr>\n";
  17 + $sToRender .= "<tr/>\n";
  18 + $sToRender .= "<tr/>\n";
  19 + $sToRender .= "</table>\n";
  20 + return $sToRender;
  21 +}
11 22 function getFolderPath($iFolderID) {
12 23 global $default;
13   - return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse");
  24 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  25 + $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
  26 + $sFolderPathLink = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse");
  27 + return "<table border=\"0\" width = 100%><tr><td bgcolor=\"$sTDBGColour\">$sFolderPathLink</td></tr></table>\n";
14 28 }
15 29  
16 30 function getFolderCollaborationData($iFolderCollaborationID) {
... ... @@ -38,11 +52,8 @@ function getFolderCollaborationData($iFolderCollaborationID) {
38 52  
39 53 function getEditPage($iFolderCollaborationID, $iFolderID) {
40 54 global $default;
41   - $sToRender .= "<table border=\"1\" width=\"100%\">\n";
42   - $sToRender .= "<tr>\n";
43   - $sToRender .= "<td>" . getFolderPath($iFolderID) . "</td>\n";
44   - $sToRender .= "</tr>\n";
45   - $sToRender .= "</table>\n";
  55 + $sToRender = renderHeading("Edit Folder Collaboration Step");
  56 + $sToRender .= getFolderPath($iFolderID);
46 57 $sToRender .= "<table border=\"0\" width=\"100%\">\n";
47 58 $sToRender .= "<tr>\n";
48 59 $sToRender .= "<td>" . getFolderCollaborationData($iFolderCollaborationID) . "</td>\n";
... ...
presentation/lookAndFeel/knowledgeTree/foldermanagement/deleteFolderCollaborationUI.inc
... ... @@ -9,9 +9,29 @@
9 9 *
10 10 */
11 11  
  12 +function renderHeading($sHeading) {
  13 + global $default;
  14 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  15 + $sColor = $default->siteMap->getSectionColour($sSectionName, "th");
  16 + $sToRender = "<table border=\"0\" width=\"600\">\n";
  17 + $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\">$sHeading</th></tr>\n";
  18 + $sToRender .= "<tr/>\n";
  19 + $sToRender .= "<tr/>\n";
  20 + $sToRender .= "</table>\n";
  21 + return $sToRender;
  22 +}
  23 +function getFolderPath($iFolderID) {
  24 + global $default;
  25 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  26 + $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
  27 + $sFolderPathLink = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse");
  28 + return "<table border=\"0\" width = 100%><tr><td bgcolor=\"$sTDBGColour\">$sFolderPathLink</td></tr></table>\n";
  29 +}
  30 +
12 31 function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) {
13 32 global $default;
14   - $sToRender = "<table border=\"1\" width=\"100%\"><tr><td>" . getFolderPath($iFolderID) . "</td></tr></table>\n";
  33 + $sToRender = renderHeading("Delete Folder Collaboration Step");
  34 + $sToRender .= getFolderPath($iFolderID);
15 35 $sToRender .= "<br>\n";
16 36 $sToRender .= "<table>\n";
17 37 $sToRender .= "<tr>\n";
... ... @@ -36,12 +56,6 @@ function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) {
36 56 return $sToRender;
37 57 }
38 58  
39   -function getFolderPath($iFolderID) {
40   - global $default;
41   - return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse");
42   -}
43   -
44   -
45 59 function getGroup($iGroupID) {
46 60 $oGroup = Group::get($iGroupID);
47 61 return $oGroup->getName();
... ... @@ -51,6 +65,4 @@ function getRole($iRoleID) {
51 65 $oRole = Role::get($iRoleID);
52 66 return $oRole->getName();
53 67 }
54   -
55   -
56 68 ?>
... ...