Author: david
Date: Fri Oct 21 13:27:15 2011
New Revision: 10160
Log:
Show pager for printed search results
Modified:
trunk/apps/qubit/modules/search/actions/indexAction.class.php
trunk/apps/qubit/modules/search/templates/indexSuccess.php
trunk/css/print.css
Modified: trunk/apps/qubit/modules/search/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/search/actions/indexAction.class.php Fri Oct
21 13:14:17 2011 (r10159)
+++ trunk/apps/qubit/modules/search/actions/indexAction.class.php Fri Oct
21 13:27:15 2011 (r10160)
@@ -63,8 +63,8 @@
if (!empty($hits))
{
$this->pager = new QubitArrayPager;
- $this->pager->hits = $hits;
$this->pager->setMaxPerPage($request->limit);
+ $this->pager->hits = $hits;
$this->pager->setPage($request->page);
}
else if (empty($this->error))
Modified: trunk/apps/qubit/modules/search/templates/indexSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/search/templates/indexSuccess.php Fri Oct 21
13:14:17 2011 (r10159)
+++ trunk/apps/qubit/modules/search/templates/indexSuccess.php Fri Oct 21
13:27:15 2011 (r10160)
@@ -23,21 +23,16 @@
<?php else: ?>
- <div id="search-stats">
- <?php echo __('Found %1% results in %2% seconds', array(
- '%1%' => count($pager->hits),
- '%2%' => $timer->elapsed())) ?>
- </div>
-
<?php if (isset($pager)): ?>
-
- <?php if ('print' != $sf_request->getGetParameter('media')): ?>
- <?php echo get_partial('search/searchResults', array('pager' => $pager))
?>
- <?php echo get_partial('default/pager', array('pager' => $pager)) ?>
- <?php else: ?>
- <?php echo get_partial('default/pager', array('pager' => $pager)) ?>
- <?php echo get_partial('search/searchResults', array('pager' => $pager))
?>
- <?php endif; ?>
+ <div id="search-pager">
+ <?php if ('print' != $sf_request->getGetParameter('media')): ?>
+ <?php echo get_partial('search/searchResults', array('pager' => $pager)) ?>
+ <?php echo get_partial('default/pager', array('pager' => $pager)) ?>
+ <?php else: ?>
+ <?php echo get_partial('default/pager', array('pager' => $pager)) ?>
+ <?php echo get_partial('search/searchResults', array('pager' => $pager)) ?>
+ <?php endif; ?>
+ </div>
<?php endif; ?>
Modified: trunk/css/print.css
==============================================================================
--- trunk/css/print.css Fri Oct 21 13:14:17 2011 (r10159)
+++ trunk/css/print.css Fri Oct 21 13:27:15 2011 (r10160)
@@ -427,6 +427,18 @@
min-width: 8in;
}
+#search-pager .result-count
+{
+ text-align: left;
+ padding: 2px 4px;
+ color: black;
+}
+
+#search-pager .pager
+{
+ display: block;
+}
+
table.item-list img
{
float: left;
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.