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