Manage empty results

This commit is contained in:
xdrm-brackets 2017-01-12 12:19:20 +01:00
parent 898c59fdbd
commit 08d75bd423
5 changed files with 44 additions and 0 deletions

View File

@ -1,7 +1,10 @@
<input type='text' class='searchbar' placeholder='Recherche'>
{% set noresult = true %}
{% for user_cluster in f_clusters(0) %}
{% set noresult = false %}
{% set id_user_cluster = 'u' ~ user_cluster.id_user_cluster %}
{% set memlen = f_members(user_cluster.id_user_cluster,0) | length %}
@ -37,6 +40,8 @@
{% for machine_cluster in f_clusters(1) %}
{% set noresult = false %}
{% set id_machine_cluster = 'm' ~ machine_cluster.id_machine_cluster %}
{% set memlen = f_members(machine_cluster.id_machine_cluster,1) | length %}
@ -66,4 +71,15 @@
</span>
</article>
{% endfor %}
{# if no result #}
{% if noresult %}
<article class='inline-box'>
<span>Aucun groupe trouvé</span>
</article>
{% endif %}

View File

@ -28,4 +28,12 @@
</span>
</article>
{# if no result #}
{% else %}
<article class='inline-box'>
<span>Aucun groupe trouvé.</span>
</article>
{% endfor %}

View File

@ -20,4 +20,11 @@
</span>
</article>
{# if no result #}
{% else %}
<article class='inline-box'>
<span>Aucune machine trouvée</span>
</article>
{% endfor %}

View File

@ -33,4 +33,10 @@
</article>
{# if no result #}
{% else %}
<article class='inline-box'>
<span>Aucun groupe trouvé.</span>
</article>
{% endfor %}

View File

@ -39,4 +39,11 @@
</article>
{# if no result #}
{% else %}
<article class='inline-box'>
<span>Aucun utilisateur trouvé</span>
</article>
{% endfor %}