]> BookStack Code Mirror - bookstack/blob - resources/views/users/preferences/notifications.blade.php
3bbf78280e6d3c457342339b954b57e941c41e51
[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="toggle-switch-list">
15                     <div>
16                         @include('form.toggle-switch', [
17                             'name' => 'preferences[own-page-changes]',
18                             'value' => $preferences->notifyOnOwnPageChanges(),
19                             'label' => trans('preferences.notifications_opt_own_page_changes'),
20                         ])
21                     </div>
22                     <div>
23                         @include('form.toggle-switch', [
24                             'name' => 'preferences[own-page-comments]',
25                             'value' => $preferences->notifyOnOwnPageComments(),
26                             'label' => trans('preferences.notifications_opt_own_page_comments'),
27                         ])
28                     </div>
29                     <div>
30                         @include('form.toggle-switch', [
31                             'name' => 'preferences[comment-replies]',
32                             'value' => $preferences->notifyOnCommentReplies(),
33                             'label' => trans('preferences.notifications_opt_comment_replies'),
34                         ])
35                     </div>
36                 </div>
37
38                 <div class="form-group text-right">
39                     <button class="button">{{ trans('preferences.notifications_save') }}</button>
40                 </div>
41             </form>
42         </section>
43
44         <section class="card content-wrap auto-height">
45             <h2 class="list-heading">{{ trans('preferences.notifications_watched') }}</h2>
46             <p class="text-small text-muted">{{ trans('preferences.notifications_watched_desc') }}</p>
47
48             @if($watches->isEmpty())
49                 <p class="text-muted italic">{{ trans('common.no_items') }}</p>
50             @else
51                 <div class="item-list">
52                     @foreach($watches as $watch)
53                         <div class="flex-container-row justify-space-between item-list-row items-center wrap px-m py-s">
54                             <div class="py-xs px-s min-width-m">
55                                 @include('entities.icon-link', ['entity' => $watch->watchable])
56                             </div>
57                             <div class="py-xs min-width-m text-m-right px-m">
58                                 @icon('watch' . ($watch->ignoring() ? '-ignore' : ''))
59                                 {{ trans('entities.watch_title_' . $watch->getLevelName()) }}
60                             </div>
61                         </div>
62                     @endforeach
63                 </div>
64             @endif
65
66             <div class="my-m">{{ $watches->links() }}</div>
67         </section>
68
69     </div>
70 @stop