[dev] Nag patch to add alarm to tasks.

Mathieu CLABAUT mathieu.clabaut at free.fr
Thu Feb 20 15:12:59 PST 2003


  Hello,

   I really lacked the fact that tasks didn't have alarm... So I take
   upon my work time to quickly write down the feature, heavily based
   on Kronolith alarms (There is some redundant code about date
   functions between Nag.php and Kronolith.php. The common code should
   perhaps go into a common Horde class ? )

   I tried to respect the coding standards (except I didn't add comment
   to function taken from Kronolith which weren't commented before..
   sorry for that).

   I think the alarm addition/edition is fully functional (note the new
   row in nag_task table), but their might be some problem with status
   reporting. The code directly comes from kronolith, but It seems it
   doesn't works even with kronolith (at least with konqueror web
   browser). More testing in progress... (no much more time for today
   alas.... As said in France : "Je suis à la bourre" !!!).

   Hope you're interested in this feature...


-mat


--
___________________http://www.fsf.org/philosophy/no-word-attachments.html
Mathieu CLABAUT                            mailto:mathieu.clabaut at free.fr
           F2F5 442F F2AC E1D5 9D31  3EFC 842A BC4A 123B 9A65
-------------- next part --------------
? status.php
? graphics/alarm.gif
Index: menu.php
===================================================================
RCS file: /repository/nag/menu.php,v
retrieving revision 1.9
diff -u -b -B -w -u -B -b -w -r1.9 menu.php
--- menu.php	3 Jan 2003 02:18:49 -0000	1.9
+++ menu.php	20 Feb 2003 14:04:33 -0000
@@ -12,6 +12,8 @@
 
 require_once HORDE_BASE . '/lib/Menu.php';
 require NAG_TEMPLATES . '/menu/menu.inc';
+require NAG_BASE . '/status.php';
+
 
 /* Include the JavaScript for the help system (if enabled). */
 if ($conf['user']['online_help'] && $browser->hasFeature('javascript')) {
Index: task.php
===================================================================
RCS file: /repository/nag/task.php,v
retrieving revision 1.36
diff -u -b -B -w -u -B -b -w -r1.36 task.php
--- task.php	6 Feb 2003 18:32:21 -0000	1.36
+++ task.php	20 Feb 2003 14:04:34 -0000
@@ -30,6 +30,10 @@
     $task_priority = 3;
     $task_completed = 0;
     $task_category = 0;
+    $task_alarm = 0;
+    $alarm_value = 15;
+    $alarm_unit  = 'min';  
+    $alarm_set = false;
 
     /* Set the initial due date to one week from now. */
     $initial_date = time() + 604800;
@@ -51,6 +55,10 @@
     $task_id = Horde::getFormData('task');
     $tasklist_id = Horde::getFormData('tasklist');
     $task = Nag::getTask($tasklist_id, $task_id);
+    $alarm_value = 15;
+    $alarm_unit  = 'min';  
+    $alarm_set   = false;  
+
 
     if ($task) {
         /* Set up the task attributes. */
@@ -60,10 +68,28 @@
         $task_priority = $task['priority'];
         $task_completed = $task['completed'];
         $task_category = $task['category'];
+        $task_alarm = $task['alarm'];
 
         /* If the due date isn't set, set the widgets to the default. */
         $due_date = ($task_due > 0) ? $task_due : (time() + 604800);
         $javascript = 'onchange="document.task.due_type[1].checked = true;"';
+        /* set up alarm widget data */
+        if ($task_due && $task_alarm) {
+            $alarm_set = true;
+            if ($task_alarm % 10080 == 0) {
+                $alarm_value = $task_alarm / 10080;
+                $alarm_unit = 'week';
+            } elseif ($task_alarm % 1440 == 0) {
+                $alarm_value = $task_alarm / 1440;
+                $alarm_unit = 'day';
+            } elseif ($task_alarm % 60 == 0) {
+                $alarm_value = $task_alarm / 60;
+                $alarm_unit = 'hour';
+            } else {
+                $alarm_value = $task_alarm;
+                $alarm_unit = 'min';
+            }
+        }
 
         /* Set up the due date selection widgets. */
         $day_widget = Nag::buildDayWidget('due_day', $due_date, $javascript);
@@ -103,6 +129,14 @@
         $due_year = Horde::getFormData('due_year');
         $due_hour = Horde::getFormData('due_hour');
         $due_minute = Horde::getFormData('due_minute');
+        $alarm_set = Horde::getFormData('alarm');
+        $alarm_unit = Horde::getFormData('alarm_unit');
+        $alarm_value = Horde::getFormData('alarm_value');
+        if ($alarm_set) {
+            $task_alarm = $alarm_value * $alarm_unit ;
+        } else {
+            $task_alarm = 0;
+        }
 
         if ($task_category == '*new*') {
             $new_category = Horde::getFormData('new_category');
@@ -145,7 +179,7 @@
 
                 $task_id = $storage->addTask($task_name, $task_desc, $task_due,
                                              $task_priority, $task_completed,
-                                             $task_category);
+                                             $task_category,$alarm);
             } else {
                 /* Saving to the same task list. */
                 $storage = &Nag_Driver::singleton($conf['storage']['driver'], $tasklist_target,
@@ -157,6 +191,7 @@
                 $storage->modifyTask($task_id, 'due', $task_due);
                 $storage->modifyTask($task_id, 'priority', $task_priority);
                 $storage->modifyTask($task_id, 'completed', $task_completed);
+                $storage->modifyTask($task_id, 'alarm', $task_alarm);
                 $storage->modifyTask($task_id, 'category', $task_category);
             }
         } else {
@@ -166,7 +201,7 @@
 
             $task_id = $storage->addTask($task_name, $task_desc, $task_due,
                                          $task_priority, $task_completed,
-                                         $task_category);
+                                         $task_category,$task_alarm);
         }
 
         /* Store the changes. */
