From 2b833fa72a2f3502864935fb13fdf3ffe56f0913 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 9 Oct 2023 18:38:28 +0200 Subject: [PATCH] fix accordion wallet --- idhub/admin/views.py | 3 +++ idhub/mixins.py | 4 +++- idhub/templates/idhub/base_admin.html | 32 +++++++++++++-------------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/idhub/admin/views.py b/idhub/admin/views.py index 1ed0502..3c892ef 100644 --- a/idhub/admin/views.py +++ b/idhub/admin/views.py @@ -84,18 +84,21 @@ class AdminWalletIdentitiesView(Credentials): template_name = "idhub/admin_wallet_identities.html" subtitle = _('Organization Identities (DID)') icon = 'bi bi-patch-check-fill' + wallet = True class AdminWalletCredentialsView(Credentials): template_name = "idhub/admin_wallet_credentials.html" subtitle = _('Credentials') icon = 'bi bi-patch-check-fill' + wallet = True class AdminWalletConfigIssuesView(Credentials): template_name = "idhub/admin_wallet_issues.html" subtitle = _('Configure Issues') icon = 'bi bi-patch-check-fill' + wallet = True class AdminSchemesView(Schemes): diff --git a/idhub/mixins.py b/idhub/mixins.py index 2266a19..57eb933 100644 --- a/idhub/mixins.py +++ b/idhub/mixins.py @@ -8,6 +8,7 @@ from django.shortcuts import redirect class UserView(LoginRequiredMixin, TemplateView): login_url = "/login/" + wallet = False def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) @@ -17,7 +18,8 @@ class UserView(LoginRequiredMixin, TemplateView): 'icon': self.icon, 'section': self.section, 'path': resolve(self.request.path).url_name, - 'user': self.request.user + 'user': self.request.user, + 'wallet': self.wallet, }) return context diff --git a/idhub/templates/idhub/base_admin.html b/idhub/templates/idhub/base_admin.html index b3578ff..ecb9fb6 100644 --- a/idhub/templates/idhub/base_admin.html +++ b/idhub/templates/idhub/base_admin.html @@ -77,12 +77,12 @@