]> BookStack Code Mirror - bookstack/blob - resources/views/entities/watch-controls.blade.php
respective book and chapter structure added.
[bookstack] / resources / views / entities / watch-controls.blade.php
1 <div component="dropdown"
2      class="dropdown-container block my-xxs">
3     <a refs="dropdown@toggle" href="#" class="entity-meta-item my-none">
4         @icon(($ignoring ? 'watch-ignore' : 'watch'))
5         <span>{{ $label }}</span>
6     </a>
7     <form action="{{ url('/watching/update') }}" method="POST">
8         {{ method_field('PUT') }}
9         {{ csrf_field() }}
10         <input type="hidden" name="type" value="{{ $entity->getMorphClass() }}">
11         <input type="hidden" name="id" value="{{ $entity->id }}">
12
13         <ul refs="dropdown@menu" class="dropdown-menu xl-limited anchor-left pb-none">
14             @foreach(\BookStack\Activity\WatchLevels::allSuitedFor($entity) as $option => $value)
15                 <li>
16                     <button name="level" value="{{ $option }}" class="icon-item">
17                         @if($watchLevel === $option)
18                             <span class="text-pos pt-m"
19                                   title="{{ trans('common.status_active') }}">@icon('check-circle')</span>
20                         @else
21                             <span title="{{ trans('common.status_inactive') }}"></span>
22                         @endif
23                         <div class="break-text">
24                             <div class="mb-xxs"><strong>{{ trans('entities.watch_title_' . $option) }}</strong></div>
25                             <div class="text-muted text-small">
26                                 @if(trans()->has('entities.watch_desc_' . $option . '_' . $entity->getMorphClass()))
27                                     {{ trans('entities.watch_desc_' . $option . '_' . $entity->getMorphClass()) }}
28                                 @else
29                                     {{ trans('entities.watch_desc_' . $option) }}
30                                 @endif
31                             </div>
32                         </div>
33                     </button>
34                 </li>
35                 <li>
36                     <hr class="my-none">
37                 </li>
38             @endforeach
39             <li>
40                 <a href="{{ url('/my-account/notifications') }}"
41                    target="_blank"
42                    class="text-item text-muted text-small break-text">{{ trans('entities.watch_change_default') }}</a>
43             </li>
44         </ul>
45     </form>
46 </div>