diff --git a/app/dashboard/templates/dashboard/alias_contact_manager.html b/app/dashboard/templates/dashboard/alias_contact_manager.html index f143692f..a359e397 100644 --- a/app/dashboard/templates/dashboard/alias_contact_manager.html +++ b/app/dashboard/templates/dashboard/alias_contact_manager.html @@ -169,24 +169,26 @@ {% endfor %} -
-
- + {% if nb_contact > PAGE_LIMIT or page > 0 %} +
+
+ +
-
+ {% endif %} {% endblock %} diff --git a/app/dashboard/views/alias_contact_manager.py b/app/dashboard/views/alias_contact_manager.py index 1f4aeafe..5d6930e5 100644 --- a/app/dashboard/views/alias_contact_manager.py +++ b/app/dashboard/views/alias_contact_manager.py @@ -271,6 +271,7 @@ def alias_contact_manager(alias_id): contact_infos = get_contact_infos(alias, page, query=query) last_page = len(contact_infos) < PAGE_LIMIT + nb_contact = Contact.filter(Contact.alias_id == alias.id).count() # if highlighted contact isn't included, fetch it # make sure highlighted contact is at array start @@ -290,4 +291,5 @@ def alias_contact_manager(alias_id): page=page, last_page=last_page, query=query, + nb_contact=nb_contact, )