[dev] task and memo list patch

Vilius Šumskas vilius at lnk.lt
Tue Aug 9 07:12:06 PDT 2005


Nag and Mnemo lists was producing garbled html. This patch fixes it.

-- 
  Best Regards,

  Vilius
-------------- next part --------------
Index: memo_headers.inc
===================================================================
RCS file: /repository/mnemo/templates/list/memo_headers.inc,v
retrieving revision 1.21
diff -u -r1.21 memo_headers.inc
--- memo_headers.inc	3 Aug 2005 15:07:34 -0000	1.21
+++ memo_headers.inc	9 Aug 2005 14:09:25 -0000
@@ -9,7 +9,7 @@
   </th>
   <th class="leftAlign <?php echo ($sortby == MNEMO_SORT_CATEGORY) ? 'selected' : 'item' ?>" width="15%">
     <?php if ($sortby == MNEMO_SORT_CATEGORY) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', MNEMO_SORT_CATEGORY)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), '', $registry->getImageDir('horde')) . '</a>' ?>
-    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter('list.php', 'sortby', MNEMO_SORT_CATEGORY)), _("Sort by Category"), 'widget', '', '', _("_Category")) ?></a>
+    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter('list.php', 'sortby', MNEMO_SORT_CATEGORY)), _("Sort by Category"), 'widget', '', '', _("_Category")) ?>
     <?php
     if (Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
                             !$GLOBALS['prefs']->isLocked('category_colors'))) {
-------------- next part --------------
Index: task_headers.inc
===================================================================
RCS file: /repository/nag/templates/list/task_headers.inc,v
retrieving revision 1.42
diff -u -r1.42 task_headers.inc
--- task_headers.inc	3 Aug 2005 15:10:18 -0000	1.42
+++ task_headers.inc	9 Aug 2005 14:06:22 -0000
@@ -2,35 +2,35 @@
 <thead>
  <tr class="item leftAlign">
   <th class="<?php echo ($sortby == NAG_SORT_COMPLETION) ? 'selected' : 'item' ?>" width="2%">
-    <?php if ($sortby == NAG_SORT_COMPLETION) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_COMPLETION)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' :  'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) ?></a>
+    <?php if ($sortby == NAG_SORT_COMPLETION) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_COMPLETION)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' :  'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) . '</a>' ?>
     <?php echo Horde::link(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_COMPLETION)), _("Sort by Completion Status"), 'widget') . Horde::img('checkbox.png', _("Completed?")) ?></a>
   </th>
 <?php if ($showTasklist): ?>
   <th class="<?php echo ($sortby == NAG_SORT_OWNER) ? 'selected' : 'item' ?>" width="2%">
-    <?php if ($sortby == NAG_SORT_OWNER) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_OWNER)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' :  'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) ?></a>
-    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_OWNER)), _("Sort by User Name"), 'widget', '', '', _("_Task List")) ?></a>&nbsp;
+    <?php if ($sortby == NAG_SORT_OWNER) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_OWNER)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' :  'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_OWNER)), _("Sort by User Name"), 'widget', '', '', _("_Task List")) ?>
   </th>
 <?php endif; ?>
   <th class="<?php echo ($sortby == NAG_SORT_PRIORITY) ? 'selected' : 'item' ?>" width="2%">
-    <?php if ($sortby == NAG_SORT_PRIORITY) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_PRIORITY)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) ?></a>
-    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_PRIORITY)), _("Sort by Priority"), 'widget', '', '', _("P_ri")) ?></a>&nbsp;
+    <?php if ($sortby == NAG_SORT_PRIORITY) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_PRIORITY)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_PRIORITY)), _("Sort by Priority"), 'widget', '', '', _("P_ri")) ?>
   </th>
   <th width="2%">
     <?php echo Horde::img('edit.png', _("Edit Task"), null, $registry->getImageDir('horde')) ?>
-  </td>
+  </th>
   <th class="<?php echo ($sortby == NAG_SORT_NAME) ? 'selected' : 'item' ?>" width="60%">
-    <?php if ($sortby == NAG_SORT_NAME) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_NAME)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) ?></a>
-    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_NAME)), _("Sort by Name"), 'widget', '', '', _("Na_me")) ?></a>&nbsp;
+    <?php if ($sortby == NAG_SORT_NAME) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_NAME)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_NAME)), _("Sort by Name"), 'widget', '', '', _("Na_me")) ?>
   </th>
-  <td width="2%"><?php echo Horde::img('note.png', _("Task Note?")) ?></td>
-  <td width="2%"><?php echo Horde::img('alarm.png', _("Task Alarm?")) ?></td>
+  <th width="2%"><?php echo Horde::img('note.png', _("Task Note?")) ?></th>
+  <th width="2%"><?php echo Horde::img('alarm.png', _("Task Alarm?")) ?></th>
   <th class="<?php echo ($sortby == NAG_SORT_DUE) ? 'selected' : 'item' ?>" width="12%">
-    <?php if ($sortby == NAG_SORT_DUE) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_DUE)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) ?></a>
-    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_DUE)), _("Sort by Due Date"), 'widget', '', '', _("_Due Date")) ?></a>&nbsp;
+    <?php if ($sortby == NAG_SORT_DUE) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_DUE)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_DUE)), _("Sort by Due Date"), 'widget', '', '', _("_Due Date")) ?>
   </th>
   <th class="<?php echo ($sortby == NAG_SORT_CATEGORY) ? 'selected' : 'item' ?>" width="20%">
-    <?php if ($sortby == NAG_SORT_CATEGORY) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_CATEGORY)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) ?></a>
-    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_CATEGORY)), _("Sort by Category"), 'widget', '', '', _("Cat_egory")) ?></a>&nbsp;
+    <?php if ($sortby == NAG_SORT_CATEGORY) echo Horde::link(Horde::applicationUrl(Util::addParameter($sortbyurl, 'sortby', NAG_SORT_CATEGORY)), _("Change sort direction"), 'widget') . Horde::img($sortdir ? 'za.png' : 'az.png', _("Change sort direction"), null, $registry->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', NAG_SORT_CATEGORY)), _("Sort by Category"), 'widget', '', '', _("Cat_egory")) ?>
     <?php
     if (Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
                             !$GLOBALS['prefs']->isLocked('category_colors'))) {


More information about the dev mailing list