aboutsummaryrefslogtreecommitdiff
path: root/templates/mail/notification_html.php
blob: 81a38f3be33a73c105950806d9749c62a0ed9d9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?
# Lifter010: TODO
/**
 * @var string $rec_fullname
 * @var string $rec_username
 * @var array $news
 * @var string $sso
 */
?>
<html>
    <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 {
                height: 45px;
                margin-bottom: 25px;
                margin-left: auto;
                margin-right: auto;
                margin-top: 25px;
                width: 130px;
            }

            .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%;
            }

            table.default {
                border-collapse: collapse;
                margin-bottom: 2em;
                width: 100%;
            }

            table.default th,
            table.default td {
                padding: 10px 5px;
                text-align: left;
            }

            table.default th:first-child,
            table.default td:first-child {
                padding-left: 10px;
            }

            table.default th:last-child,
            table.default td:last-child {
                padding-right: 10px;
            }

            .table_header_bold {
                background-color: #ededed;
                border-color: #ededed;
                border-style: solid;
                border-width: 0 0 1px 0;
                color: #fff;
                font-size: 12pt;
                padding: 3px 5px;
            }

        </style>
    </head>
    <body>
    <article class="studip-mail">
        <header>
            <div class="studip-mail-header-logo" >
                <img alt="" src="cid:studiplogo" width="130" height="45">
            </div>
            <br>
            <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('dispatch.php/course/go', ['again' => 'yes', 'sso' => $sso, 'to' => $data[0]['seminar_id']]) ?>">
                                <?= htmlReady($sem_titel) ?>
                                <?= (($semester = Course::find($data[0]['range_id'])->semester_text) ? ' ('.$semester.')' : '') ?>
                            </a>
                        </td>
                        <td></td>
                    </tr>
                    <? foreach ($data as $module) : ?>
                    <tr>
                        <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>
        </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>