Index: view.php
===================================================================
RCS file: /repository/nag/view.php,v
retrieving revision 1.22
diff -u -b -B -w -u -B -b -w -r1.22 view.php
--- view.php	10 Jan 2003 19:54:55 -0000	1.22
+++ view.php	20 Feb 2003 14:04:34 -0000
@@ -54,6 +54,12 @@
 if (!$task) {
     require NAG_TEMPLATES . '/view/no-task.inc';
 } else {
+    /* set up alarm units and value */
+    $task_alarm = $task['alarm'];
+    if (!$task['due']) {
+        $task_alarm = 0;
+    }
+    $alarm_text = Nag::formatAlarm($task_alarm);
     require NAG_TEMPLATES . '/view/headers.inc';
     if (!$print_view) {                                                        
         require NAG_TEMPLATES . '/view/navbar.inc';                            
Index: lib/Driver.php
===================================================================
RCS file: /repository/nag/lib/Driver.php,v
retrieving revision 1.34
diff -u -b -B -w -u -B -b -w -r1.34 Driver.php
--- lib/Driver.php	6 Jan 2003 09:36:22 -0000	1.34
+++ lib/Driver.php	20 Feb 2003 14:04:35 -0000
@@ -142,10 +142,13 @@
      * @param optional integer $due       The due date of the task.
      * @param optional integer $priority  The priority of the task.
      * @param optional integer $completed The completion state of the task.
+     * @param optional integer $category  The category of the task.
+     * @param optional integer $completed The alarm associatesd to the task.
      *
      * @return integer  The numeric ID of the new task.
      */
-    function addTask($name, $desc, $due = 0, $priority = 0, $completed = 0, $category = 0)
+    function addTask($name, $desc, $due = 0, $priority = 0, $completed = 0,
+    $category = 0, $alarm=0)
     {
         /* Create a new task task. */
         $task = array();
@@ -156,6 +159,7 @@
         $task['priority'] = $priority;
         $task['completed'] = $completed;
         $task['category'] = $category;
+        $task['alarm'] = $alarm;
         $task['flags'] = TASK_ADDED;
 
         /* Add it to the $tasks list. */
Index: lib/Nag.php
===================================================================
RCS file: /repository/nag/lib/Nag.php,v
retrieving revision 1.68
diff -u -b -B -w -u -B -b -w -r1.68 Nag.php
--- lib/Nag.php	6 Feb 2003 18:32:22 -0000	1.68
+++ lib/Nag.php	20 Feb 2003 14:04:38 -0000
@@ -21,6 +21,125 @@
  */
 class Nag {
 
+    function dateObject($date = null)
+    {
+        $obj->year  = null;
+        $obj->month = null;
+        $obj->mday  = null;
+        $obj->hour  = null;
+        $obj->min   = null;
+        $obj->sec   = null;
+
+        if (is_array($date) || is_object($date)) {
+            foreach ($date as $key => $val) {
+                $obj->$key = $val;
+            }
+        }
+
+        return $obj;
+    }
+
+    function compareDates($first, $second)
+    {
+        $first = Nag::dateObject($first);
+        $second = Nag::dateObject($second);
+
+        if ($first->year - $second->year != 0) {
+            return $first->year - $second->year;
+        } elseif ($first->month - $second->month != 0) {
+            return $first->month - $second->month;
+        } elseif ($first->mday - $second->mday != 0) {
+            return $first->mday - $second->mday;
+        } elseif ($first->hour - $second->hour != 0) {
+            return $first->hour - $second->hour;
+        } elseif ($first->min - $second->min != 0) {
+            return $first->min - $second->min;
+        } else {
+            return $first->sec - $second->sec;
+        }
+    }
+
+    function dateDiff($start, $end, $split = false)
+    {
+        $start = Nag::dateObject($start);
+        $end = Nag::dateObject($end);
+
+        $res->year = $end->year - $start->year;
+        $res->month = $end->month - $start->month;
+        $res->mday = $end->mday - $start->mday;
+        $res->hour = $end->hour - $start->hour;
+        $res->min = $end->min - $start->min;
+        $res->sec = $end->sec - $start->sec;
+        if (!$split) {
+            $res->month += $res->year * 12;
+            $res->mday = Date_Calc::dateDiff($start->mday, $start->month, $start->year, $end->mday, $end->month, $end->year);
+            $res->hour += $res->mday * 24;
+            $res->min += $res->hour * 60;
+            $res->sec += $res->min * 60;
+        }
+
+        return $res;
+    }
+
+    function timestampToObject($timestamp)
+    {
+        list($res->hour, $res->min, $res->sec, $res->mday, $res->month, $res->year) = explode('/', date('H/i/s/j/n/Y', $timestamp));
+        return $res;
+    }
+
+    function secondsToString($seconds)
+    {
+        $hours = floor($seconds / 3600);
+        $minutes = ($seconds / 60) % 60;
+
+        if ($hours > 1) {
+            if ($minutes == 0) {
+                return sprintf(_("%d hours"), $hours);
+            } else if ($minutes == 1) {
+                return sprintf(_("%d hours, %d minute"), $hours, $minutes);
+            } else {
+                return sprintf(_("%d hours, %d minutes"), $hours, $minutes);
+            }
+        } else if ($hours == 1) {
+            if ($minutes == 0) {
+                return sprintf(_("%d hour"), $hours);
+            } else if ($minutes == 1) {
+                return sprintf(_("%d hour, %d minute"), $hours, $minutes);
+            } else {
+                return sprintf(_("%d hour, %d minutes"), $hours, $minutes);
+            }
+        } else {
+            if ($minutes == 0) {
+                return _("no time");
+            } else if ($minutes == 1) {
+                return sprintf(_("%d minute"), $minutes);
+            } else {
+                return sprintf(_("%d minutes"), $minutes);
+            }
+        }
+    }
+    /**
+     * Retrieve the time this task is due.
+     *
+     * @param integer $task   (optional) task concerned.
+     * @param integer $dayTimestamp   (optional) The timestamp of a day a
+     *                                      recurrance occurs. First recurrance
+     *                                      used if not specified.
+     *
+     * @return integer The timestamp for the start of this event.
+     */
+    function getDueTimestamp($task, $dayTimestamp = null)
+    {
+        if (!isset($dayTimestamp)) {
+            return $task['due'];
+        }
+
+        list($year, $month, $day) = explode(':', date('Y:n:j', $dayTimestamp));
+        list($hour, $min, $sec) = explode(':', date('G:i:s', $this->startTimestamp));
+
+        return mktime($hour, $min, $sec, $month, $day, $year);
+    }
+
     /**
      * Retrieves the current user's task list from storage.
      * This function will also sort the resulting list, if requested.
@@ -108,6 +227,41 @@
     }
 
     /**
+     * Returns all the alarms active right on $date.
+     *
+     * @param object $date         The start of the time range.
+     *
+     * @return array  The alarms (alarmId) active on $date.
+     */
+    function listAlarms($date)
+    {
+        global  $conf;
+        $tasks = array();
+
+
+        foreach ($GLOBALS['display_tasklists'] as $tasklist) {
+            /* Create a Nag storage instance. */
+            $storage = &Nag_Driver::singleton($conf['storage']['driver'], $tasklist,
+                                              $conf['storage']['params']);
+            $storage->retrieve();
+
+            /* Retrieve the task list for storage. */
+            $newtasks = $storage->listAlarms($date);
+
+            /* Filter complete/incomplete tasks  */
+            foreach ($newtasks as $taskID => $task) {
+                if (!empty($task['completed'])) {
+                    unset($newtasks[$taskID]);
+                }
+            }
+
+            $tasks = array_merge($tasks, $newtasks);
+        }
+
+        return $tasks;
+    }
+
+    /**
      * List a user's categories
      *
      * @return array A list of categories.
@@ -539,6 +693,36 @@
         }
 
         return _("Unknown");
+    }
+
+    /**
+     * Returns the string matching the given alarm value.
+     *
+     * @param int  $value       The alarm value in minutes.
+     *
+     * @return string       The formatted alarm string.
+     */
+    function formatAlarm($value)
+    {
+        if ($value) {
+            if ($value % 10080 == 0) {
+                $alarm_value = $value / 10080;
+                $alarm_unit = _("Week(s)");
+            } elseif ($value % 1440 == 0) {
+                $alarm_value = $value / 1440;
+                $alarm_unit = _("Day(s)");
+            } elseif ($value % 60 == 0) {
+                $alarm_value = $value / 60;
+                $alarm_unit = _("Hour(s)");
+            } else {
+                $alarm_value = $value;
+                $alarm_unit = _("Minute(s)");
+            }
+            $alarm_text = "$alarm_value $alarm_unit";
+        } else {
+            $alarm_text = _("None");
+        }
+        return $alarm_text;
     }
 
     /**
Index: lib/base.php
===================================================================
RCS file: /repository/nag/lib/base.php,v
retrieving revision 1.46
diff -u -b -B -w -u -B -b -w -r1.46 base.php
--- lib/base.php	5 Jan 2003 18:34:54 -0000	1.46
+++ lib/base.php	20 Feb 2003 14:04:38 -0000
@@ -46,6 +46,10 @@
 $notification = &Notification::singleton();
 $notification->attach('status');
 
+// PEAR Date_Calc
+require_once 'Date/Calc.php';
+
+
 // Set the timezone variable, if available.
 NLS::setTimeZone();
 
Index: lib/Driver/sql.php
===================================================================
RCS file: /repository/nag/lib/Driver/sql.php,v
retrieving revision 1.36
diff -u -b -B -w -u -B -b -w -r1.36 sql.php
--- lib/Driver/sql.php	17 Jan 2003 22:43:23 -0000	1.36
+++ lib/Driver/sql.php	20 Feb 2003 14:04:43 -0000
@@ -106,6 +106,7 @@
                 $task['due'] = $row['task_due'];
                 $task['priority'] = $row['task_priority'];
                 $task['completed'] = $row['task_completed'];
+                $task['alarm'] = $row['task_alarm'];
                 $task['flags'] = 0;
 
                 /* Add this new task to the $tasks list. */
@@ -149,8 +150,9 @@
                 $query = sprintf(
                     'INSERT INTO %s (task_owner, task_id, task_name, ' .
                     'task_desc, task_due, task_priority, ' .
-                    'task_completed, task_category, task_modified) ' .
-                    'VALUES (%s, %d, %s, %s, %d, %d, %d, %d, %d)',
+                    'task_completed, task_category, task_modified, '.
+                    'task_alarm) ' .
+                    'VALUES (%s, %d, %s, %s, %d, %d, %d, %d, %d, %d)',
                     $this->_params['table'],
                     $this->_db->quote($this->_user),
                     $task_id,
@@ -160,7 +162,8 @@
                     $task['priority'],
                     $task['completed'],
                     $task['category'],
-                    time());
+                    time(),
+                    $task['alarm']);
 
                     /* Log the query at a DEBUG log level. */
                     Horde::logMessage(sprintf('Nag_Driver_sql::store(): %s', $query),
@@ -191,7 +194,8 @@
                 $query .= sprintf('task_priority = %d, ', $task['priority']);
                 $query .= sprintf('task_completed = %d, ', $task['completed']);
                 $query .= sprintf('task_category = %d, ', $task['category']);
-                $query .= sprintf('task_modified = %d ', time());
+                $query .= sprintf('task_modified = %d, ', time());
+                $query .= sprintf('task_alarm = %d ', $task['alarm']);
                 $query .= sprintf('WHERE task_owner = %s AND task_id = %d',
                                   $this->_db->quote($this->_user), $task_id);
 
@@ -292,6 +296,70 @@
         }
 
         return true;
+    }
+
+    function listEvents($startDate = null, $endDate = null, $hasAlarm = false)
+    {
+        $events = array();
+
+        if (!isset($endDate)) {
+            $endDate = Nag::dateObject(array('mday' => 31, 'month' => 12, 'year' => 9999));
+        } else {
+            list($endDate->mday, $endDate->month, $endDate->year) = explode('/', Date_Calc::nextDay($endDate->mday, $endDate->month, $endDate->year, '%d/%m/%Y'));
+        }
+
+        $etime = sprintf('%04d-%02d-%02d 00:00:00', $endDate->year, $endDate->month, $endDate->mday);
+        if (isset($startDate)) {
+            $stime = sprintf('%04d-%02d-%02d 00:00:00', $startDate->year, $startDate->month, $startDate->mday);
+        }
+
+        $q = 'SELECT DISTINCT e.task_id FROM ' . $this->_params['table'] . ' e' .
+             ' WHERE e.task_owner = ' . $this->_db->quote($this->_user) . ' AND ((';
+
+        if ($hasAlarm) {
+            $q .= 'e.task_alarm > 0)) AND ((';
+        }
+
+        if (isset($stime)) {
+            $q .= 'e.task_due > ' . $this->_db->quote($stime) . ' AND ';
+        }
+        $q .= 'e.task_due < ' . $this->_db->quote($etime) . '))';
+
+        /* Log the query at a DEBUG log level. */
+        Horde::logMessage(sprintf('SQL event list by %s: table = %s; query = "%s"',
+                                  Auth::getAuth(), $this->_params['table'], $q),
+                          __FILE__, __LINE__, LOG_DEBUG);
+
+        /* Run the query. */
+        $qr = $this->_db->query($q);
+
+        if (!DB::isError($qr)) {
+            $row = $qr->fetchRow(DB_FETCHMODE_ASSOC);
+            while ($row && !DB::isError($row)) {
+                $events[] = $row['event_id'];
+                $row = $qr->fetchRow(DB_FETCHMODE_ASSOC);
+            }
+        }
+
+        return $events;
+    }
+
+    function listAlarms($date)
+    {
+        $allevents = $this->listEvents($date, $date, true);
+        $events = array();
+
+        foreach ($allevents as $eventid) {
+            $task = $this->_tasks[$eventid];
+
+            $diff = Nag::dateDiff($date,
+                                        Nag::timestampToObject($task['due']));
+            if ($diff->sec < $task['alarm'] * 60) {
+                $events[] = $task;
+            }
+        }
+
+        return is_array($events) ? $events : array();
     }
 
 }
Index: scripts/drivers/nag_tasks.sql
===================================================================
RCS file: /repository/nag/scripts/drivers/nag_tasks.sql,v
retrieving revision 1.8
diff -u -b -B -w -u -B -b -w -r1.8 nag_tasks.sql
--- scripts/drivers/nag_tasks.sql	23 Apr 2002 05:30:14 -0000	1.8
+++ scripts/drivers/nag_tasks.sql	20 Feb 2003 14:04:44 -0000
@@ -11,6 +11,7 @@
     task_category   int not null default 0,
     task_completed  smallint not null default 0,
     task_private    smallint not null default 1,
+    task_alarm	     int not null default 0,
     primary key (task_owner, task_id)
 );
 
