Direction of navigation buttons in messageview FIXED

lundeman@tbkol.dk lundeman@tbkol.dk
Fri, 17 Aug 2001 03:00:16 +0200


Hi..

I fixed my issue with the direction of the navigation buttons in the 
messageview, so that their direction is based on the sorting direction.

I made a patch, well I did use diff, but I have never tried this before so bare 
with me :o)

here is the output from my diff command on 
~/horde/imp/templates/message/navbar.inc

---------- PATCH START ----------

*** navbar.inc.bckup    Fri Aug 17 02:21:42 2001
--- navbar.inc  Fri Aug 17 02:40:15 2001
***************
*** 25,30 ****
--- 25,32 ----
  <td align="right">
  <?= Horde::link(Horde::url('mailbox.php?start=' . ($msgindex + 1)), sprintf(_
("Back to %s"), $imp['label']), 'widget') . sprintf(_("Back to %s"), $imp
['label']) ?></a>&nbsp;&nbsp;
  
+ <?php if ($prefs->getValue('sortdir') == 0): ?>
+ 
  <?php if ($HTTP_GET_VARS['array_index'] != 0): ?>
  <?= Horde::link(Horde::url("message.php?index=${prev}
&array_index=${prev_index}"), _("Previous Message"), 'widget') . Horde::img
('prev.gif', 'width="12" height="13" alt="' . _("Previous Message") . '"') ?
></a>
  <?php else: ?>
***************
*** 34,39 ****
--- 36,58 ----
  <?= Horde::link(Horde::url("message.php?index=${next}
&array_index=${next_index}"), _("Next Message"), 'widget') . Horde::img
('next.gif', 'width="12" height="13" alt="' . _("Next Message") . '"') ?></a>
  <?php else: ?>
  <?= Horde::img('next-grey.gif', 'width="12" height="13" alt=""') ?>
+ <?php endif; ?>
+ 
+ <?php else: ?>
+ 
+ <?php if ($HTTP_GET_VARS['array_index'] != count($sorted)-1): ?>
+ <?= Horde::link(Horde::url("message.php?index=${next}
&array_index=${next_index}"), _("Previous Message"), 'widget') . Horde::img('pr
+ ev.gif', 'width="12" height="13" alt="' . _("Previous Message") . '"') ?></a>
+ <?php else: ?>
+ <?= Horde::img('prev-grey.gif', 'width="12" height="13" alt=""') ?>
+ <?php endif; ?>
+ <?php if ($HTTP_GET_VARS['array_index'] != 0): ?>
+ <?= Horde::link(Horde::url("message.php?index=${prev}
&array_index=${prev_index}"), _("Next Message"), 'widget') . Horde::img('next.g
+ if', 'width="12" height="13" alt="' . _("Next Message") . '"') ?></a>
+ <?php else: ?>
+ <?= Horde::img('next-grey.gif', 'width="12" height="13" alt=""') ?>
+ <?php endif; ?>
+ 
  <?php endif; ?>
  </td>
  </tr></table>

---------- PATCH END ----------

Hope this is helpfull..

If this patch is to no good because of some errors I made during the diff 
please let me know so that I can get it right the next time..

btw: I tried to find a document containing the Coding standarts for the horde 
project but I ´didn't succeed, can someone tell me where to find it..??

René Jensen
lundeman@tbkol.dk