]> BookStack Code Mirror - bookstack/blobdiff - resources/views/settings/webhooks/index.blade.php
Updated attachment links to have dropdown for open type
[bookstack] / resources / views / settings / webhooks / index.blade.php
index 8adf60835db6123c7a67ead5b9b1824709781334..bbe58453f38caa2d843e689d4861d994e595ff03 100644 (file)
@@ -4,9 +4,7 @@
 
     <div class="container small">
 
-        <div class="py-m">
-            @include('settings.parts.navbar', ['selected' => 'webhooks'])
-        </div>
+        @include('settings.parts.navbar', ['selected' => 'webhooks'])
 
         <div class="card content-wrap auto-height">
 
                 <h1 class="list-heading">{{ trans('settings.webhooks') }}</h1>
 
                 <div class="text-right">
-                    <a href="{{ url("/settings/webhooks/create") }}" class="button outline">{{ trans('settings.webhooks_create') }}</a>
+                    <a href="{{ url("/settings/webhooks/create") }}"
+                       class="button outline">{{ trans('settings.webhooks_create') }}</a>
                 </div>
             </div>
 
+            @if(count($webhooks) > 0)
+
+                <table class="table">
+                    <tr>
+                        <th>{{ trans('common.name') }}</th>
+                        <th width="100">{{ trans('settings.webhook_events_table_header') }}</th>
+                        <th width="100">{{ trans('common.status') }}</th>
+                    </tr>
+                    @foreach($webhooks as $webhook)
+                        <tr>
+                            <td>
+                                <a href="{{ $webhook->getUrl() }}">{{ $webhook->name }}</a> <br>
+                                <span class="small text-muted italic">{{ $webhook->endpoint }}</span>
+                            </td>
+                            <td>
+                                @if($webhook->tracksEvent('all'))
+                                    {{ trans('settings.webhooks_events_all') }}
+                                @else
+                                    {{ $webhook->trackedEvents->count() }}
+                                @endif
+                            </td>
+                            <td>
+                                {{ trans('common.status_' . ($webhook->active ? 'active' : 'inactive')) }}
+                            </td>
+                        </tr>
+                    @endforeach
+                </table>
+            @else
+                <p class="text-muted empty-text px-none">
+                    {{ trans('settings.webhooks_none_created') }}
+                </p>
+            @endif
+
 
         </div>
     </div>