Index: templates/list/task_headers.inc
===================================================================
RCS file: /repository/nag/templates/list/task_headers.inc,v
retrieving revision 1.17
diff -u -b -B -w -u -B -b -w -r1.17 task_headers.inc
--- templates/list/task_headers.inc	29 Nov 2002 18:48:24 -0000	1.17
+++ templates/list/task_headers.inc	20 Feb 2003 14:04:44 -0000
@@ -30,4 +30,5 @@
         <?php echo Horde::link(Horde::applicationUrl(Horde::addParameter($sortbyurl, 'sortby=' . NAG_SORT_CATEGORY)), _("Sort Direction"), 'widget') . Horde::img($prefs->getValue('sortdir') ? 'down.gif' : 'up.gif', _("Sort Direction")) ?></a>
         <?php echo Horde::link(Horde::applicationUrl(Horde::addParameter('list.php', 'sortby=' . NAG_SORT_CATEGORY)), _("Sort by Category"), 'widget') . _("Category") ?></a>
     </th>
-    <td width="2%"><?php echo Horde::img('note.gif', _("Task Note?")) ?></td></tr>
+    <td width="2%"><?php echo Horde::img('note.gif', _("Task Note?")) ?></td>
+    <td width="2%"><?php echo Horde::img('alarm.gif', _("Task Alarm?")) ?></td></tr>
Index: templates/list/task_summaries.inc
===================================================================
RCS file: /repository/nag/templates/list/task_summaries.inc,v
retrieving revision 1.28
diff -u -b -B -w -u -B -b -w -r1.28 task_summaries.inc
--- templates/list/task_summaries.inc	23 Jan 2003 19:40:27 -0000	1.28
+++ templates/list/task_summaries.inc	20 Feb 2003 14:04:44 -0000
@@ -25,4 +25,6 @@
     </td>
     <td><?php echo Nag::formatCategory($task['category'], $task['tasklist_id']) ?></td>
     <td><?php echo !empty($task['desc']) ? Horde::img('note.gif', _("Task Note")) : '&nbsp;' ?></td>
