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 1 commit
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
Next Next commit
Siae detail: basic display of activities
  • Loading branch information
raphodn committed Jul 3, 2024
commit 2eb23f3c172611876961f6959e33a6022961cb33
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