Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Structures): SiaeActivity : afficher les activités dans la fiche #1308

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading