only show the navigation arrow when #contacts > PAGE_LIMIT
This commit is contained in:
parent
ff210394a0
commit
b0822519eb
|
@ -169,6 +169,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if nb_contact > PAGE_LIMIT or page > 0 %}
|
||||
<div class="row mt-3">
|
||||
<div class="col">
|
||||
<nav aria-label="Contact navigation">
|
||||
|
@ -187,6 +188,7 @@
|
|||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue