Summary | Horde Portal Nag/Task Category Colors |
Queue | Nag |
Queue Version | 2.0 |
Type | Enhancement |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | knitterb (at) blandsite (dot) org |
Created | 01/11/2005 (7470 days ago) |
Due | |
Updated | 01/11/2005 (7470 days ago) |
Assigned | 01/11/2005 (7470 days ago) |
Resolved | 01/11/2005 (7470 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
ride through docs/CODING_STANDARDS.
New Attachment: nag-Block-summary.patch.txt
State ⇒ Assigned
State ⇒ New
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ Horde Portal Nag/Task Category Colors
Queue ⇒ Nag
Portal Nag/Task Category Colors" this is my enhancement for adding
color to the Nag portal block.
Message-ID: <20050110205330.b73k3fbe5gmg4o8w@marina.horde.org>
--- /tmp/summary.php 2005-01-10 11:42:37.000000000 -0800
+++ nag/lib/Block/summary.php 2005-01-10 11:41:18.000000000 -0800
@@ -3,7 +3,7 @@
$block_name = _("Tasks Summary");
/**
- * $Horde: nag/lib/Block/summary.php,v 1.50 2004/11/12 15:25:37 chuck Exp $
+ * $Horde: nag/lib/Block/summary.php,v 1.51 2004/11/15 02:23:14 chuck Exp $
*
* @package Horde_Block
*/
@@ -175,9 +175,12 @@
$html .= "</td>";
if (!empty($this->_params['show_category'])) {
- $html .= '<td width="1%" nowrap="nowrap" class="' .
$tstyle . '"> '
- . htmlspecialchars($task['category'] ?
$task['category'] : _("Unfiled"))
- . ' </td>';
+ $colors = $GLOBALS['cManager']->colors();
+ $fgcolors = $GLOBALS['cManager']->fgColors();
+ $color = isset($colors[$task['category']]) ?
$colors[$task['category']] : $colors['_default_'];
+ $fgcolor = isset($fgcolors[$task['category']]) ?
$fgcolors[$task['category']] : $fgcolors['_default_'];
+
+ $html .= '<td width="1%" nowrap="nowrap" class="' .
$tstyle . '" style="background-color: '.$color.' ; color: '.$fgcolor.'
;"> ' . htmlspecialchars($task['category'] ? $task['category'] :
_("Unfiled")) . ' </td>';
}
$html .= "</tr>\n";
}