[horde] PATCH: Horde Portal Nag/Task Category Colors
Brandon Knitter
knitterb at blandsite.org
Mon Jan 10 11:48:32 PST 2005
Attached is a patch to Nag that allows for coloring in the Horde Portal. I
diff'd this against Nag cvs (summary version 1.51).
Sorry I didn't post this to the Nag mailing list, I'm not on that list and
wanted to get this in there asap.
This isn't the bes implementation, I can think of better ways to access the
globals, but I wasn't sure if PHP is by reference or not.
Cheers,
--
-bk
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Brandon Knitter <knitterb at blandsite.org>:
>
>> I'm not sure when this started happening, or if it's been this way
>> all along.
>> The Nag tasks in the Horde Portal don't have coloring on the categories.
>
> It's been that way all along.
>
> -chuck
>
> -- "But she goes not abroad in search of monsters to destroy." - John
> Quincy Adams
> -- Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
> !DSPAM:41e2d42574541814310122!
>
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
*** /tmp/summary.php 2005-01-10 11:42:37.000000000 -0800
--- lib/Block/summary.php 2005-01-10 11:41:18.000000000 -0800
***************
*** 3,9 ****
$block_name = _("Tasks Summary");
/**
! * $Horde: nag/lib/Block/summary.php,v 1.50 2004/11/12 15:25:37 chuck Exp $
*
* @package Horde_Block
*/
--- 3,9 ----
$block_name = _("Tasks Summary");
/**
! * $Horde: nag/lib/Block/summary.php,v 1.51 2004/11/15 02:23:14 chuck Exp $
*
* @package Horde_Block
*/
***************
*** 175,183 ****
$html .= "</td>";
if (!empty($this->_params['show_category'])) {
! $html .= '<td width="1%" nowrap="nowrap" class="' . $tstyle . '"> '
! . htmlspecialchars($task['category'] ? $task['category'] : _("Unfiled"))
! . ' </td>';
}
$html .= "</tr>\n";
}
--- 175,186 ----
$html .= "</td>";
if (!empty($this->_params['show_category'])) {
! $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";
}
More information about the horde
mailing list