-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
453 additions
and
130 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
aidants_connect_common/static/css/generic-habilitation-request-profile-card.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
details.request-card-details { | ||
height: 100%; | ||
position: relative; | ||
} | ||
|
||
details.request-card-details * { | ||
box-sizing: border-box; | ||
} | ||
|
||
details.request-card-details summary { | ||
flex-wrap: nowrap; | ||
height: 100%; | ||
min-height: 4rem; | ||
position: relative; | ||
z-index: 10; | ||
} | ||
|
||
details.request-card-details[open] .details-summary-header { | ||
display: none; | ||
} | ||
|
||
details.request-card-details[open] .fr-icon-arrow-up-s-line::before { | ||
-webkit-mask-image: url(/static/dsfr/dist/icons/system/arrow-down-s-line.svg); | ||
mask-image: url(/static/dsfr/dist/icons/system/arrow-down-s-line.svg); | ||
} | ||
|
||
details.request-card-details .details-content { | ||
padding: inherit; | ||
position: absolute; | ||
width: 100%; | ||
z-index: 0; | ||
} | ||
|
||
details.request-card-details .details-content .fr-btns-group .fr-btn { | ||
margin-bottom: 0; | ||
margin-top: 0; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
aidants_connect_common/templates/habilitation/generic-habilitation-request-profile-card.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{% load static ac_common ac_extras %} | ||
|
||
{# Prevent messing with the absolute positionning of the design #} | ||
{# See https://stackoverflow.com/questions/17115344/absolute-positioning-ignoring-padding-of-parent #} | ||
<div class="fr-col-12 fr-col-md-6 request-card" {% block container_args %}{% endblock %}> | ||
<details {% if habilitation_request.details_id %}id="{{ habilitation_request.details_id }}" {% endif %}class="request-card-details"> | ||
{% block details_introduction %}{% endblock %} | ||
<summary | ||
class="fr-grid-row fr-grid-row--middle fr-grid-row--gap-2v fr-tile--shadow fr-py-2v fr-px-4v" | ||
title="{{ habilitation_request.user.full_name }} {{ habilitation_request.user.email }}" | ||
> | ||
<img src="{% static "images/avatar.svg" %}" width="36" height="36" alt="" /> | ||
<span class="fr-grid-row--center fr-text--overflow-hidden spacer"> | ||
<p class="fr-m-0 fr-text--bold">{{ habilitation_request.user.full_name }}</p> | ||
{% if habilitation_request.user.email %} | ||
<p class="details-summary-header fr-m-0 fr-text--overflow-hidden">{{ habilitation_request.user.email }}</p> | ||
{% endif %} | ||
</span> | ||
<span | ||
type="button" | ||
class="fr-btn fr-btn--tertiary fr-btn--sm fr-icon-arrow-up-s-line" | ||
aria-hidden="true" | ||
></span> | ||
</summary> | ||
<div class="details-content fr-p-4v fr-tile--shadow"> | ||
<section class="user-informations"> | ||
{% for field in habilitation_request.user.details_fields %} | ||
<section class="fr-my-4v"> | ||
<p class="fr-text--sm fr-text-mention--grey">{{ field.label }}</p> | ||
{{ field.value }} | ||
</section> | ||
{% endfor %} | ||
</section> | ||
<ul class="fr-btns-group fr-btns-group--sm fr-btns-group--right fr-btns-group--inline"> | ||
<li> | ||
{% block action_buttons %} | ||
<a | ||
href="{{ habilitation_request.user.edit_href }}" | ||
{% if habilitation_request.details_id %}id="edit-button-{{ habilitation_request.details_id }}"{% endif %} | ||
class="fr-btn fr-btn--tertiary fr-btn--icon fr-icon-edit-fill" | ||
> | ||
Éditer | ||
</a> | ||
{% endblock %} | ||
</li> | ||
</ul> | ||
</div> | ||
</details> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
aidants_connect_habilitation/migrations/0032_organisationrequest_not_free_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 4.2.15 on 2024-09-11 09:45 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
def migrate_not_free_field(apps, _): | ||
OrganisationRequest = apps.get_model( | ||
"aidants_connect_habilitation", "OrganisationRequest" | ||
) | ||
|
||
OrganisationRequest.objects.update(not_free=True) | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("aidants_connect_habilitation", "0031_organisationrequest_legal_category"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="organisationrequest", | ||
name="not_free", | ||
field=models.BooleanField(default=False, verbose_name="La formation est payante"), | ||
), | ||
migrations.RunPython(migrate_not_free_field, migrations.RunPython.noop), | ||
migrations.AddConstraint( | ||
model_name="organisationrequest", | ||
constraint=models.CheckConstraint(check=models.Q(("status", "NEW"), models.Q(models.Q(("status", "NEW"), _negated=True), ("not_free", True)), _connector="OR"), name="not_free_checked"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
74 changes: 74 additions & 0 deletions
74
aidants_connect_habilitation/templates/_recap_general_info.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<h2>Information générales</h2> | ||
<div class="fr-grid-row fr-grid-row--gutters fr-mb-4v"> | ||
<div class="fr-col-12 fr-col-md-4"> | ||
<h3 class="fr-h5">Personne effectuant la demande</h3> | ||
</div> | ||
<div class="fr-col-12 fr-col-md-8"> | ||
<h3 class="fr-h5">Structure</h3> | ||
</div> | ||
<div class="fr-col-12 fr-col-md-4"> | ||
<div class="fr-bordered fr-p-4w flex flex-between flex-column fr-height-100 "> | ||
<div> | ||
<p> | ||
<strong>{{ issuer.get_full_name }}</strong><br/> | ||
<span class="fr-text-mention--grey fr-text--sm">{{ issuer.profession }}</span> | ||
</p> | ||
<p class="fr-text--sm"> | ||
{{ issuer.email }}<br>{{ issuer.phone }} | ||
</p> | ||
</div> | ||
{% if show_edit_buttons %} | ||
<div class="fr-mt-3w flex flex-right fr-link"> | ||
<a | ||
class="fr-btn fr-btn--tertiary fr-btn--icon fr-icon-pencil-fill" | ||
href="{% url 'habilitation_modify_issuer' issuer_id=issuer.issuer_id %}" | ||
> | ||
Éditer | ||
</a> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
<div class="fr-col-12 fr-col-md-8"> | ||
<div class="fr-bordered fr-p-4w"> | ||
<div class="fr-grid-row fr-grid-row--gutters fr-text--sm"> | ||
<div class="fr-col-12 fr-col-md-6"> | ||
<div class="fr-grid-row"> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text-mention--grey">Type de Structure</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text--md"><strong>{{ organisation.type }}</strong></div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text-mention--grey">Nom</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text--md"><strong>{{ organisation.name }}</strong></div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text-mention--grey">Adresse postale</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w"> | ||
{{ organisation.address|linebreaksbr }}<br/> | ||
{{ organisation.zipcode }} | ||
{{ organisation.city }} | ||
</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text-mention--grey">SIRET</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w">{{ organisation.siret }}</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text-mention--grey">Site web</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w">{{ organisation.web_site}}</div> | ||
</div> | ||
</div> | ||
<div class="fr-col-12 fr-col-md-6"> | ||
<div class="fr-grid-row"> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text-mention--grey">Structure privée</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w">{{ organisation.is_private_org|yesno:"Oui,Non" }}</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w fr-text-mention--grey">Label France Services</div> | ||
<div class="fr-col-12 fr-col-md-6 fr-mb-2w">{{ organisation.france_services_label|yesno:"Oui,Non" }}</div> | ||
</div> | ||
<div class="fr-text-mention--grey">Missions</div> | ||
<div>{{ organisation.mission_description|linebreaksbr }}</div> | ||
</div> | ||
</div> | ||
<div class="fr-mt-3w flex flex-right fr-link"> | ||
<a | ||
class="fr-btn fr-btn--tertiary fr-btn--icon fr-icon-pencil-fill" | ||
href="{% url 'habilitation_modify_organisation' issuer_id=issuer.issuer_id uuid=organisation.uuid %}" | ||
> | ||
Éditer | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.