]> BookStack Code Mirror - bookstack/blobdiff - resources/views/components/entity-selector.blade.php
[Fix] app_footer_links_desc
[bookstack] / resources / views / components / entity-selector.blade.php
index 89c574c28c0f3090868cc43ef1f3c6794f7b6d4c..c71fdff633ad3e8f7ab1c9d002b29e253b661398 100644 (file)
@@ -1,8 +1,17 @@
-<div class="form-group">
-    <div entity-selector class="entity-selector {{$selectorSize or ''}}" entity-types="{{ $entityTypes or 'book,chapter,page' }}" entity-permission="{{ $entityPermission or 'view' }}">
-        <input type="hidden" entity-selector-input name="{{$name}}" value="">
-        <input type="text" placeholder="{{ trans('common.search') }}" entity-selector-search>
-        <div class="text-center loading" entity-selector-loading>@include('partials.loading-icon')</div>
-        <div entity-selector-results></div>
+<div class="form-group entity-selector-container">
+    <div component="entity-selector"
+         class="entity-selector {{$selectorSize ?? ''}}"
+         option:entity-selector:entity-types="{{ $entityTypes ?? 'book,chapter,page' }}"
+         option:entity-selector:entity-permission="{{ $entityPermission ?? 'view' }}">
+        <input refs="entity-selector@input" type="hidden" name="{{$name}}" value="">
+        <input type="text" placeholder="{{ trans('common.search') }}" @if($autofocus ?? false) autofocus @endif refs="entity-selector@search">
+        <div class="text-center loading" refs="entity-selector@loading">@include('partials.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