-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1039: Added Maestro notification pdf template
- Loading branch information
Showing
2 changed files
with
150 additions
and
1 deletion.
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
148 changes: 148 additions & 0 deletions
148
...elvbetjening/src/templates/os2forms-selvbetjening-maestro-notification-pdf-html.html.twig
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,148 @@ | ||
{# | ||
Use this to style Maestro PDF notifications. | ||
Set it on '/admin/config/system/os2forms_forloeb' PDF template, | ||
i.e. 'modules/custom/os2forms_selvbetjening/src/templates/os2forms-selvbetjening-maestro-notification-pdf-html.html.twig'. | ||
This is a composition of | ||
os2forms_attachment, os2forms-attachment--webform-submission.html.twig, and | ||
os2forms_forloeb, os2forms-forloeb-notification-message-pdf-html.html.twig. | ||
/** | ||
* @file | ||
* Template for Maestro notification PDF. | ||
* | ||
* Available variables: | ||
* - message: The notification message | ||
* - subject: the notification subject | ||
* - content: the notification content. Must be rendered as `processed_text`, i.e.: | ||
* @code | ||
* {{ { | ||
* '#type': 'processed_text', | ||
* '#text': message.content.value, | ||
* '#format': message.content.format, | ||
* } }} | ||
* @endcode | ||
* - notification_type: The type of notification () | ||
* - task_url: URL of the task. | ||
* - action_label: Optional label for the task action. | ||
*/ | ||
#} | ||
<!doctype html> | ||
<html lang="da"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>{{ message.subject }}</title> | ||
<style> | ||
@page { | ||
margin: 180px 35px 150px 35px; | ||
} | ||
header { | ||
position: fixed; | ||
top: -150px; | ||
left: 25px; | ||
right: 0px; | ||
height: 50px; | ||
font-size: 12px; | ||
} | ||
footer { | ||
position: fixed; | ||
bottom: -50px; | ||
left: 25px; | ||
right: 0px; | ||
height: 50px; | ||
font-size: 12px; | ||
} | ||
.webform-entity-print-body { | ||
font-size: 14px; | ||
width: 65% !important; | ||
} | ||
.webform-element { | ||
padding: 5px 0; | ||
margin: 5px 0; | ||
font-size: 12px; | ||
} | ||
.webform-entity-print-colophon { | ||
font-size: 12px; | ||
margin-top: -11px; | ||
} | ||
thead { | ||
border-bottom: 1px solid black; | ||
} | ||
th { | ||
text-align: left; | ||
} | ||
details, .claro-details { | ||
border: none !important; | ||
} | ||
summary { | ||
font-size: 20px !important; | ||
} | ||
.webform-section-title { | ||
font-size: 14px !important; | ||
} | ||
.table { | ||
width: 100%; | ||
} | ||
legend, summary, .details-wrapper, fieldset { | ||
padding: 0; | ||
} | ||
fieldset { | ||
margin: 0; | ||
border: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<header> | ||
<div class="webform-entity-print-header"> | ||
<p> | ||
<img alt="Aarhus Kommune Logo" data-align="right" data-entity-type="" data-entity-uuid="" src="https://cdn.aarhus.dk/bundled/static/aak-logo.svg?hash=6780e75ca799a9b45bb0e51ff430010b" /> | ||
<br/> | ||
</p> | ||
</div> | ||
</header> | ||
|
||
<div class="page"> | ||
<div> | ||
<div class="webform-entity-print-colophon" style="float:right;width:27%;margin-left:20px;word-wrap:break-word;"> | ||
<p>[webform_submission:completed:custom:d. F Y]</p> | ||
<p><strong>Aarhus Kommune</strong><br /> | ||
Rådhuspladsen 2<br /> | ||
8000 Aarhus C</p> | ||
</div> | ||
<div class="webform-entity-print-body" style="width:70%;"> | ||
{# @see https://api.drupal.org/api/drupal/core%21modules%21filter%21filter.module/function/check_markup/9 #} | ||
<div class="notification-content"> | ||
{{ { | ||
'#type': 'processed_text', | ||
'#text': message.content.value, | ||
'#format': message.content.format, | ||
} }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
<style> | ||
fieldset legend { | ||
margin-left: -12px; | ||
} | ||
</style> | ||
</html> | ||
|