[nag] Ideas about NAG
Edwin Culp
eculp@EnContacto.Net
Wed, 4 Jul 2001 23:31:13 -0700
Quoting Jon Parise <jon@csh.rit.edu>:
| On Sun, Jun 03, 2001 at 08:51:38AM -0700, Edwin Culp wrote:
|
| > It's Sunday and I've actually had some time to think. Not good:-)
|
| And here I am replying one month later. =)
|
| > I have just been adding some real tasks to NAG to try and organize myself
| > just a little and personally am finding that marking/prioritizing the
| > tasks with a different color would be very useful as it is in IMP.
| >
| > Important
| > UnImportant
| > Finished/possibly with a hide option.
| > Deleted/Not Purged
| > probably others
|
| Okay, I just added support for assigning general priorities to
| individual tasks (low, medium, high). It doesn't display each
| priority in a different color, but that shouldn't be too hard to
| add (patches anyone?).
An easy and functional way although not very elegant, but just requires
minimal modification of two lines in list.php is:
# diff -u list.php.original list.php
--- list.php.original Wed Jul 4 17:10:58 2001
+++ list.php Wed Jul 4 18:40:31 2001
@@ -98,9 +98,9 @@
foreach ($tasks as $task_id => $task) {
if (!empty($task['due']) && ($task['due'] < time())) {
- $style = 'overdue';
+ $style = 'overdue' . $task['priority'] ;
} else {
- $style = 'text';
+ $style = 'text' . $task['priority'] ;
}
include $conf['paths']['templates'] . '/list/task_summaries.inc';
}
You will need to add your favorite task background colors in config/html.php
$css['.overdue0']['background-color'] = '#ff4444'; /* overdue high priority */
$css['.overdue10']['background-color'] = '#ff8888'; /* overdue med priority */
$css['.overdue20']['background-color'] = '#ffcccc'; /* overdue low priority */
$css['.text0']['background-color'] = '#4444ff'; /* pending high priority */
$css['.text10']['background-color'] = '#8888ff'; /* pending med priority */
$css['.text20']['background-color'] = '#ccccff'; /* pending low priority */
provecho,
ed
-----------------------------------------------------------------------
The illiterate of the 21st century will not be
those who cannot read and write,
but those who cannot learn, unlearn and relearn.
--Alvin Toffler