+    <td><?php echo (!empty($task['alarm']) && !empty($task['due'])) ?
+    Horde::img('alarm.gif', _("Task Alarm")) : '&nbsp;' ?></td>
 </tr>
Index: templates/task/task.inc
===================================================================
RCS file: /repository/nag/templates/task/task.inc,v
retrieving revision 1.16
diff -u -b -B -w -u -B -b -w -r1.16 task.inc
--- templates/task/task.inc	6 Oct 2002 03:26:45 -0000	1.16
+++ templates/task/task.inc	20 Feb 2003 14:04:44 -0000
@@ -45,6 +45,25 @@
         <?php echo $hour_widget ?>&nbsp;<b></b>&nbsp;<?php echo $minute_widget ?>
     </td>
 </tr>
+<!-- alarm -->
+<tr>
+ <td align="right" class="item">
+    <b><label for="noalarm" <?php $ak = Horde::getAccessKey(_("Alarm")); echo (!empty($ak)) ? 'accesskey="' . $ak . '" ' : '' ?>>
+    <?php echo Horde::highlightAccessKey(_("Alarm"), $ak) ?>&nbsp;&nbsp;
+    </label></b>
+  </td>
+ <td class="item" align="left" valign="top" colspan="3">
+  <input id="noalarm" name="alarm" type="radio" value="0"<?php if (!$alarm_set) echo ' checked="checked"' ?>/><label for="noalarm"> <?php echo _("None") ?></label><br />
+  <input name="alarm" type="radio" value="1"<?php if ($alarm_set) echo ' checked="checked"' ?> />
+  <input type="text" size="2" name="alarm_value" value="<?php echo $alarm_value ?>" onchange="document.task.alarm[1].checked=true" />&nbsp;
+  <select name="alarm_unit" onchange="document.task.alarm[1].checked=true">
+   <option value="1"<?php echo ($alarm_unit == 'min') ? ' selected="selected"' : '' ?>><?php echo _("Minute(s)") ?></option>
+   <option value="60"<?php echo ($alarm_unit == 'hour') ? ' selected="selected"' : '' ?>><?php echo _("Hour(s)") ?></option>
+   <option value="1440"<?php echo ($alarm_unit == 'day') ? ' selected="selected"' : '' ?>><?php echo _("Day(s)") ?></option>
+   <option value="10080"<?php echo ($alarm_unit == 'week') ? ' selected="selected"' : '' ?>><?php echo _("Week(s)") ?></option>
+  </select>
+ </td>
+</tr>
 <tr>
     <td class="item" align="right" valign="top"><b><?php echo _("Priority") ?></b>&nbsp;</td>
     <td class="item" width="100%">
