[extensions-web] Add the paginator to the top of the list page



commit c1545981106fd989147348a8a079f57c35e551ba
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Dec 1 19:01:40 2011 -0500

    Add the paginator to the top of the list page

 .../extensions/templates/extensions/list.html      |   10 ++++++++--
 sweettooth/static/css/sweettooth.css               |   10 +++++-----
 2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/list.html b/sweettooth/extensions/templates/extensions/list.html
index 2c4024d..26fbd5b 100644
--- a/sweettooth/extensions/templates/extensions/list.html
+++ b/sweettooth/extensions/templates/extensions/list.html
@@ -2,6 +2,13 @@
 {% block body %}
   <ul class="extensions">
   {% if extension_list %}
+  {% load paginator %}
+  {% if page_obj.has_other_pages %}
+  <div class="paginator">
+    {% paginator page_obj %}
+  </div>
+  {% endif %}
+
   {% for extension in extension_list %}
   {% with extension.latest_version as version %}
     <li class="extension">
@@ -20,9 +27,8 @@
   {% endif %}
   </ul>
 
-  {% load paginator %}
   {% if page_obj.has_other_pages %}
-  <div id="paginator">
+  <div class="paginator">
     {% paginator page_obj %}
   </div>
   {% endif %}
diff --git a/sweettooth/static/css/sweettooth.css b/sweettooth/static/css/sweettooth.css
index 4323fd4..7481ff0 100644
--- a/sweettooth/static/css/sweettooth.css
+++ b/sweettooth/static/css/sweettooth.css
@@ -146,29 +146,29 @@ hr.bottom_shadow {
     transform: rotate(180deg);
 }
 
-#paginator {
+.paginator {
     display: block;
     background-color: #ddd;
     border-radius: 8px;
     padding: 2px;
 }
 
-#paginator .number {
+.paginator .number {
     display: inline-block;
     width: 1.5em;
     text-align: center;
     margin: 0 4px;
 }
 
-#paginator .number:first-child {
+.paginator .number:first-child {
     margin-left: 0;
 }
 
-#paginator .number:last-child {
+.paginator .number:last-child {
     margin-right: 0;
 }
 
-#paginator .number.current {
+.paginator .number.current {
     background-color: white;
     border-radius: 6px;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]