]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/map_index.mako
Use pagination on the maps page instead of a full select count(*).
[xonotic/xonstat.git] / xonstat / templates / map_index.mako
index 481b9a8d292ed00536f3b8ac4889b5907b4ddc30..0dc12111a158713f42d396921f7bc5368715dfbb 100644 (file)
@@ -1,6 +1,5 @@
 <%inherit file="base.mako"/>
 <%namespace name="nav" file="nav.mako" />
-<%namespace file="navlinks.mako" import="navlinks" />
 
 <%block name="navigation">
   ${nav.nav('maps')}
@@ -10,8 +9,11 @@
   Map Index
 </%block>
 
-% if not maps:
-  <h2>Sorry, no maps yet. Get playing!</h2>
+% if not maps and last is not None:
+  <h2 class="text-center">Sorry, no more maps!</h2>
+
+% elif not maps:
+  <h2 class="text-center">Sorry, no maps yet. Get playing!</h2>
 
 % else:
   <div class="row">
       % endfor
       </table>
 
-      <!-- navigation links -->
-      ${navlinks("map_index", maps.page, maps.last_page)}
+      % if len(maps) == 20:
+        <div class="row">
+          <div class="small-12 columns">
+            <ul class="pagination">
+              <li>
+                <a  href="${request.route_url('map_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
+              </li>
+            </ul>
+          </div>
+        </div>
+      % endif
+
     </div> <!-- /span4 -->
   </div> <!-- /row -->
 % endif