php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55901 paging links at the bottom as well as the top (usability issue)
Submitted: 2003-10-22 10:34 UTC Modified: 2004-01-09 16:34 UTC
From: l dot alberton at quipo dot it Assigned: mj (profile)
Status: Closed Package: PECL website (PECL)
PHP Version: Irrelevant OS: all
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: l dot alberton at quipo dot it
New email:
PHP Version: OS:

 

 [2003-10-22 10:34 UTC] l dot alberton at quipo dot it
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) {
]]>



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-09 16:34 UTC] mj@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PEAR better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 10:01:27 2024 UTC