Skip to content

Commit

Permalink
feat(Structures): SiaeActivity : afficher les activités dans la fiche (
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Jul 3, 2024
1 parent 30120b2 commit 0c02ab9
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lemarche/templates/dashboard/siae_edit_activities.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>Ajoutez vos secteurs d'activité et recevez des opportunités commerciales c
<div class="row mb-3 mb-lg-5">
{% for activity in siae.activities.all %}
<div class="col-12 col-lg-8">
{% include "dashboard/_siae_activity_card.html" with activity=activity %}
{% include "siaes/_siae_activity_card.html" with activity=activity %}
</div>
{% endfor %}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h3>{{ page_title }}</h3>
{% if activity %}
<div class="row mb-3 mb-lg-5">
<div class="col-12 col-lg-8">
{% include "dashboard/_siae_activity_card.html" with activity=activity hide_actions=True %}
{% include "siaes/_siae_activity_card.html" with activity=activity hide_actions=True %}
</div>
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
{% 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">
<div class="col-12 col-lg-8">
<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>
{% include "siaes/_siae_activity_content.html" with activity=activity with_collapse=with_collapse %}
</div>

{% if not hide_actions %}
Expand Down
28 changes: 28 additions & 0 deletions lemarche/templates/siaes/_siae_activity_content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% load siae_sectors_display %}

<p class="h4 lh-sm">
{% if with_collapse %}
<a href="#collapseSiaeActiviyContent{{ activity.id }}" class="text-decoration-none has-collapse-caret collapsed" data-toggle="collapse">
{{ activity.sector_group }}
</a>
{% else %}
{{ activity.sector_group }}
{% endif %}
</p>

<div id="collapseSiaeActiviyContent{{ activity.id }}" class="{% if with_collapse %}pb-3 collapse{% endif %}">
<ul style="padding-left:1.5rem">
{% 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>
</div>
19 changes: 13 additions & 6 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 with_collapse=True %}
{% 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 All @@ -122,7 +129,7 @@ <h3 class="h2 mb-1 mt-1">Références clients</h3>
</li>
{% endfor %}
</ul>
<div class="collapse" id="collapseMoreRefClients">
<div id="collapseMoreRefClients" class="collapse">
<ul class="list-unstyled row row-cols-3 align-items-center mb-0">
{% for image in siae.client_references.all|slice:"6:" %}
<li class="col">
Expand Down

0 comments on commit 0c02ab9

Please sign in to comment.