[nag] patch: summary enhancements

Brian Keifer brian@valinor.net
Sun, 14 Jul 2002 17:49:05 -0400


This patch adds display options to nag that allow the user to show/hide the
priorities and due dates on the summary view.

-btk

Index: config/prefs.php.dist
===================================================================
RCS file: /repository/nag/config/prefs.php.dist,v
retrieving revision 1.13
diff -r1.13 prefs.php.dist
17c17
<     'members' => array('sortby', 'sortdir', 'show_completed'));
---
>     'members' => array('sortby', 'sortdir', 'summary_show_priorities',
'summary_show_due', 'show_completed'));
60a61,78
> );
> 
> // show priorities in summary?
> $_prefs['summary_show_priorities'] = array(
>     'value' => 1,
>     'locked' => false,
>     'shared' => false,
>     'type' => 'checkbox',
>     'desc' => _("Show priorities in the summary view?")
> );
> 
> // show due dates in summary?
> $_prefs['summary_show_due'] = array(
>     'value' => 1,
>     'locked' => false,
>     'shared' => false,
>     'type' => 'checkbox',
>     'desc' => _("Show due dates in the summary view?")
Index: lib/api.php
===================================================================
RCS file: /repository/nag/lib/api.php,v
retrieving revision 1.15
diff -r1.15 api.php
53a54
>     global $prefs;
64c65,75
<         $html .= '  <tr><td class="text">';
---
> 
>         $html .= '  <tr>';
> 
>       if ($prefs->getValue('summary_show_priorities')) {
>           $style = 'text' . $task['priority'];
>           $priority_cell = '<td width=20 align=center class="' . $style . '">'
. $task['priority'] . '</td>';
>           $spacer_cell = '<td width="3"></td>';
>           $html .= $priority_cell . $spacer_cell;
>       }
> 
>         $html .= '<td class="text">';
74c85
<         if (!empty($task['due']) && empty($task['completed'])) {
---
>         if (!empty($task['due']) && empty($task['completed']) &&
$prefs->getValue('summary_show_due')) {


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/