Author: david
Date: Fri Oct 21 11:34:37 2011
New Revision: 10156

Log:
Add search result count and timer

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 11:25:51 2011        (r10155)
+++ trunk/apps/qubit/modules/search/actions/indexAction.class.php       Fri Oct 
21 11:34:37 2011        (r10156)
@@ -21,6 +21,8 @@
 {
   public function execute($request)
   {
+    $this->timer = new QubitTimer;
+
     if ('print' == $request->getGetParameter('media'))
     {
       $this->getResponse()->addStylesheet('print-preview', 'last');

Modified: trunk/apps/qubit/modules/search/templates/indexSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/search/templates/indexSuccess.php  Fri Oct 21 
11:25:51 2011        (r10155)
+++ trunk/apps/qubit/modules/search/templates/indexSuccess.php  Fri Oct 21 
11:34:37 2011        (r10156)
@@ -22,6 +22,11 @@
   </div>
 
 <?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)): ?>
 

Modified: trunk/css/print.css
==============================================================================
--- trunk/css/print.css Fri Oct 21 11:25:51 2011        (r10155)
+++ trunk/css/print.css Fri Oct 21 11:34:37 2011        (r10156)
@@ -164,7 +164,7 @@
 
 h2
 {
-  font: bold 12pt Lucida Grande, Verdana, sans-serif;
+  font: bold 12pt/14pt Lucida Grande, Verdana, sans-serif;
   text-align: left;
   padding: 2px 4px;
 }
@@ -357,12 +357,18 @@
   margin-left: 0;
   display: inline;
 }
+
 .search-results h2
 {
   border-bottom: 0 none;
   margin: 0;
 }
 
+#search-stats
+{
+  padding: 2px 4px;
+}
+
 #page,
 #page-wrapper
 {

-- 
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.

Reply via email to