Commit 26949c6a5e68039d588bee34670ea0609a59e2f5
1 parent
5e13e16e
added colour-coded headings
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1352 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
24 additions
and
5 deletions
presentation/lookAndFeel/knowledgeTree/subscriptions/subscriptionUI.inc
| @@ -12,6 +12,15 @@ | @@ -12,6 +12,15 @@ | ||
| 12 | * @package presentation.lookAndFeel.knowledgeTree.subscriptions | 12 | * @package presentation.lookAndFeel.knowledgeTree.subscriptions |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | +function renderHeading() { | ||
| 16 | + global $default; | ||
| 17 | + $sColor = $default->siteMap->getSectionColour("manageSubscriptions", "td"); | ||
| 18 | + $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\">Subscriptions</th></tr>\n"; | ||
| 19 | + $sToRender .= "<tr/>\n"; | ||
| 20 | + $sToRender .= "<tr/>\n"; | ||
| 21 | + return $sToRender; | ||
| 22 | +} | ||
| 23 | + | ||
| 15 | /** | 24 | /** |
| 16 | * Displays all current subscriptions with remove checkbox | 25 | * Displays all current subscriptions with remove checkbox |
| 17 | */ | 26 | */ |
| @@ -21,9 +30,10 @@ function renderManagePage() { | @@ -21,9 +30,10 @@ function renderManagePage() { | ||
| 21 | // retrieve subscriptions for this user | 30 | // retrieve subscriptions for this user |
| 22 | $aFolderSubscriptions = SubscriptionManager::retrieveUserSubscriptions($_SESSION["userID"], SubscriptionConstants::subscriptionType("FolderSubscription")); | 31 | $aFolderSubscriptions = SubscriptionManager::retrieveUserSubscriptions($_SESSION["userID"], SubscriptionConstants::subscriptionType("FolderSubscription")); |
| 23 | $aDocumentSubscriptions = SubscriptionManager::retrieveUserSubscriptions($_SESSION["userID"], SubscriptionConstants::subscriptionType("DocumentSubscription")); | 32 | $aDocumentSubscriptions = SubscriptionManager::retrieveUserSubscriptions($_SESSION["userID"], SubscriptionConstants::subscriptionType("DocumentSubscription")); |
| 24 | - $bNoSubscriptions = ( (count($aFolderSubscriptions) == 0) && (count($aDocumentSubscriptions) == 0) ) ? true : false; | 33 | + $bNoSubscriptions = ( (count($aFolderSubscriptions) == 0) && (count($aDocumentSubscriptions) == 0) ) ? true : false; |
| 25 | 34 | ||
| 26 | - $sToRender = "<table>\n"; | 35 | + $sToRender = "<table width=\"600\">\n"; |
| 36 | + $sToRender .= renderHeading(); | ||
| 27 | if ($bNoSubscriptions) { | 37 | if ($bNoSubscriptions) { |
| 28 | $sToRender .= "<tr><td>You are not subscribed to any documents or folders.</td></tr>\n"; | 38 | $sToRender .= "<tr><td>You are not subscribed to any documents or folders.</td></tr>\n"; |
| 29 | } else { | 39 | } else { |
| @@ -80,7 +90,8 @@ function renderManagePage() { | @@ -80,7 +90,8 @@ function renderManagePage() { | ||
| 80 | function renderMultipleRemoveConfirmationPage($aFolderSubscriptions, $aDocumentSubscriptions) { | 90 | function renderMultipleRemoveConfirmationPage($aFolderSubscriptions, $aDocumentSubscriptions) { |
| 81 | global $default; | 91 | global $default; |
| 82 | 92 | ||
| 83 | - $sToRender = "<table>\n"; | 93 | + $sToRender = "<table width=\"600\">\n"; |
| 94 | + $sToRender .= renderHeading(); | ||
| 84 | $sToRender .= "<tr><td>You have chosen to delete the following subscription(s):</td></tr>\n"; | 95 | $sToRender .= "<tr><td>You have chosen to delete the following subscription(s):</td></tr>\n"; |
| 85 | $sToRender .= "<tr/>\n"; | 96 | $sToRender .= "<tr/>\n"; |
| 86 | $sToRender .= "<tr/>\n"; | 97 | $sToRender .= "<tr/>\n"; |
| @@ -106,6 +117,8 @@ function renderMultipleRemoveConfirmationPage($aFolderSubscriptions, $aDocumentS | @@ -106,6 +117,8 @@ function renderMultipleRemoveConfirmationPage($aFolderSubscriptions, $aDocumentS | ||
| 106 | 117 | ||
| 107 | $sToRender .= "<tr/>\n"; | 118 | $sToRender .= "<tr/>\n"; |
| 108 | $sToRender .= "<tr/>\n"; | 119 | $sToRender .= "<tr/>\n"; |
| 120 | + $sToRender .= "<tr/>\n"; | ||
| 121 | + $sToRender .= "<tr/>\n"; | ||
| 109 | $sToRender .= "<td>Select 'Unsubscribe' to confirm the deletion(s), or 'Cancel' to cancel them</td>\n"; | 122 | $sToRender .= "<td>Select 'Unsubscribe' to confirm the deletion(s), or 'Cancel' to cancel them</td>\n"; |
| 110 | $sToRender .= "<tr/>\n"; | 123 | $sToRender .= "<tr/>\n"; |
| 111 | $sToRender .= "<tr/>\n"; | 124 | $sToRender .= "<tr/>\n"; |
| @@ -136,6 +149,7 @@ function renderRemoveConfirmationPage($oSubscription) { | @@ -136,6 +149,7 @@ function renderRemoveConfirmationPage($oSubscription) { | ||
| 136 | } | 149 | } |
| 137 | 150 | ||
| 138 | $sToRender = "<table>\n"; | 151 | $sToRender = "<table>\n"; |
| 152 | + $sToRender .= renderHeading(); | ||
| 139 | $sToRender .= "<tr><td>You have chosen to delete the your $sContentType subscription to '$sContentName'.</td></tr>\n"; | 153 | $sToRender .= "<tr><td>You have chosen to delete the your $sContentType subscription to '$sContentName'.</td></tr>\n"; |
| 140 | $sToRender .= "<tr/>\n"; | 154 | $sToRender .= "<tr/>\n"; |
| 141 | $sToRender .= "<tr/>\n"; | 155 | $sToRender .= "<tr/>\n"; |
| @@ -168,6 +182,7 @@ function renderAddConfirmationPage($oSubscription) { | @@ -168,6 +182,7 @@ function renderAddConfirmationPage($oSubscription) { | ||
| 168 | } | 182 | } |
| 169 | 183 | ||
| 170 | $sToRender = "<table>\n"; | 184 | $sToRender = "<table>\n"; |
| 185 | + $sToRender .= renderHeading(); | ||
| 171 | $sToRender .= "<tr><td>You have chosen to subscribe to the $sContentType entitled '$sContentName'.</td></tr>\n"; | 186 | $sToRender .= "<tr><td>You have chosen to subscribe to the $sContentType entitled '$sContentName'.</td></tr>\n"; |
| 172 | $sToRender .= "<tr/>\n"; | 187 | $sToRender .= "<tr/>\n"; |
| 173 | $sToRender .= "<tr>\n"; | 188 | $sToRender .= "<tr>\n"; |
| @@ -184,8 +199,12 @@ function renderAddConfirmationPage($oSubscription) { | @@ -184,8 +199,12 @@ function renderAddConfirmationPage($oSubscription) { | ||
| 184 | 199 | ||
| 185 | function renderErrorPage($sErrorMessage) { | 200 | function renderErrorPage($sErrorMessage) { |
| 186 | global $default; | 201 | global $default; |
| 187 | - return "<p class=\"errorText\">$sErrorMessage</p>\n" . | ||
| 188 | - "<a href=\"javascript:history.go(-1)\"><img src=\"$default->graphicsUrl/widgets/back.gif\" border=\"0\"/></a>\n"; | 202 | + $sToRender = "<table>\n"; |
| 203 | + $sToRender .= renderHeading(); | ||
| 204 | + $sToRender .= "<tr><td><p class=\"errorText\">$sErrorMessage</p>\n" . | ||
| 205 | + "<a href=\"javascript:history.go(-1)\"><img src=\"$default->graphicsUrl/widgets/back.gif\" border=\"0\"/></a>\n" . | ||
| 206 | + "</p></td></tr></table>\n"; | ||
| 207 | + return $sToRender; | ||
| 189 | } | 208 | } |
| 190 | 209 | ||
| 191 | function getColour($iColourCount) { | 210 | function getColour($iColourCount) { |