Skip to content

Commit

Permalink
[Structure] Afficher le nombre d'établissement dans la fiche (#941)
Browse files Browse the repository at this point in the history
* Siae detail: display etablissement count if multiple

* Add link with search by SIREN
  • Loading branch information
raphodn authored Oct 10, 2023
1 parent 0649653 commit b6b8223
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lemarche/templates/siaes/_card_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ <h1 class="h2 mb-2">
</div>
</div>
<div class="card-body" style="border-top:1px solid #e6e6eb">
{% include "siaes/_useful_infos_siae.html" with siae=siae %}
{% include "siaes/_useful_infos.html" with siae=siae %}
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load array_choices_display %}
{% load get_verbose_name array_choices_display %}

<div class="row">
<!-- First column -->
Expand All @@ -19,10 +19,17 @@
<strong>Chiffre d'affaires :</strong>
<span>{{ siae.ca_display }}</span>
</li>
<li class="mb-2">
{% if siae.etablissement_count > 1 %}
<li class="mb-2">
<i class="ri-building-4-line"></i>
<strong>Nombre d'établissements :</strong>
<a href="{% url 'siae:search_results' %}?q={{ siae.siren }}" target="_blank" title="Consulter la liste des {{ siae.etablissement_count }} établissements">{{ siae.etablissement_count }}</span>
</li>
{% endif %}
<li class="mb-2" title="{% get_verbose_name siae 'presta_type' %}">
{% if siae.presta_type %}
<i class="ri-briefcase-4-line"></i>
<strong>{% array_choices_display siae 'presta_type' %}</strong>
<i class="ri-briefcase-4-line"></i>
<strong>{% array_choices_display siae 'presta_type' %}</strong>
{% endif %}
</li>
<li class="mb-2">
Expand Down
2 changes: 1 addition & 1 deletion lemarche/www/siaes/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

class SiaeFilterForm(forms.Form):
q = forms.CharField(
label="Recherche via le numéro de SIRET ou le nom de votre structure",
label="Recherche via le numéro de SIRET, SIREN ou le nom de votre structure",
required=False,
widget=forms.TextInput(attrs={"placeholder": "Votre recherche…"}),
)
Expand Down

0 comments on commit b6b8223

Please sign in to comment.