Commits

Olemis Lang committed 5b7fe84

BH Dashboard #166: Updating pagination in query results template

Comments (0)

Files changed (1)

t166/t166_r1371737_flexible_pagination_grid.diff

 # HG changeset patch
-# Parent f0f1df1c310a15dab259066b98b805b0afa3784b
-BH Theme #166: Flexible pagination in grid template
+# Parent 036b588c52b5d8ca85108111ef33c7edd3c3541b
+BH Dashboard #166: Flexible pagination in grid and query results templates
 
-diff -r f0f1df1c310a bhdashboard/widgets/templates/widget_grid.html
---- a/bhdashboard/widgets/templates/widget_grid.html	Fri Aug 10 17:23:42 2012 +0200
-+++ b/bhdashboard/widgets/templates/widget_grid.html	Fri Aug 24 20:35:04 2012 -0400
+diff -r 036b588c52b5 bhdashboard/widgets/templates/widget_grid.html
+--- a/bhdashboard/widgets/templates/widget_grid.html	Fri Aug 24 20:35:43 2012 -0400
++++ b/bhdashboard/widgets/templates/widget_grid.html	Fri Aug 24 22:55:34 2012 -0400
 @@ -27,123 +27,128 @@
    </div -->
    <py:choose test="">
      <div class="alert alert-info" py:otherwise="" style="margin-top: 2em;">
        <span class="label label-info">Info</span> Items list is empty
      </div>
+diff -r 036b588c52b5 bhdashboard/widgets/templates/widget_query_results.html
+--- a/bhdashboard/widgets/templates/widget_query_results.html	Fri Aug 24 20:35:43 2012 -0400
++++ b/bhdashboard/widgets/templates/widget_query_results.html	Fri Aug 24 22:55:34 2012 -0400
+@@ -37,10 +37,9 @@
+      xmlns:i18n="http://genshi.edgewall.org/i18n"
+      xmlns:xi="http://www.w3.org/2001/XInclude">
+   <div py:if="paginator.has_more_pages">
+-    <div class="report-result" style="float: left; margin-right: 1.6em;">
++    <div class="report-result">
+       Results <span class="numresults">(${paginator.displayed_items()})</span>
+     </div>
+-    <xi:include py:if="paginator.show_index" href="page_index.html" />
+   </div>
+   <py:def function="group_heading(groupname, results, is_first=False)">
+     <div class="report-result" py:if="groupname is not None"
+@@ -147,6 +146,9 @@
+       </tbody>
+     </py:for>
+   </table>
+-  <xi:include py:if="paginator.show_index" href="page_index.html" />
++  <div py:if="paginator.show_index" class="row" 
++      style="margin-top: -12px; margin-bottom: 12px; text-align: center">
++    <xi:include href="${pagination_template or 'page_index.html'}" />
++  </div>
+ </div>
+