Commit 849f0719d3066aca0cb3bba1938140584d5f882b
1 parent
f82a42b3
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 | 9 | * @package presentation.lookAndFeel.knowledgeTree.documentManager |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -function getDocumentPath($iFolderID, $sDocumentName) { | |
| 12 | +function renderHeading($sHeading) { | |
| 13 | 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 | 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 | 32 | function getDocumentHistory($iDocumentID) { |
| ... | ... | @@ -33,7 +47,9 @@ function getDocumentHistory($iDocumentID) { |
| 33 | 47 | } |
| 34 | 48 | |
| 35 | 49 | function getPage($iDocumentID, $iFolderID, $sDocumentName) { |
| 36 | - $sToRender = "<table>\n"; | |
| 50 | + global $default; | |
| 51 | + $sToRender = renderHeading("Document History"); | |
| 52 | + $sToRender .= "<table>\n"; | |
| 37 | 53 | $sToRender .= "<tr>\n"; |
| 38 | 54 | $sToRender .= "<td>" . getDocumentPath($iFolderID, $sDocumentName) . "</td>\n"; |
| 39 | 55 | $sToRender .= "</tr>\n"; |
| ... | ... | @@ -42,6 +58,7 @@ function getPage($iDocumentID, $iFolderID, $sDocumentName) { |
| 42 | 58 | $sToRender .= "<tr>\n"; |
| 43 | 59 | $sToRender .= "<td>" . getDocumentHistory($iDocumentID) . "</td>\n"; |
| 44 | 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 | 62 | $sToRender .= "</table>\n"; |
| 46 | 63 | return $sToRender; |
| 47 | 64 | } | ... | ... |