Index: templates/view/headers.inc
===================================================================
RCS file: /repository/nag/templates/view/headers.inc,v
retrieving revision 1.17
diff -u -b -B -w -u -B -b -w -r1.17 headers.inc
--- templates/view/headers.inc	13 Jan 2003 21:54:58 -0000	1.17
+++ templates/view/headers.inc	20 Feb 2003 14:04:44 -0000
@@ -18,6 +18,11 @@
     <td class="item0" width="100%"><?php echo Nag::formatDate($task['due']) ?></td>
 </tr>
 <tr>
+    <td class="item1" align="right" valign="top" nowrap="nowrap"><b><?php echo
+    _("Alarm") ?>:</b>&nbsp;</td>
+    <td class="item1" width="100%"><?php echo $alarm_text ?></td>
+</tr>
+<tr>
     <td class="item1" align="right" valign="top" nowrap="nowrap"><b><?php echo _("Priority") ?>:</b>&nbsp;</td>
     <td class="item1" width="100%"><?php echo $task['priority'] ?></td>
 </tr>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nag_new_files.tgz
Type: application/x-gzip
Size: 1360 bytes
Desc: 
Url : http://lists.horde.org/archives/dev/attachments/20030220/a459b964/nag_new_files-0001.bin


More information about the dev mailing list