Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TVIST1-435: Added link to mail template user manual #214

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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