mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
only show the navigation arrow when #contacts > PAGE_LIMIT
This commit is contained in:
parent
ff210394a0
commit
b0822519eb
@ -169,6 +169,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if nb_contact > PAGE_LIMIT or page > 0 %}
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<nav aria-label="Contact navigation">
|
<nav aria-label="Contact navigation">
|
||||||
@ -187,6 +188,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -271,6 +271,7 @@ def alias_contact_manager(alias_id):
|
|||||||
|
|
||||||
contact_infos = get_contact_infos(alias, page, query=query)
|
contact_infos = get_contact_infos(alias, page, query=query)
|
||||||
last_page = len(contact_infos) < PAGE_LIMIT
|
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
|
# if highlighted contact isn't included, fetch it
|
||||||
# make sure highlighted contact is at array start
|
# make sure highlighted contact is at array start
|
||||||
@ -290,4 +291,5 @@ def alias_contact_manager(alias_id):
|
|||||||
page=page,
|
page=page,
|
||||||
last_page=last_page,
|
last_page=last_page,
|
||||||
query=query,
|
query=query,
|
||||||
|
nb_contact=nb_contact,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user