Commit 26949c6a5e68039d588bee34670ea0609a59e2f5

Authored by michael
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
presentation/lookAndFeel/knowledgeTree/subscriptions/subscriptionUI.inc
... ... @@ -12,6 +12,15 @@
12 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 25 * Displays all current subscriptions with remove checkbox
17 26 */
... ... @@ -21,9 +30,10 @@ function renderManagePage() {
21 30 // retrieve subscriptions for this user
22 31 $aFolderSubscriptions = SubscriptionManager::retrieveUserSubscriptions($_SESSION["userID"], SubscriptionConstants::subscriptionType("FolderSubscription"));
23 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 37 if ($bNoSubscriptions) {
28 38 $sToRender .= "<tr><td>You are not subscribed to any documents or folders.</td></tr>\n";
29 39 } else {
... ... @@ -80,7 +90,8 @@ function renderManagePage() {
80 90 function renderMultipleRemoveConfirmationPage($aFolderSubscriptions, $aDocumentSubscriptions) {
81 91 global $default;
82 92  
83   - $sToRender = "<table>\n";
  93 + $sToRender = "<table width=\"600\">\n";
  94 + $sToRender .= renderHeading();
84 95 $sToRender .= "<tr><td>You have chosen to delete the following subscription(s):</td></tr>\n";
85 96 $sToRender .= "<tr/>\n";
86 97 $sToRender .= "<tr/>\n";
... ... @@ -106,6 +117,8 @@ function renderMultipleRemoveConfirmationPage($aFolderSubscriptions, $aDocumentS
106 117  
107 118 $sToRender .= "<tr/>\n";
108 119 $sToRender .= "<tr/>\n";
  120 + $sToRender .= "<tr/>\n";
  121 + $sToRender .= "<tr/>\n";
109 122 $sToRender .= "<td>Select 'Unsubscribe' to confirm the deletion(s), or 'Cancel' to cancel them</td>\n";
110 123 $sToRender .= "<tr/>\n";
111 124 $sToRender .= "<tr/>\n";
... ... @@ -136,6 +149,7 @@ function renderRemoveConfirmationPage($oSubscription) {
136 149 }
137 150  
138 151 $sToRender = "<table>\n";
  152 + $sToRender .= renderHeading();
139 153 $sToRender .= "<tr><td>You have chosen to delete the your $sContentType subscription to '$sContentName'.</td></tr>\n";
140 154 $sToRender .= "<tr/>\n";
141 155 $sToRender .= "<tr/>\n";
... ... @@ -168,6 +182,7 @@ function renderAddConfirmationPage($oSubscription) {
168 182 }
169 183  
170 184 $sToRender = "<table>\n";
  185 + $sToRender .= renderHeading();
171 186 $sToRender .= "<tr><td>You have chosen to subscribe to the $sContentType entitled '$sContentName'.</td></tr>\n";
172 187 $sToRender .= "<tr/>\n";
173 188 $sToRender .= "<tr>\n";
... ... @@ -184,8 +199,12 @@ function renderAddConfirmationPage($oSubscription) {
184 199  
185 200 function renderErrorPage($sErrorMessage) {
186 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 210 function getColour($iColourCount) {
... ...