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