#141 [NEW]: paging links at the bottom as well as the top (usability issue)

From: Date: Wed, 22 Oct 2003 14:34:49 +0000
Subject: #141 [NEW]: paging links at the bottom as well as the top (usability issue)
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-649@lists.php.net to get a copy of this message
From: l dot alberton at quipo dot it Operating system: all PHP version: Irrelevant PHP Bug Type: Web Site Bug description: paging links at the bottom as well as the top (usability issue) Description: ------------ Add pager links (prev/next) at the bottom as well as the top in http://pear.php.net/packages.php When the page is long, the user has to go to the top of the page again to see those links... Patch for pearweb/templates/ackages.html: <![CDATA[ --- packages.html 2003-09-01 11:54:04.000000000 +0200 +++ new_packages.html 2003-10-22 15:21:23.000000000 +0200 @@ -30,6 +30,7 @@ <tr> <th valign="top" align="left"> Contents of :: <?html_category_urhere($catpid, false)?> + (Page <?=$currentPage?> of <?=$numPages?>) </th> <td valign="top" align="right"> <?=$showempty_link?> @@ -61,6 +62,12 @@ font-weight: bold; } + td.tableFooter { + background-color: #cccccc; + border-top: 1px solid black; + font-weight: bold; + } + td.moreInfo { background-color: #f0f0f0; border: 1px dashed #c0c0c0; @@ -110,7 +117,7 @@ <th class="pkgListHeader">#</td> <th class="pkgListHeader"><nobr>Package name</nobr></td> <th class="pkgListHeader">Description</td> - <td>&nbsp;</td> + <th class="pkgListHeader">&nbsp;</td> </tr> <?foreach($packages as $p):?> @@ -166,6 +173,17 @@ </table> </td> </tr> + <tr> + <td> + <table border="0" width="100%" cellspacing="0"> + <tr> + <td class="tableFooter" width="50" align="left">&nbsp;<?=$prev?></td> + <td class="tableFooter" align="center">Packages (<?=$first?> - <?=$last?> of <?=$total?>)</td> + <td class="tableFooter" width="50" align="right"><?=$next?>&nbsp;</td> + </tr> + </table> + </td> + </tr> </table> <?elseif($catpid):?> ]]> Patch for pearweb/public_html/packages.php: <![CDATA[ --- packages.php 2003-10-20 12:30:59.000000000 +0200 +++ new_packages.php 2003-10-22 15:28:19.000000000 +0200 @@ -205,7 +205,8 @@ $pager = new Pager(array('totalItems' => $total, 'perPage' => 15)); list($first, $last) = $pager->getOffsetByPageId(); list($prev, $pages, $next) = $pager->getLinks('<nobr><img src="gifs/prev.gif" width="10" height="10" border="0" alt="&lt;&lt;" />Back</nobr>', '<nobr>Next<img src="gifs/next.gif" width="10" height="10" border="0" alt="&gt;&gt;" /></nobr>'); - + $currentPage = $pager->getCurrentPageID(); + $numPages = $pager->numPages(); $packages = array_slice($packages, $first - 1, 15); foreach ($packages as $key => $pkg) { ]]> -- Edit bug report at http://pear.php.net/bugs/bug.php?id=141&edit=1 --

« previous php.pear.webmaster (#649) next »