]> BookStack Code Mirror - bookstack/blob - resources/views/users/preferences/notifications.blade.php
Notifications: Added new preferences view and access control
[bookstack] / resources / views / users / preferences / notifications.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4     <div class="container small my-xl">
5
6         <section class="card content-wrap auto-height">
7             <form action="{{ url('/preferences/notifications') }}" method="post">
8                 {{ method_field('put') }}
9                 {{ csrf_field() }}
10
11                 <h1 class="list-heading">{{ trans('preferences.notifications') }}</h1>
12                 <p class="text-small text-muted">{{ trans('preferences.notifications_desc') }}</p>
13
14                 <div class="flex-container-row wrap justify-space-between pb-m">
15                     <div class="toggle-switch-list min-width-l">
16                         <div>
17                             @include('form.toggle-switch', [
18                                 'name' => 'preferences[own-page-changes]',
19                                 'value' => $preferences->notifyOnOwnPageChanges(),
20                                 'label' => trans('preferences.notifications_opt_own_page_changes'),
21                             ])
22                         </div>
23                         <div>
24                             @include('form.toggle-switch', [
25                                 'name' => 'preferences[own-page-comments]',
26                                 'value' => $preferences->notifyOnOwnPageComments(),
27                                 'label' => trans('preferences.notifications_opt_own_page_comments'),
28                             ])
29                         </div>
30                         <div>
31                             @include('form.toggle-switch', [
32                                 'name' => 'preferences[comment-replies]',
33                                 'value' => $preferences->notifyOnCommentReplies(),
34                                 'label' => trans('preferences.notifications_opt_comment_replies'),
35                             ])
36                         </div>
37                     </div>
38
39                     <div class="mt-auto">
40                         <button class="button">{{ trans('preferences.notifications_save') }}</button>
41                     </div>
42                 </div>
43
44             </form>
45         </section>
46
47         <section class="card content-wrap auto-height">
48             <h2 class="list-heading">{{ trans('preferences.notifications_watched') }}</h2>
49             <p class="text-small text-muted">{{ trans('preferences.notifications_watched_desc') }}</p>
50
51             @if($watches->isEmpty())
52                 <p class="text-muted italic">{{ trans('common.no_items') }}</p>
53             @else
54                 <div class="item-list">
55                     @foreach($watches as $watch)
56                         <div class="flex-container-row justify-space-between item-list-row items-center wrap px-m py-s">
57                             <div class="py-xs px-s min-width-m">
58                                 @include('entities.icon-link', ['entity' => $watch->watchable])
59                             </div>
60                             <div class="py-xs min-width-m text-m-right px-m">
61                                 @icon('watch' . ($watch->ignoring() ? '-ignore' : ''))
62                                 {{ trans('entities.watch_title_' . $watch->getLevelName()) }}
63                             </div>
64                         </div>
65                     @endforeach
66                 </div>
67             @endif
68
69             <div class="my-m">{{ $watches->links() }}</div>
70         </section>
71
72     </div>
73 @stop