6.0.0-alpha14
6/25/25

[#1126] Horde Portal Nag/Task Category Colors
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

History
01/11/2005 11:21:47 PM Jan Schneider Comment #4
State ⇒ Resolved
Reply to this comment
Cleaned up and committed. Please test your patches and take a quick 
ride through docs/CODING_STANDARDS.
01/11/2005 08:24:46 PM knitterb (at) blandsite (dot) org Comment #3
New Attachment: nag-Block-summary.patch.txt Download
Reply to this comment
Patch attached.  Cheers!
01/11/2005 06:09:12 PM Jan Schneider Comment #2 Reply to this comment
Please upload the patch as an attachment.
01/11/2005 06:06:56 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
01/11/2005 06:00:31 AM knitterb (at) blandsite (dot) org Comment #1
State ⇒ New
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ Horde Portal Nag/Task Category Colors
Queue ⇒ Nag
Reply to this comment
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@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";

          }






Saved Queries