From 008ed3455373a92d5e2fa99612e5a36f4958de70 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 11 May 2017 23:30:23 -0400 Subject: [PATCH] Fixes #1168: Total count of obejcts missing from list view paginator --- netbox/templates/table_paginator.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/netbox/templates/table_paginator.html b/netbox/templates/table_paginator.html index 51965d023..90bd41473 100644 --- a/netbox/templates/table_paginator.html +++ b/netbox/templates/table_paginator.html @@ -7,7 +7,7 @@ {% endif %}
- Showing {{ table.page.start_index }}-{{ table.page.end_index }} of {{ total }} - {% if total == 1 %} - {{ table.data.verbose_name }} - {% else %} - {{ table.data.verbose_name_plural }} - {% endif %} + {% with table.page.paginator.count as total %} + Showing {{ table.page.start_index }}-{{ table.page.end_index }} of {{ total }} + {% if total == 1 %} + {{ table.data.verbose_name }} + {% else %} + {{ table.data.verbose_name_plural }} + {% endif %} + {% endwith %}