]> BookStack Code Mirror - bookstack/blob - resources/views/settings/webhooks/index.blade.php
Fixed failed permission checks due to non-loaded fields
[bookstack] / resources / views / settings / webhooks / index.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4
5     <div class="container small">
6
7         @include('settings.parts.navbar', ['selected' => 'webhooks'])
8
9         <div class="card content-wrap auto-height">
10
11             <div class="grid half v-center">
12                 <h1 class="list-heading">{{ trans('settings.webhooks') }}</h1>
13
14                 <div class="text-right">
15                     <a href="{{ url("/settings/webhooks/create") }}"
16                        class="button outline">{{ trans('settings.webhooks_create') }}</a>
17                 </div>
18             </div>
19
20             @if(count($webhooks) > 0)
21
22                 <table class="table">
23                     <tr>
24                         <th>{{ trans('common.name') }}</th>
25                         <th width="100">{{ trans('settings.webhook_events_table_header') }}</th>
26                         <th width="100">{{ trans('common.status') }}</th>
27                     </tr>
28                     @foreach($webhooks as $webhook)
29                         <tr>
30                             <td>
31                                 <a href="{{ $webhook->getUrl() }}">{{ $webhook->name }}</a> <br>
32                                 <span class="small text-muted italic">{{ $webhook->endpoint }}</span>
33                             </td>
34                             <td>
35                                 @if($webhook->tracksEvent('all'))
36                                     {{ trans('settings.webhooks_events_all') }}
37                                 @else
38                                     {{ $webhook->trackedEvents->count() }}
39                                 @endif
40                             </td>
41                             <td>
42                                 {{ trans('common.status_' . ($webhook->active ? 'active' : 'inactive')) }}
43                             </td>
44                         </tr>
45                     @endforeach
46                 </table>
47             @else
48                 <p class="text-muted empty-text px-none">
49                     {{ trans('settings.webhooks_none_created') }}
50                 </p>
51             @endif
52
53
54         </div>
55     </div>
56
57 @stop