]> BookStack Code Mirror - bookstack/blob - resources/views/users/account/notifications.blade.php
respective book and chapter structure added.
[bookstack] / resources / views / users / account / notifications.blade.php
1 @extends('users.account.layout')
2
3 @section('main')
4     <section class="card content-wrap auto-height">
5         <form action="{{ url('/my-account/notifications') }}" method="post">
6             {{ method_field('put') }}
7             {{ csrf_field() }}
8
9             <h1 class="list-heading">{{ trans('preferences.notifications') }}</h1>
10             <p class="text-small text-muted">{{ trans('preferences.notifications_desc') }}</p>
11
12             <div class="flex-container-row wrap justify-space-between pb-m">
13                 <div class="toggle-switch-list min-width-l">
14                     <div>
15                         @include('form.toggle-switch', [
16                             'name' => 'preferences[own-page-changes]',
17                             'value' => $preferences->notifyOnOwnPageChanges(),
18                             'label' => trans('preferences.notifications_opt_own_page_changes'),
19                         ])
20                     </div>
21                     @if (!setting('app-disable-comments'))
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                     @endif
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 @stop