diff options
Diffstat (limited to 'templates/mail')
| -rw-r--r-- | templates/mail/html.php | 159 | ||||
| -rw-r--r-- | templates/mail/notification_html.php | 172 | ||||
| -rw-r--r-- | templates/mail/notification_text.php | 2 |
3 files changed, 253 insertions, 80 deletions
diff --git a/templates/mail/html.php b/templates/mail/html.php index e737965..1987333 100644 --- a/templates/mail/html.php +++ b/templates/mail/html.php @@ -1,38 +1,129 @@ -<? +<?php # Lifter010: TODO +/** + * @var string $snd_fullname + * @var string $rec_fullname + * @var string $rec_username + * @var string $message + * @var array $attachments + */ ?> <html> -<head> - <?= Assets::stylesheet('studip-base.css') ?> -</head> -<body> - <div style="background-color: white; margin: auto; width: 700px; padding: 4px;"> - <?= Assets::img("locale/$lang/LC_PICTURES/mail_header.png") ?> - <p> - <?= formatReady($message, true, true) ?> - </p> - <? if (isset($attachments) && count($attachments)) : ?> - <hr> - <span class="minor"> - <?=_("Dateianhänge:")?> - <ul> - <? foreach($attachments as $attachment) : ?> - <li> - <a href="<?= $attachment->getDownloadURL() ?>"><?= htmlReady($attachment->name . ' (' . relsize($attachment->file->size, false) . ')') ?></a> - </li> - <? endforeach;?> - </ul> - </span> - <? endif;?> - <hr> - <span class="minor"> - <? if ($snd_fullname) : ?> - <?= sprintf(_('Diese E-Mail ist eine Kopie einer systeminternen Nachricht, die in Stud.IP von %s (<a href="%s">%s</a>) an %s (<a href="%s">%s</a>) versendet wurde.'), htmlReady($snd_fullname), htmlReady($snd_email),htmlReady($snd_email), htmlReady($rec_fullname), htmlReady($rec_email),htmlReady($rec_email)) ?> - <? else : ?> - <?= sprintf(_("Diese E-Mail ist eine Kopie einer systeminternen Nachricht, die in Stud.IP an %s versendet wurde."), htmlReady($rec_fullname)) ?> - <? endif ?> - <br><?= sprintf(_("Sie erreichen Stud.IP unter %s"), "<a href=\"" . $GLOBALS['ABSOLUTE_URI_STUDIP'] . "\">" . $GLOBALS['ABSOLUTE_URI_STUDIP'] . "</a>") ?> - </span> - </div> -</body> + <head> + <style> + html { + background-color: #e7ebf1; + font-family: 'Lato', Helvetica, Arial, sans-serif; + height: 100%; + width: 100%; + } + + a, a:link, a:visited { + color: #28497c; + text-decoration: none; + } + a[href] { + transition: color .3s; + } + a[disabled] { + pointer-events: none; + } + + a:hover, a:active { + color: #d60000; + text-decoration: none; + } + + .studip-mail { + background-color: #ffffff; + border: 1px solid #d0d7e3; + margin: 25px auto; + padding: 10px 25px 25px 25px; + width: 700px; + } + + .studip-mail header { + border-bottom: 1px solid #d0d7e3; + display: block; + text-align: center; + padding-bottom: 15px; + } + + .studip-mail header .studip-mail-header-logo { + margin-left: auto; + margin-right: auto; + width: 100%; + } + + .studip-mail header .studip-mail-sndrec { + margin-left: auto; + margin-right: auto; + margin-top: 0; + width: 100%; + } + + .studip-mail .studip-mail-message { + line-height: 1.33; + padding: 15px 25px; + } + + .studip-mail footer { + border-top: 1px solid #d0d7e3; + text-align: center; + margin-left: auto; + margin-right: auto; + padding-top: 15px; + width: 100%; + } + </style> + </head> + <body> + <article class="studip-mail"> + <header> + <div class="studip-mail-header-logo" > + <img alt="" width="130" height="92" src="cid:studiplogo"> + </div> + <p class="studip-mail-sndrec"> + <?php if ($snd_fullname) : ?> + <?= sprintf(_('%1$s hat Ihnen eine Nachricht in Stud.IP geschickt.'), + htmlReady($snd_fullname), htmlReady($rec_fullname), htmlReady($rec_username)) ?> + <?php else : ?> + <?= sprintf( + _('Stud.IP hat eine automatische Systemnachricht für Sie.'), + htmlReady($rec_fullname), + htmlReady($rec_username) + ) ?> + <?php endif ?> + </p> + </header> + <section class="studip-mail-message"> + <p> + <?= formatReady($message, true, true) ?> + </p> + <?php if (isset($attachments) && count($attachments)) : ?> + <div class="studip-mail-attachments"> + <?= _('Dateianhänge:') ?> + <ul> + <?php foreach($attachments as $attachment) : ?> + <li> + <a href="<?= $attachment->getDownloadURL() ?>"><?= htmlReady($attachment->name . + ' (' . relsize($attachment->file->size, false) . ')') ?></a> + </li> + <?php endforeach ?> + </ul> + </div> + <?php endif ?> + </section> + <footer> + <?= sprintf( + _('Diese E-Mail ist eine Kopie einer systeminternen Nachricht, die in Stud.IP an %1$s (%2$s) versendet wurde.'), + htmlReady($rec_fullname), + htmlReady($rec_username) + ) + ?> + <br><?= sprintf(_('Sie erreichen Stud.IP unter %s'), + '<a href="' . $GLOBALS['ABSOLUTE_URI_STUDIP'] . '">' . $GLOBALS['ABSOLUTE_URI_STUDIP'] . '</a>') ?> + </footer> + </article> + </body> </html> diff --git a/templates/mail/notification_html.php b/templates/mail/notification_html.php index 5060fb7..93bc1a8 100644 --- a/templates/mail/notification_html.php +++ b/templates/mail/notification_html.php @@ -1,50 +1,132 @@ <? # Lifter010: TODO +/** + * @var string $rec_fullname + * @var string $rec_username + * @var array $news + * @var string $sso + */ ?> <html> -<head> - <?= Assets::stylesheet('studip-base.css') ?> -</head> -<body> - <div style="background-color: white; margin: auto; max-width: 700px; padding: 4px;"> - <?= Assets::img("locale/$lang/LC_PICTURES/mail_header_notification.png") ?> - <p> - <?= _("Sie erhalten hiermit in regelmäßigen Abständen Informationen über Neuigkeiten und Änderungen in belegten Veranstaltungen.") ?> - <br><br> - <?= _("Über welche Inhalte und in welchem Format Sie informiert werden wollen, können Sie hier einstellen:") ?> - <br> - <a href="<?= URLHelper::getLink('dispatch.php/settings/notification', ['again' => 'yes', 'sso' => $sso]) ?>"> - <?= URLHelper::getLink('dispatch.php/settings/notification', ['again' => 'yes', 'sso' => $sso]) ?> - </a> - </p> - - <table class="default"> - <? foreach ($news as $sem_titel => $data) : ?> - <tr class="table_header_bold"> - <td colspan="2" style="font-weight: bold;"> - <a href="<?= URLHelper::getLink('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['range_id']]) ?>"> - <?= htmlReady($sem_titel) ?> - <?= (($semester = get_semester($data[0]['range_id'])) ? ' ('.$semester.')' : '') ?> - </a> - </td> - </tr> - - <? foreach ($data as $module) : ?> - <tr class="<?= TextHelper::cycle('hover_odd', 'hover_even') ?>"> - <td> - <a href="<?= URLHelper::getLink($module['url'], ['sso' => $sso]) ?>"><?= htmlReady($module['text']) ?></a> - </td> - <td> - <a href="<?= URLHelper::getLink($module['url'], ['sso' => $sso]) ?>"><?= $module['icon']->asImg(['title' => $module['text']]) ?></a> - </td> - </tr> - <? endforeach ?> - <? endforeach ?> - </table> - <hr> - <span class="minor"> - <?= _("Diese Nachricht wurde automatisch vom Stud.IP-System generiert. Sie können darauf nicht antworten.") ?> - </span> - </div> -</body> + <head> + <style> + html { + background-color: #e7ebf1; + font-family: 'Lato', Helvetica, Arial, sans-serif; + height: 100%; + width: 100%; + } + + a, a:link, a:visited { + color: #28497c; + text-decoration: none; + } + a[href] { + transition: color .3s; + } + a[disabled] { + pointer-events: none; + } + + a:hover, a:active { + color: #d60000; + text-decoration: none; + } + + .studip-mail { + background-color: #ffffff; + border: 1px solid #d0d7e3; + margin: 25px auto; + padding: 10px 25px 25px 25px; + width: 700px; + } + + .studip-mail header { + border-bottom: 1px solid #d0d7e3; + display: block; + text-align: center; + padding-bottom: 15px; + } + + .studip-mail header .studip-mail-header-logo { + margin-left: auto; + margin-right: auto; + width: 100%; + } + + .studip-mail header .studip-mail-sndrec { + margin-left: auto; + margin-right: auto; + margin-top: 0; + width: 100%; + } + + .studip-mail .studip-mail-message { + line-height: 1.33; + padding: 15px 25px; + } + + .studip-mail footer { + border-top: 1px solid #d0d7e3; + text-align: center; + margin-left: auto; + margin-right: auto; + padding-top: 15px; + width: 100%; + } + </style> + </head> + <body> + <article class="studip-mail"> + <header> + <div class="studip-mail-header-logo" > + <img alt="" width="130" height="92" src="cid:studiplogo"> + </div> + <p class="studip-mail-sndrec"> + <?= sprintf( + _('Stud.IP hat eine automatische Systemnachricht für Sie.'), + htmlReady($rec_fullname), + htmlReady($rec_username) + ) ?> + </p> + <p> + <?= _("Sie erhalten hiermit in regelmäßigen Abständen Informationen über Neuigkeiten und Änderungen in belegten Veranstaltungen.") ?> + <br><br> + <?= _("Über welche Inhalte und in welchem Format Sie informiert werden wollen, können Sie hier einstellen:") ?> + <br> + <a href="<?= URLHelper::getLink('dispatch.php/settings/notification', ['again' => 'yes', 'sso' => $sso]) ?>"> + <?= URLHelper::getLink('dispatch.php/settings/notification', ['again' => 'yes', 'sso' => $sso]) ?> + </a> + </p> + </header> + <section class="studip-mail-message"> + <table class="default"> + <? foreach ($news as $sem_titel => $data) : ?> + <tr class="table_header_bold"> + <td style="font-weight: bold;"> + <a href="<?= URLHelper::getLink('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['seminar_id']]) ?>"> + <?= htmlReady($sem_titel) ?> + <?= (($semester = Course::find($data[0]['range_id'])->semester_text) ? ' ('.$semester.')' : '') ?> + </a> + </td> + </tr> + <? foreach ($data as $module) : ?> + <tr> + <td> + <a href="<?= URLHelper::getLink($module['url'], ['sso' => $sso]) ?>"><?= htmlReady($module['text']) ?></a> + </td> + </tr> + <? endforeach ?> + <? endforeach ?> + </table> + </section> + <footer> + <?= sprintf( + _('Diese E-Mail wurde von Stud.IP an %1$s (%2$s) versendet.'), + htmlReady($rec_fullname), + htmlReady($rec_username) + ) + ?> + </footer> + </body> </html> diff --git a/templates/mail/notification_text.php b/templates/mail/notification_text.php index bac0d5e..47b8a4a 100644 --- a/templates/mail/notification_text.php +++ b/templates/mail/notification_text.php @@ -14,7 +14,7 @@ <? foreach ($news as $sem_titel => $data) : ?> <?= sprintf(_("In der Veranstaltung \"%s\" gibt es folgende Neuigkeiten:"), $sem_titel) ?> -<?= URLHelper::getURL('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['range_id']]) ?> +<?= URLHelper::getURL('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['seminar_id']]) ?> <? foreach ($data as $module) : ?> |
