Issues

ZF-3822: Paginator Control Example error

Issue Type: Bug Created: 2008-07-31T14:54:57.000+0000 Last Updated: 2008-08-03T15:24:18.000+0000 Status: Resolved Fix version(s): - 1.6.1 (15/Sep/08)

Reporter: Martin Hujer (mhujer) Assignee: Jurrien Stutterheim (norm2782) Tags: - Zend_Paginator

Related issues: Attachments:

Description

Item pagination control example:

'First page' and 'Last page' links are active all the time. I suppose, that if you are on the page number 1, you can't go to the 'First page' (same with the last page).

Best practices don't recommend link which doesn't visually change anything.

It should be done this way.

Patch:

<pre class="highlight">
Index: documentation/manual/en/module_specs/Zend_Paginator-Usage.xml
===================================================================
--- documentation/manual/en/module_specs/Zend_Paginator-Usage.xml   (revision 10572)
+++ documentation/manual/en/module_specs/Zend_Paginator-Usage.xml   (working copy)
@@ -334,7 +334,12 @@
 <?= $this->firstItemNumber; ?> - <?= $this->lastItemNumber; ?> 
 of <?= $this->totalItemCount; ?>
 
-<a href="">First</a> | 
+
+<?php if (isset($this->previous)): ?>
+  <a href="">First</a> | 
+<?php else: ?>
+  <span class="disabled">First</span> |
+<?php endif; ?> 
 
  
 <?php if (isset($this->previous)): ?> 
@@ -350,7 +355,12 @@
   <span class="disabled">Next ></span> |
 <?php endif; ?>
 
-<a href="">Last</a>
+
+<?php if (isset($this->next)): ?>
+  <a href="">Last</a>
+<?php else: ?>
+  <span class="disabled">Last</span>
+<?php endif; ?> 
 

Comments

Posted by Martin Hujer (mhujer) on 2008-08-01T02:43:33.000+0000

Added a patch.

Posted by Jurrien Stutterheim (norm2782) on 2008-08-03T15:24:16.000+0000

Resolved in revision 10620

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts