{% load combo %}

{% if json.data %}
{% with user=json.data %}

<div class="newline grid-1-1">
{% include "rsu/identite-mini.html" with user=user %}
<a class="mini-ts" href="{{ eservices_url }}backoffice/submission/declaration-de-responsabilite-sur-un-enfant-bo/?session_var_rsu_adult={{ request.GET.rsu_adult }}&session_var_rsu_child={{ user.id }}&cancelurl={{ portal_agent_url }}?{{ request.META.QUERY_STRING|urlencode:"" }}">Responsabilité sur cet enfant</a>

<a class="mini-ts" href="?{% if request.GET.rsu_adult %}rsu_adult={{ request.GET.rsu_adult }}&{% endif %}{% if request.GET.rsu_spoose %}rsu_spoose={{ request.GET.rsu_spoose }}{% endif %}">Autre recherche</a>
</div>

{% if user.parents %}
<div class="grid-1-1">
<h3>Parents</h3>
</div>
{% for user in user.parents|dictsort:"date_de_naissance" %}
<div class="grid-1-1">
{% include "rsu/identite-mini.html" with user=user %}
</div>
{% endfor %}
{% endif %}

<div class="grid-1-1">
<p><!-- un peu d'espace -->&nbsp;</p>
</div>

<script>
$(function() {
  $('div.searchcell.rsu-child').hide();
  $('aside#sidebar div.rsu-spoose').hide();
});
</script>

{% endwith %}
{% else %}

<p>
Pour ajouter un enfant à l’individu affiché ci-contre,
utiliser la recherche ci-dessus.
</p>

{% endif %}
