[Tickets #1126] NEW: Horde Portal Nag/Task Category Colors

bugs at bugs.horde.org bugs at bugs.horde.org
Mon Jan 10 22:00:32 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1126
-----------------------------------------------------------------------
 Ticket     | 1126
 Created By | knitterb at blandsite.org
 Summary    | Horde Portal Nag/Task Category Colors
 Queue      | Nag
 Version    | 2.0
 State      | New
 Priority   | 2. Medium
 Type       | Enhancement
 Owners     | 
-----------------------------------------------------------------------


knitterb at blandsite.org (2005-01-10 22:00) wrote:

Per my horde.lists.horde.org posting of "Re: [horde] PATCH: Horde Portal
Nag/Task Category Colors" this is my enhancement for adding color to the Nag
portal block.

Message-ID:   	<20050110205330.b73k3fbe5gmg4o8w at 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
. '">&nbsp;'
-                    . htmlspecialchars($task['category'] ?
$task['category'] : _("Unfiled"))
-                    . '&nbsp;</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.' ;">&nbsp;' .
htmlspecialchars($task['category'] ? $task['category'] : _("Unfiled")) .
'&nbsp;</td>';
             }
             $html .= "</tr>\n";
         }







More information about the bugs mailing list