Skip to content

Commit 12f425c

Browse files
committed
refactor: kulturkortet views
1 parent 82974a8 commit 12f425c

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

library/Kulturkortet/QRCodeViewer/KulturkortetQRCodeViewerAuthViewFactory.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,22 @@ public function whenAuthenticated(MunicipioAuthenticatedUserInterface $user, Mun
3636
if (!$ticket) {
3737
return $this->renderWithModel('kulturkortet-qr-simple', [
3838
'lang' => [
39-
'heading' => $this->wpService->__('You do not seem to have a valid kulturkort', 'municipio'),
39+
'heading' => $this->wpService->__('Your Kulturkort', 'municipio'),
4040
'content' => '',
4141
'actionLabel' => $this->wpService->__('Log out', 'municipio'),
4242
],
4343
'url' => $navigation->getModifiedHomeUrl(addQueryArgs: ['action' => 'logout']),
4444
'name' => $user->getName(),
45+
'notice' => [
46+
'type' => 'info',
47+
'message' =>[
48+
'text' => $this->wpService->__('You do not have a valid Kulturkort.', 'municipio')
49+
],
50+
'icon' => [
51+
'name' => 'info',
52+
'size' => 'md'
53+
]
54+
]
4555
]);
4656
}
4757

library/Kulturkortet/QRCodeViewer/KulturkortetQRCodeViewerFeature.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ public function registerBlock(): void
6464
'type' => 'string',
6565
'default' => '',
6666
],
67+
'renewLink' => [
68+
'label' => $this->wpService->__('Link to renew/buy page', 'municipio'),
69+
'type' => 'string',
70+
'default' => '',
71+
]
6772
],
6873
],
6974
);

library/Kulturkortet/QRCodeViewer/views/kulturkortet-qr-simple.blade.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
{{ $lang['heading'] }}
77
@endtypography
88

9+
@if(!empty($notice))
10+
@notice($notice)
11+
@endnotice
12+
@endif
13+
914
@typography([
1015
'element' => 'p',
1116
])

0 commit comments

Comments
 (0)