changeset 1214:53a1bd19196e

css'ed searchstats
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Wed, 02 Aug 2006 18:53:35 +0200
parents 20908b1eccb2
children a8fb67cb953b
files MoinMoin/search/results.py wiki/htdocs/modern/css/common.css
diffstat 2 files changed, 19 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/results.py	Wed Aug 02 17:47:29 2006 +0200
+++ b/MoinMoin/search/results.py	Wed Aug 02 18:53:35 2006 +0200
@@ -277,14 +277,18 @@
         """
         _ = request.getText
         output = [
-            formatter.paragraph(1),
-            formatter.text(_("Hits %(hitsFrom)d to %(hitsTo)d "
-                "from %(hits)d results out of about %(pages)d pages.") %
+            formatter.paragraph(1, attr={'class': 'searchstats'}),
+            _("Results %(bs)s%(hitsFrom)d -%(hitsTo)d%(be)s "
+                    "of about %(bs)s%(hits)d%(be)s results out of about "
+                    "%(pages)d pages.") %
                    {'hits': len(self.hits), 'pages': self.pages,
-                       'hitsFrom': hitsFrom + 1,
-                       'hitsTo': hitsFrom + request.cfg.search_results_per_page}),
-            formatter.text(u' (%s)' %
-                formatter.text(_("%.2f seconds") % self.elapsed)),
+                    'hitsFrom': hitsFrom + 1,
+                    'hitsTo': hitsFrom + request.cfg.search_results_per_page,
+                    'bs': formatter.strong(1), 'be': formatter.strong(0)},
+            u' (%s %s)' % (''.join([formatter.strong(1),
+                formatter.text("%.2f" % self.elapsed),
+                formatter.strong(0)]),
+                formatter.text(_("seconds"))),
             formatter.paragraph(0),
             ]
         return ''.join(output)
--- a/wiki/htdocs/modern/css/common.css	Wed Aug 02 17:47:29 2006 +0200
+++ b/wiki/htdocs/modern/css/common.css	Wed Aug 02 18:53:35 2006 +0200
@@ -341,7 +341,14 @@
     font-size: 0.85em;
 }
 
-
+p.searchstats {
+    font-size: 0.8em;
+    text-align: right;
+    width: 100%;
+    background-color: #E6EAF0;
+        border-top: 1px solid #9088DC;
+    padding: 2px;
+}
 
 /* MonthCalendar css */