Skip to content

Commit

Permalink
Siae detail: basic display of activities
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jun 26, 2024
1 parent af22ef4 commit 0429ef0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lemarche/templates/dashboard/_siae_activity_card.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load static siae_sectors_display %}
{% load siae_sectors_display %}

<div class="bg-white d-block rounded-lg shadow-lg p-3 mb-3">
<div class="row">
Expand Down
18 changes: 18 additions & 0 deletions lemarche/templates/siaes/_siae_activity_content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% load siae_sectors_display %}

<p class="h4 lh-sm">{{ activity.sector_group }}</p>

<ul>
{% siae_sectors_display activity display_max=6 output_format='li' %}
</ul>

<p class="mb-0">
<i class="ri-briefcase-4-line mr-1"></i>
<span class="sr-only">Type(s) de prestation :</span>
<span>{{ activity.presta_type_display }}</span>
</p>
<p class="mb-0">
<i class="ri-map-2-line"></i>
<span class="sr-only">Intervient sur : {{ siae.geo_range_pretty_title }}</span>
<span>{{ siae.geo_range_pretty_display }}</span>
</p>
17 changes: 12 additions & 5 deletions lemarche/templates/siaes/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,18 @@ <h3 class="h2 mb-1 mt-1">Présentation du prestataire</h3>
</div>
<div class="il-r">
<h3 class="h2 mb-1 mt-1">Secteurs d'activité</h3>
<ul>
{% siae_sectors_display siae display_max=6 current_search_query=current_search_query output_format='li' %}
</ul>
{% if not siae.sector_count %}
<p>Non renseigné</p>
{% if user.is_authenticated and user.is_admin %}
{% for activity in siae.activities.all %}
{% include "siaes/_siae_activity_content.html" with activity=activity %}
{% endfor %}
{% else %}
{% if not siae.sector_count %}
<p>Non renseigné</p>
{% else %}
<ul>
{% siae_sectors_display siae display_max=6 current_search_query=current_search_query output_format='li' %}
</ul>
{% endif %}
{% endif %}
</div>
</div>
Expand Down

0 comments on commit 0429ef0

Please sign in to comment.