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,6 +16,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | ||
| 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); | 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); |
| 17 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | 17 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 18 | require_once("$default->fileSystemRoot/presentation/Html.inc"); | 18 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 19 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | ||
| 19 | require_once("listGroupsUI.inc"); | 20 | require_once("listGroupsUI.inc"); |
| 20 | 21 | ||
| 21 | if (checkSession()) { | 22 | if (checkSession()) { |
presentation/lookAndFeel/knowledgeTree/administration/groupmanagement/listGroupsUI.inc
| @@ -8,13 +8,6 @@ | @@ -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 | // display the listbox initially ..then just display the text | 11 | // display the listbox initially ..then just display the text |
| 19 | function getUnitDisplay($iUnitID) { | 12 | function getUnitDisplay($iUnitID) { |
| 20 | global $default; | 13 | global $default; |
| @@ -27,7 +20,7 @@ function getUnitDisplay($iUnitID) { | @@ -27,7 +20,7 @@ function getUnitDisplay($iUnitID) { | ||
| 27 | if ($iUnitID != 0) { | 20 | if ($iUnitID != 0) { |
| 28 | $oPatternListBox->setSelectedValue($iUnitID); | 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 | function getGroups($fUnitID) { | 26 | function getGroups($fUnitID) { |
| @@ -58,7 +51,7 @@ function getPage($fUnitID) { | @@ -58,7 +51,7 @@ function getPage($fUnitID) { | ||
| 58 | global $default; | 51 | global $default; |
| 59 | $sToRender .= renderHeading("Current System Groups"); | 52 | $sToRender .= renderHeading("Current System Groups"); |
| 60 | 53 | ||
| 61 | - $sToRender .= getAddGroupLink(); | 54 | + $sToRender .= getAddLink("addGroup", "Add A Group"); |
| 62 | $sToRender .= getUnitDisplay($fUnitID); | 55 | $sToRender .= getUnitDisplay($fUnitID); |
| 63 | $sToRender .= getGroups($fUnitID); | 56 | $sToRender .= getGroups($fUnitID); |
| 64 | return $sToRender; | 57 | return $sToRender; |
presentation/lookAndFeel/knowledgeTree/administration/unitmanagement/listUnitsBL.php
| @@ -15,6 +15,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | @@ -15,6 +15,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | ||
| 15 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); | 15 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); |
| 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 17 | require_once("$default->fileSystemRoot/presentation/Html.inc"); | 17 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 18 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | ||
| 18 | require_once("listUnitsUI.inc"); | 19 | require_once("listUnitsUI.inc"); |
| 19 | 20 | ||
| 20 | if (checkSession()) { | 21 | if (checkSession()) { |
presentation/lookAndFeel/knowledgeTree/administration/unitmanagement/listUnitsUI.inc
| @@ -8,12 +8,6 @@ | @@ -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 | function getOrganisationDisplay($fOrganisationID) { | 11 | function getOrganisationDisplay($fOrganisationID) { |
| 18 | global $default; | 12 | global $default; |
| 19 | $oPatternListBox = & new PatternListBox($default->owl_organisations_table, "name", "id", "fOrganisationID"); | 13 | $oPatternListBox = & new PatternListBox($default->owl_organisations_table, "name", "id", "fOrganisationID"); |
| @@ -55,8 +49,7 @@ function getPage($fOrganisationID) { | @@ -55,8 +49,7 @@ function getPage($fOrganisationID) { | ||
| 55 | global $default; | 49 | global $default; |
| 56 | $sToRender .= renderHeading("Current System Units"); | 50 | $sToRender .= renderHeading("Current System Units"); |
| 57 | 51 | ||
| 58 | - // add user link | ||
| 59 | - $sToRender .= getAddUnitLink(); | 52 | + $sToRender .= getAddLink("addUnit", "Add A Unit"); |
| 60 | $sToRender .= getOrganisationDisplay($fOrganisationID); | 53 | $sToRender .= getOrganisationDisplay($fOrganisationID); |
| 61 | $sToRender .= getUnits($fOrganisationID); | 54 | $sToRender .= getUnits($fOrganisationID); |
| 62 | return $sToRender; | 55 | return $sToRender; |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/listUsersBL.php
| @@ -16,6 +16,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.i | @@ -16,6 +16,7 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.i | ||
| 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 17 | require_once("$default->fileSystemRoot/presentation/Html.inc"); | 17 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 18 | require_once("listUsersUI.inc"); | 18 | require_once("listUsersUI.inc"); |
| 19 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | ||
| 19 | 20 | ||
| 20 | if (checkSession()) { | 21 | if (checkSession()) { |
| 21 | $oPatternCustom = & new PatternCustom(); | 22 | $oPatternCustom = & new PatternCustom(); |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/listUsersUI.inc
| @@ -64,7 +64,7 @@ function getPage($fGroupID) { | @@ -64,7 +64,7 @@ function getPage($fGroupID) { | ||
| 64 | $sToRender .= renderHeading("Current System Users"); | 64 | $sToRender .= renderHeading("Current System Users"); |
| 65 | 65 | ||
| 66 | // add user link | 66 | // add user link |
| 67 | - $sToRender .= getAddUserLink(); | 67 | + $sToRender .= getAddLink("addUser", "Add A User"); |
| 68 | $sToRender .= getGroupDisplay($fGroupID); | 68 | $sToRender .= getGroupDisplay($fGroupID); |
| 69 | $sToRender .= getUsers($fGroupID); | 69 | $sToRender .= getUsers($fGroupID); |
| 70 | return $sToRender; | 70 | return $sToRender; |