]> BookStack Code Mirror - bookstack/blobdiff - resources/views/entities/selector.blade.php
Layout: Converted tri-layout component to ts
[bookstack] / resources / views / entities / selector.blade.php
index 5285b0ec46917e84b0deb43d0cce5bc8ac0473f3..0cdf4376cc7ea38b07bfbd2ee31fb73590bfbbf8 100644 (file)
@@ -1,17 +1,21 @@
+{{--
+$name - string
+$autofocus - boolean, optional
+$entityTypes - string, optional
+$entityPermission - string, optional
+$selectorEndpoint - string, optional
+$selectorSize - string, optional (compact)
+--}}
 <div class="form-group entity-selector-container">
     <div component="entity-selector"
+         refs="entity-selector-popup@selector"
          class="entity-selector {{$selectorSize ?? ''}}"
          option:entity-selector:entity-types="{{ $entityTypes ?? 'book,chapter,page' }}"
-         option:entity-selector:entity-permission="{{ $entityPermission ?? 'view' }}">
+         option:entity-selector:entity-permission="{{ $entityPermission ?? 'view' }}"
+         option:entity-selector:search-endpoint="{{ $selectorEndpoint ?? '/search/entity-selector' }}">
         <input refs="entity-selector@input" type="hidden" name="{{$name}}" value="">
-        <input refs="entity-selector@search entity-selector-popup@searchInput" type="text" placeholder="{{ trans('common.search') }}" @if($autofocus ?? false) autofocus @endif>
+        <input refs="entity-selector@search" type="text" placeholder="{{ trans('common.search') }}" @if($autofocus ?? false) autofocus @endif>
         <div class="text-center loading" refs="entity-selector@loading">@include('common.loading-icon')</div>
         <div refs="entity-selector@results"></div>
-        @if($showAdd ?? false)
-            <div class="entity-selector-add">
-                <button refs="entity-selector@add" type="button"
-                        class="button outline">@icon('add'){{ trans('common.add') }}</button>
-            </div>
-        @endif
     </div>
 </div>
\ No newline at end of file