]> BookStack Code Mirror - bookstack/commitdiff
Updated listing endpoints to be clickable in api docs
authorDan Brown <redacted>
Fri, 22 May 2020 23:53:13 +0000 (00:53 +0100)
committerDan Brown <redacted>
Fri, 22 May 2020 23:53:13 +0000 (00:53 +0100)
resources/views/api-docs/index.blade.php

index e92b505cf3792c4b74d002b0b92f384c39ec609b..d9c3d659513507c952e3aaecac81d6f7d6c6df06 100644 (file)
                             <h6 class="text-uppercase text-muted float right">{{ $endpoint['controller_method_kebab'] }}</h6>
                             <h5 id="{{ $endpoint['name'] }}" class="text-mono mb-m">
                                 <span class="api-method" data-method="{{ $endpoint['method'] }}">{{ $endpoint['method'] }}</span>
-                                {{ url($endpoint['uri']) }}
+                                @if($endpoint['controller_method_kebab'] === 'list')
+                                    <a style="color: inherit;" target="_blank" href="{{ url($endpoint['uri']) }}">{{ url($endpoint['uri']) }}</a>
+                                @else
+                                    {{ url($endpoint['uri']) }}
+                                @endif
                             </h5>
                             <p class="mb-m">{{ $endpoint['description'] ?? '' }}</p>
                             @if($endpoint['body_params'] ?? false)