Commit 722c0b09ea8abf31d986cc073ffacf9995a5a6aa
1 parent
24582801
used refactored getAddLink method
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2500 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
6 changed files
with
7 additions
and
18 deletions
presentation/lookAndFeel/knowledgeTree/administration/groupmanagement/listGroupsBL.php
| ... | ... | @@ -16,6 +16,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); |
| 16 | 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); |
| 17 | 17 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 18 | 18 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 19 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | |
| 19 | 20 | require_once("listGroupsUI.inc"); |
| 20 | 21 | |
| 21 | 22 | if (checkSession()) { | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/groupmanagement/listGroupsUI.inc
| ... | ... | @@ -8,13 +8,6 @@ |
| 8 | 8 | * |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -function getAddGroupLink() { | |
| 12 | - global $default; | |
| 13 | - $sBGColor = $default->siteMap->getSectionColour("Administration", "td"); | |
| 14 | - return "<table width=\"100%\"><tr><td bgcolor=\"$sBGColor\">" . generateControllerLink("addGroup", "", "<font color=\"#ffffff\">Add A Group</font>") . "</td></tr></table>\n"; | |
| 15 | -} | |
| 16 | - | |
| 17 | - | |
| 18 | 11 | // display the listbox initially ..then just display the text |
| 19 | 12 | function getUnitDisplay($iUnitID) { |
| 20 | 13 | global $default; |
| ... | ... | @@ -27,7 +20,7 @@ function getUnitDisplay($iUnitID) { |
| 27 | 20 | if ($iUnitID != 0) { |
| 28 | 21 | $oPatternListBox->setSelectedValue($iUnitID); |
| 29 | 22 | } |
| 30 | - return "<table><tr><td><b>Filter by Unit </b></td><td>" . $oPatternListBox->render() . "</td></tr></table>"; | |
| 23 | + return "<table><tr><td><b>Filter By Unit </b></td><td>" . $oPatternListBox->render() . "</td></tr></table>"; | |
| 31 | 24 | } |
| 32 | 25 | |
| 33 | 26 | function getGroups($fUnitID) { |
| ... | ... | @@ -58,7 +51,7 @@ function getPage($fUnitID) { |
| 58 | 51 | global $default; |
| 59 | 52 | $sToRender .= renderHeading("Current System Groups"); |
| 60 | 53 | |
| 61 | - $sToRender .= getAddGroupLink(); | |
| 54 | + $sToRender .= getAddLink("addGroup", "Add A Group"); | |
| 62 | 55 | $sToRender .= getUnitDisplay($fUnitID); |
| 63 | 56 | $sToRender .= getGroups($fUnitID); |
| 64 | 57 | return $sToRender; | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/unitmanagement/listUnitsBL.php
| ... | ... | @@ -15,6 +15,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); |
| 15 | 15 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); |
| 16 | 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 17 | 17 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 18 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | |
| 18 | 19 | require_once("listUnitsUI.inc"); |
| 19 | 20 | |
| 20 | 21 | if (checkSession()) { | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/unitmanagement/listUnitsUI.inc
| ... | ... | @@ -8,12 +8,6 @@ |
| 8 | 8 | * |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -function getAddUnitLink() { | |
| 12 | - global $default; | |
| 13 | - $sBGColor = $default->siteMap->getSectionColour("Administration", "td"); | |
| 14 | - return "<table width=\"100%\"><tr><td bgcolor=\"$sBGColor\">" . generateControllerLink("addUnit", "", "<font color=\"#ffffff\">Add A Unit</font>") . "</td></tr></table>\n"; | |
| 15 | -} | |
| 16 | - | |
| 17 | 11 | function getOrganisationDisplay($fOrganisationID) { |
| 18 | 12 | global $default; |
| 19 | 13 | $oPatternListBox = & new PatternListBox($default->owl_organisations_table, "name", "id", "fOrganisationID"); |
| ... | ... | @@ -55,8 +49,7 @@ function getPage($fOrganisationID) { |
| 55 | 49 | global $default; |
| 56 | 50 | $sToRender .= renderHeading("Current System Units"); |
| 57 | 51 | |
| 58 | - // add user link | |
| 59 | - $sToRender .= getAddUnitLink(); | |
| 52 | + $sToRender .= getAddLink("addUnit", "Add A Unit"); | |
| 60 | 53 | $sToRender .= getOrganisationDisplay($fOrganisationID); |
| 61 | 54 | $sToRender .= getUnits($fOrganisationID); |
| 62 | 55 | return $sToRender; | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/listUsersBL.php
| ... | ... | @@ -16,6 +16,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.i |
| 16 | 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 17 | 17 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 18 | 18 | require_once("listUsersUI.inc"); |
| 19 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | |
| 19 | 20 | |
| 20 | 21 | if (checkSession()) { |
| 21 | 22 | $oPatternCustom = & new PatternCustom(); | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/listUsersUI.inc
| ... | ... | @@ -64,7 +64,7 @@ function getPage($fGroupID) { |
| 64 | 64 | $sToRender .= renderHeading("Current System Users"); |
| 65 | 65 | |
| 66 | 66 | // add user link |
| 67 | - $sToRender .= getAddUserLink(); | |
| 67 | + $sToRender .= getAddLink("addUser", "Add A User"); | |
| 68 | 68 | $sToRender .= getGroupDisplay($fGroupID); |
| 69 | 69 | $sToRender .= getUsers($fGroupID); |
| 70 | 70 | return $sToRender; | ... | ... |