[dev] Gollem :: Folders navigation

Joel Vandal jvandal at infoteck.qc.ca
Wed Apr 7 06:31:56 PDT 2004


Hi,

Normally, the folder name is displayed on the header but when the folder deep is big, you have to click a lot of time on "Up to parent", w/ this patch (rought), you can click on each "Parent" folders. 

Check this patch if it can be useful for others. Thanks Sylvain for the suggestion. 

Index: header.inc
===================================================================
RCS file: /repository/gollem/templates/manager/header.inc,v
retrieving revision 1.28
diff -r1.28 header.inc
21c21,36
<     <b><?php echo $_SESSION['gollem'][$backend_key]['label'] ?></b>
---
> <?php
>
> $parts = explode(DIRECTORY_SEPARATOR, Gollem::getDir($backend_key));
>
> $label = array();
> for ($i = 1; $i <= count($parts); $i++) {
>   $part = array_slice($parts, 0, $i);
>   $dir = join(DIRECTORY_SEPARATOR, $part);
>
>   $up_link = Util::addParameter(Horde::applicationUrl('manager.php'), 'backend_key', $backend_key);
>   $up_link = Util::addParameter($up_link, 'dir', $dir);
>
>   $label[] = Horde::link($up_link, _("Up to parent"), 'header') . $parts[$i-1] . '</a>';
> }
> ?>
>     <b><?php echo join(DIRECTORY_SEPARATOR, $label) ; ?></b>



-- 
Joel Vandal                                    Infoteck Internet
http://www.infoteck.qc.ca            Tel.  819-370-3232
jvandal at infoteck.qc.ca                 Fax. 819-370-3624


More information about the dev mailing list