Skip to content

Commit

Permalink
TVIST1-435: Added link to mail template user manual
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed May 3, 2022
1 parent 951acac commit f3d4238
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,5 @@ AZURE_KEY_VAULT_DATAFORDELER_SECRET=''
AZURE_KEY_VAULT_DATAFORDELER_SECRET_VERSION=''

DATAFORDELER_CVR_LOOKUP_BASE_URL=''

MAIL_TEMPLATE_USER_MANUAL_URL='https://github.com/itk-dev/naevnssekretariatet/blob/user-manual/mail-templates/README.da.md'
4 changes: 4 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
'env(MAIL_TEMPLATE_USER_MANUAL_URL)': ''

locale: '%env(DEFAULT_LOCALE)%'
site_name: '%env(SITE_NAME)%'
site_url: '%env(SITE_URL)%'
document_upload_directory: '%kernel.project_dir%/upload/documents/'

mail_template_user_manual_url: '%env(MAIL_TEMPLATE_USER_MANUAL_URL)%'

services:
# default configuration for services in *this* file
_defaults:
Expand Down
15 changes: 11 additions & 4 deletions src/Controller/Admin/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,19 @@ public function configureMenuItems(): iterable
yield MenuItem::linkToCrud('Part Index', '', Party::class);
yield MenuItem::linkToCrud('Complaint category', '', ComplaintCategory::class);
yield MenuItem::linkToCrud('Document types', '', UploadedDocumentType::class);

$subItems = [
MenuItem::linkToCrud('Mail templates', '', MailTemplate::class),
MenuItem::linkToCrud('Macros', '', MailTemplateMacro::class),
];
if ($url = $this->getParameter('mail_template_user_manual_url')) {
$subItems[] = MenuItem::linkToUrl('User manual', '', $url);
}

yield MenuItem::subMenu('Mail templates', null)
->setSubItems([
MenuItem::linkToCrud('Mail templates', '', MailTemplate::class),
MenuItem::linkToCrud('Macros', '', MailTemplateMacro::class),
])
->setSubItems($subItems)
;

yield MenuItem::linkToCrud('Deleted cases', '', CaseEntity::class)
->setPermission('ROLE_ADMIN')
;
Expand Down

0 comments on commit f3d4238

Please sign in to comment.