[copr] master: Some styling for pagination (dd46dc9)

bkabrda at fedoraproject.org bkabrda at fedoraproject.org
Tue Jan 22 07:01:51 UTC 2013


Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : master

>---------------------------------------------------------------

commit dd46dc9e49c083d8ff88671e00a7d9be1d2853e0
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Mon Jan 21 12:40:12 2013 +0100

    Some styling for pagination


>---------------------------------------------------------------

 coprs_frontend/coprs/static/style-new.css    |    7 +++++++
 coprs_frontend/coprs/templates/_helpers.html |    6 +++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/coprs_frontend/coprs/static/style-new.css b/coprs_frontend/coprs/static/style-new.css
index 5297d18..629b84e 100644
--- a/coprs_frontend/coprs/static/style-new.css
+++ b/coprs_frontend/coprs/static/style-new.css
@@ -45,6 +45,13 @@ div.flash {
   -webkit-border-radius: 5px;
 }
 
+div.pagination {
+  width: 100%;
+  text-align: center;
+  font-size: 1.3em;
+  margin: 1em;
+}
+
 div.login, div.login a {
   color: white;
   font-weight: bold;
diff --git a/coprs_frontend/coprs/templates/_helpers.html b/coprs_frontend/coprs/templates/_helpers.html
index 38d3aa4..487a5dc 100644
--- a/coprs_frontend/coprs/templates/_helpers.html
+++ b/coprs_frontend/coprs/templates/_helpers.html
@@ -20,7 +20,11 @@
       <a href="{{ paginator.border_url(request, True)[0] }}">{{ paginator.border_url(request, True)[1] }}</a> ...
     {% endif %}
     {% for page in paginator.get_urls(request) %}
-      <a href="{{ page[0] }}">{{ page[1] }}</a>
+      {% if page[1] != paginator.page %} {# no url for current page #}
+        <a href="{{ page[0] }}">{{ page[1] }}</a>
+      {% else %}
+        {{ page[1] }}
+      {% endif %}
     {% endfor %}
     {% if paginator.border_url(request, False) %}
       ... <a href="{{ paginator.border_url(request, False)[0] }}">{{ paginator.border_url(request, False)[1] }}</a>



More information about the copr-devel mailing list