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