ZF-3822: Paginator Control Example error

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:


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; ?>
 
-First | 
+
+<?php if (isset($this->previous)): ?>
+  First | 
+<?php else: ?>
+  First |
+<?php endif; ?> 
 
  
 <?php if (isset($this->previous)): ?> 
@@ -350,7 +355,12 @@
   Next > |
 <?php endif; ?>
 
-Last
+
+<?php if (isset($this->next)): ?>
+  Last
+<?php else: ?>
+  Last
+<?php endif; ?> 
 
 

Comments

Added a patch.

Resolved in revision 10620