Commit 32abd00162d1a683f6bc19bfa9fb295fb168c4da
1 parent
e4c3ad62
added section heading and colouring and back button
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1391 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
20 additions
and
3 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewHistoryUI.inc
| @@ -9,10 +9,24 @@ | @@ -9,10 +9,24 @@ | ||
| 9 | * @package presentation.lookAndFeel.knowledgeTree.documentManager | 9 | * @package presentation.lookAndFeel.knowledgeTree.documentManager |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | -function getDocumentPath($iFolderID, $sDocumentName) { | 12 | +function renderHeading($sHeading) { |
| 13 | global $default; | 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 | +function getDocumentPath($iFolderID, $sDocumentName) { | ||
| 25 | + global $default; | ||
| 26 | + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); | ||
| 27 | + $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); | ||
| 14 | $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse") . " > " . $sDocumentName; | 28 | $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse") . " > " . $sDocumentName; |
| 15 | - return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n"; | 29 | + return "<table border=\"0\" width=\"600\"><tr><td bgcolor=\"$sTDBGColour\">$sDocumentPath</td></tr></table>\n"; |
| 16 | } | 30 | } |
| 17 | 31 | ||
| 18 | function getDocumentHistory($iDocumentID) { | 32 | function getDocumentHistory($iDocumentID) { |
| @@ -33,7 +47,9 @@ function getDocumentHistory($iDocumentID) { | @@ -33,7 +47,9 @@ function getDocumentHistory($iDocumentID) { | ||
| 33 | } | 47 | } |
| 34 | 48 | ||
| 35 | function getPage($iDocumentID, $iFolderID, $sDocumentName) { | 49 | function getPage($iDocumentID, $iFolderID, $sDocumentName) { |
| 36 | - $sToRender = "<table>\n"; | 50 | + global $default; |
| 51 | + $sToRender = renderHeading("Document History"); | ||
| 52 | + $sToRender .= "<table>\n"; | ||
| 37 | $sToRender .= "<tr>\n"; | 53 | $sToRender .= "<tr>\n"; |
| 38 | $sToRender .= "<td>" . getDocumentPath($iFolderID, $sDocumentName) . "</td>\n"; | 54 | $sToRender .= "<td>" . getDocumentPath($iFolderID, $sDocumentName) . "</td>\n"; |
| 39 | $sToRender .= "</tr>\n"; | 55 | $sToRender .= "</tr>\n"; |
| @@ -42,6 +58,7 @@ function getPage($iDocumentID, $iFolderID, $sDocumentName) { | @@ -42,6 +58,7 @@ function getPage($iDocumentID, $iFolderID, $sDocumentName) { | ||
| 42 | $sToRender .= "<tr>\n"; | 58 | $sToRender .= "<tr>\n"; |
| 43 | $sToRender .= "<td>" . getDocumentHistory($iDocumentID) . "</td>\n"; | 59 | $sToRender .= "<td>" . getDocumentHistory($iDocumentID) . "</td>\n"; |
| 44 | $sToRender .= "</tr>\n"; | 60 | $sToRender .= "</tr>\n"; |
| 61 | + $sToRender .= "<tr><td><a href=\"$default->rootUrl/control.php?action=viewDocument&fDocumentID=$iDocumentID\"><img src=\"$default->graphicsUrl/widgets/back.gif\" border=\"0\" /></a></td></tr>\n"; | ||
| 45 | $sToRender .= "</table>\n"; | 62 | $sToRender .= "</table>\n"; |
| 46 | return $sToRender; | 63 | return $sToRender; |
| 47 | } | 64 | } |