-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚸(dashboard ) redesign consent pages and revamp error page design.
Introduced a new structure with clearer messaging about the error and possible user actions. Added markdown for potential enhancements like contact options, following design standards. Refactored the home page, the consent summary page and the consent manage with the `dsfr` style. Add alert message and cusomise it with the `dsfr` style. Added app.css stylesheet. Update dashboard CHANGELOG entries : rearranged the entries under the "Added" section for clarity. Moved static files from consent/static/consent/ to consent/static/apps/consent/. Updated the 403, 404 and 500 error page to enhance user experience by redesigning its layout and content presentation.
- Loading branch information
Showing
17 changed files
with
383 additions
and
179 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.consent-wrapper { | ||
position: relative; | ||
border: 1px solid grey; | ||
} | ||
|
||
.consent-wrapper__inner { | ||
padding: 0 1.5rem; | ||
} |
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,8 @@ | ||
/** | ||
* check/uncheck all checkbox in consent form | ||
*/ | ||
document.getElementById("toggle-all") | ||
.addEventListener("change", function() { | ||
const checkboxes = document.getElementsByName("status"); | ||
checkboxes.forEach(checkbox => checkbox.checked = this.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
{% extends "base.html" %} | ||
|
||
{% load static %} | ||
|
||
{% block dashboard_extra_css %} | ||
<link rel="stylesheet" href="{% static "apps/consent/css/app.css" %}"> | ||
{% endblock dashboard_extra_css %} | ||
|
||
{% block dashboard_content %} | ||
{% endblock dashboard_content %} |
30 changes: 30 additions & 0 deletions
30
src/dashboard/apps/consent/templates/consent/includes/_consent_summary_awaiting.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,30 @@ | ||
{% load i18n %} | ||
|
||
{% if entities %} | ||
<strong>{% trans "Validated consent for all entities" %}</strong> | ||
<ul class="fr-links-group fr-mb-2w"> | ||
<li> | ||
<a class="fr-link fr-icon-arrow-right-line fr-link--icon-right" | ||
href="{% url "consent:manage" %}" | ||
data-fr-js-link-actionee="true"> | ||
{% trans "Validate content for all entities" %} | ||
</a> | ||
</li> | ||
</ul> | ||
|
||
<strong class="fr-mt-2w">{% trans "Validated consent entity by entity" %}</strong> | ||
<ul class="fr-links-group"> | ||
{% for entity in entities %} | ||
<li> | ||
<a class="fr-link fr-icon-arrow-right-line fr-link--icon-right" | ||
href="{% url "consent:manage" entity.slug %}" | ||
data-fr-js-link-actionee="true"> | ||
{{ entity.name }} : | ||
{% blocktranslate with consent_total=entity.get_consents.count entity_count=entity.count_awaiting_consents pluralize=entity.count_awaiting_consents|pluralize %} | ||
{{ entity_count }}/{{ consent_total }} consent{{ pluralize }} to validate | ||
{% endblocktranslate %} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} |
26 changes: 26 additions & 0 deletions
26
src/dashboard/apps/consent/templates/consent/includes/_consent_summary_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,26 @@ | ||
{% load i18n %} | ||
|
||
<div class="fr-card"> | ||
<div class="fr-card__body"> | ||
<div class="fr-card__content"> | ||
<h3 class="fr-card__title"> | ||
{{ resume_title }} | ||
</h3> | ||
{% if resume_description %} | ||
<p class="fr-card__desc"> | ||
{{ resume_description }} | ||
</p> | ||
{% endif %} | ||
</div> | ||
|
||
<div class="fr-card__footer"> | ||
{% if resume_validated %} | ||
{% include "consent/includes/_consent_summary_validated.html" %} | ||
{% endif %} | ||
{% if resume_awaiting %} | ||
{% include "consent/includes/_consent_summary_awaiting.html" %} | ||
{% endif %} | ||
|
||
</div> | ||
</div> | ||
</div> |
14 changes: 14 additions & 0 deletions
14
src/dashboard/apps/consent/templates/consent/includes/_consent_summary_validated.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,14 @@ | ||
{% load i18n %} | ||
|
||
{% if entities %} | ||
<ul class="fr-links-group"> | ||
{% for entity in entities %} | ||
<li> | ||
{{ entity.name }}: | ||
{% blocktranslate with consent_total=entity.get_consents.count consent_count=entity.count_validated_consents pluralize=entity.count_validated_consents|pluralize %} | ||
{{ consent_count }}/{{ consent_total }} consent{{ pluralize }} validated | ||
{% endblocktranslate %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} |
28 changes: 0 additions & 28 deletions
28
src/dashboard/apps/consent/templates/consent/includes/_resume_awaiting_consents.html
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/dashboard/apps/consent/templates/consent/includes/_resume_validated_consents.html
This file was deleted.
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
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
48 changes: 8 additions & 40 deletions
48
src/dashboard/apps/home/templates/home/cards/consentement.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 |
---|---|---|
@@ -1,43 +1,11 @@ | ||
{% load i18n %} | ||
{% load i18n dsfr_tags %} | ||
|
||
{# todo: add real content to the card #} | ||
{% comment %} | ||
todo: add real content and image to the card | ||
{% endcomment %} | ||
|
||
<div class="fr-grid-row fr-grid-row--gutters"> | ||
<div class="fr-col-12 fr-col-md-6"> | ||
<div class="fr-card"> | ||
<div class="fr-card__body"> | ||
{% translate "Consent Management" as consent_card_title %} | ||
{% translate "Lorem [...] elit ut." as consent_card_description %} | ||
{% url 'consent:index' as consent_index_url %} | ||
|
||
<div class="fr-card__content"> | ||
<p class="fr-card__title"> | ||
<a href="{% url 'consent:index' %}" rel="noopener noreferrer" title=""> | ||
{% trans "Consent Management" %} | ||
</a> | ||
</p> | ||
<p class="fr-card__desc"> | ||
Texte de la carte. | ||
… | ||
</p> | ||
</div> | ||
<!-- /.fr-card__content --> | ||
|
||
<div class="fr-card__footer"> | ||
<ul> | ||
<li> | ||
<a class="fr-link fr-icon-arrow-right-line fr-link--icon-right" href="#"> | ||
Lien interne | ||
</a> | ||
</li> | ||
<li> | ||
<a class="fr-link fr-icon-arrow-right-line fr-link--icon-right" href="#"> | ||
Lien interne | ||
</a> | ||
</li> | ||
</ul> | ||
|
||
</div> | ||
<!-- /.fr-card__footer --> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% dsfr_card title=consent_card_title link=consent_index_url description=consent_card_description extra_class="fr-card--horizontal" image_url="https://www.systeme-de-design.gouv.fr/img/placeholder.16x9.png" %} |
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
Oops, something went wrong.