Merge remote-tracking branch 'refs/remotes/origin/next-lantia' into next
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / notificationSettings.tpl
1 {include file='documentHeader'}
2
3 <head>
4 <title>{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang} - {lang}wcf.user.menu.settings{/lang} - {PAGE_TITLE|language}</title>
5
6 {include file='headInclude'}
7
8 <script data-relocate="true">
9 require(['Language', 'WoltLab/WCF/Controller/User/Notification/Settings'], function(Language, ControllerUserNotificationSettings) {
10 Language.addObject({
11 'wcf.user.notification.mailNotificationType.daily': '{lang}wcf.user.notification.mailNotificationType.daily{/lang}',
12 'wcf.user.notification.mailNotificationType.instant': '{lang}wcf.user.notification.mailNotificationType.instant{/lang}',
13 'wcf.user.notification.mailNotificationType.none': '{lang}wcf.user.notification.mailNotificationType.none{/lang}'
14 });
15
16 ControllerUserNotificationSettings.setup();
17 });
18 </script>
19 </head>
20
21 <body id="tpl{$templateName|ucfirst}" data-template="{$templateName}" data-application="{$templateNameApplication}">
22
23 {include file='userMenuSidebar'}
24
25 {include file='header'}
26
27 <header class="contentHeader">
28 <h1 class="contentTitle">{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang}</h1>
29 <p class="contentHeaderDescription">{lang}wcf.user.notification.notifications.description{/lang}</p>
30 </header>
31
32 {include file='userNotice'}
33
34 {include file='formError'}
35
36 {if $success|isset}
37 <p class="success">{lang}wcf.global.success.edit{/lang}</p>
38 {/if}
39
40 <div class="contentNavigation">
41 {hascontent}
42 <nav>
43 <ul>
44 {content}
45 {event name='contentNavigationButtons'}
46 {/content}
47 </ul>
48 </nav>
49 {/hascontent}
50 </div>
51
52 <form method="post" action="{link controller='NotificationSettings'}{/link}">
53 <div id="notificationSettings">
54 {foreach from=$events key='eventCategory' item='eventList'}
55 <section class="section">
56 <h2 class="sectionTitle">{lang}wcf.user.notification.{$eventCategory}{/lang}</h2>
57
58 <dl>
59 {foreach from=$eventList item=event}
60 <dt>{lang}wcf.user.notification.{$event->objectType}.{$event->eventName}{/lang}</dt>
61 <dd>
62 <ol class="flexibleButtonGroup" data-object-id="{@$event->eventID}">
63 <li>
64 <input type="radio" id="settings_{@$event->eventID}_disabled" name="settings[{@$event->eventID}][enabled]" value="0"{if $settings[$event->eventID][enabled]|empty} checked="checked"{/if}>
65 <label for="settings_{@$event->eventID}_disabled" class="red">
66 <span class="icon icon16 fa-times"></span>
67 {lang}wcf.user.notification.notifications.disabled{/lang}
68 </label>
69 </li>
70 <li class="spaceAfter">
71 <input type="radio" id="settings_{@$event->eventID}_enabled" name="settings[{@$event->eventID}][enabled]" value="1"{if !$settings[$event->eventID][enabled]|empty} checked="checked"{/if}>
72 <label for="settings_{@$event->eventID}_enabled" class="green">
73 <span class="icon icon16 fa-bell"></span>
74 {lang}wcf.user.notification.notifications.enabled{/lang}
75 </label>
76 </li>
77 {if $event->supportsEmailNotification()}
78 <li class="notificationSettingsEmail{if !$settings[$event->eventID][enabled]|empty} active{/if}">
79 <input type="hidden" id="settings_{$event->eventID}_mailNotificationType" name="settings[{@$event->eventID}][mailNotificationType]" value="{$settings[$event->eventID][mailNotificationType]}">
80 <a{if $settings[$event->eventID][mailNotificationType] !== 'none'} class="active yellow"{/if}>
81 <span class="icon icon16 fa-envelope-o"></span>
82 <span class="title">{lang}wcf.user.notification.mailNotificationType.{$settings[$event->eventID][mailNotificationType]}{/lang}</span>
83 <span class="icon icon16 fa-caret-down"></span>
84 </a>
85 </li>
86 {/if}
87 </ol>
88 </dd>
89 {/foreach}
90 </dl>
91 </section>
92 {/foreach}
93
94 {event name='sections'}
95 </div>
96
97 <div class="formSubmit">
98 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
99 {@SECURITY_TOKEN_INPUT_TAG}
100 </div>
101 </form>
102
103 {include file='footer'}
104
105 </body>
106 </html>