-
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) add dashboard consent base app
- introduces the new 'consent' Django app. - added app structure - added templates views - added templates - added django-extension - updated translations - updated settings and urls according this changes
- Loading branch information
Showing
18 changed files
with
151 additions
and
20 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Dashboard consent app.""" |
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,13 @@ | ||
"""Dashboard consent app base config.""" | ||
|
||
from django.apps import AppConfig | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
class ConsentConfig(AppConfig): | ||
"""Consent app config.""" | ||
|
||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "apps.consent" | ||
label = "qcd_consent" | ||
verbose_name = _("Consent") |
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 @@ | ||
"""Dashboard consent app migrations.""" |
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,4 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block content %} | ||
{% endblock content %} |
9 changes: 9 additions & 0 deletions
9
src/dashboard/apps/consent/templates/consent/consent-management.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,9 @@ | ||
{% extends "home/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block content %} | ||
<h2> | ||
{% trans "Consents management" %} | ||
</h2> | ||
{% endblock content %} |
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,15 @@ | ||
{% extends "home/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block content %} | ||
<h2> | ||
{% trans "Consents summary" %} | ||
</h2> | ||
|
||
<p> | ||
<a class="fr-link fr-icon-arrow-right-line fr-link--icon-right" href="{% url "consent:manage" %}"> | ||
{% trans "Manage consent" %} | ||
</a> | ||
</p> | ||
{% endblock content %} |
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,12 @@ | ||
"""Dashboard consent app urls.""" | ||
|
||
from django.urls import path | ||
|
||
from .views import IndexView, ManageView | ||
|
||
app_name = "consent" | ||
|
||
urlpatterns = [ | ||
path("", IndexView.as_view(), name="index"), | ||
path("manage/", ManageView.as_view(), name="manage"), | ||
] |
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,36 @@ | ||
"""Dashboard consent app views.""" | ||
|
||
from django.urls import reverse | ||
from django.utils.translation import gettext_lazy as _ | ||
from django.views.generic import TemplateView | ||
|
||
|
||
class IndexView(TemplateView): | ||
"""Index view of the consent app.""" | ||
|
||
template_name = "consent/index.html" | ||
|
||
def get_context_data(self, **kwargs): | ||
"""Add custom context to the view.""" | ||
context = super().get_context_data(**kwargs) | ||
context["breadcrumb_data"] = { | ||
"current": _("Consent"), | ||
} | ||
return context | ||
|
||
|
||
class ManageView(TemplateView): | ||
"""Consents management view.""" | ||
|
||
template_name = "consent/consent-management.html" | ||
|
||
def get_context_data(self, **kwargs): | ||
"""Add custom context to the view.""" | ||
context = super().get_context_data(**kwargs) | ||
context["breadcrumb_data"] = { | ||
"links": [ | ||
{"url": reverse("consent:index"), "title": _("Consent")}, | ||
], | ||
"current": _("Manage Consents"), | ||
} | ||
return context |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
"""Dashboard home app views.""" | ||
|
||
from django.contrib.auth.mixins import LoginRequiredMixin | ||
from django.views.generic import TemplateView | ||
|
||
|
||
class IndexView(LoginRequiredMixin, TemplateView): | ||
class IndexView(TemplateView): | ||
"""Index view of the homepage.""" | ||
|
||
template_name = "home/index.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
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
Binary file not shown.
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 |
---|---|---|
|
@@ -8,8 +8,8 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: \n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-11-18 16:10+0100\n" | ||
"PO-Revision-Date: 2024-11-18 16:11+0100\n" | ||
"POT-Creation-Date: 2024-11-19 11:20+0100\n" | ||
"PO-Revision-Date: 2024-11-19 11:22+0100\n" | ||
"Last-Translator: ssorin <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: fr\n" | ||
|
@@ -19,23 +19,43 @@ msgstr "" | |
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
"X-Generator: Poedit 3.5\n" | ||
|
||
#: apps/auth/apps.py:12 | ||
#: apps/auth/apps.py:13 | ||
msgid "Authentication" | ||
msgstr "Authentification" | ||
|
||
#: apps/home/templates/home/cards/consentement.html:12 | ||
#: apps/consent/templates/consent/consent-management.html:7 | ||
msgid "Consents management" | ||
msgstr "Gestion du consentement" | ||
|
||
#: apps/consent/templates/consent/index.html:7 | ||
msgid "Consents summary" | ||
msgstr "Résumé des consentements" | ||
|
||
#: apps/consent/templates/consent/index.html:12 | ||
msgid "Manage consent" | ||
msgstr "Gérer le consentement" | ||
|
||
#: apps/consent/views.py:17 apps/consent/views.py:32 | ||
msgid "Consent" | ||
msgstr "Consentement" | ||
|
||
#: apps/consent/views.py:34 | ||
msgid "Manage Consents" | ||
msgstr "Gérer les consentements" | ||
|
||
#: apps/home/templates/home/cards/consentement.html:13 | ||
msgid "Consent Management" | ||
msgstr "Gestion du consentement" | ||
|
||
#: apps/home/templates/home/index.html:7 | ||
msgid "QualiCharge dashboard" | ||
msgstr "Tableau de bord QualiCharge" | ||
|
||
#: dashboard/settings.py:126 | ||
#: dashboard/settings.py:129 | ||
msgid "French" | ||
msgstr "Français" | ||
|
||
#: dashboard/settings.py:127 | ||
#: dashboard/settings.py:130 | ||
msgid "English" | ||
msgstr "Anglais" | ||
|
||
|
@@ -133,8 +153,8 @@ msgid "Identifier" | |
msgstr "Identifiant" | ||
|
||
#: templates/registration/login.html:51 | ||
msgid "Expected format: [email protected]" | ||
msgstr "Format attendu : [email protected]" | ||
msgid "Expected format: myusername" | ||
msgstr "Format attendu : nomdutilisateur" | ||
|
||
#: templates/registration/login.html:69 | ||
msgid "Password" | ||
|
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