]> BookStack Code Mirror - bookstack/blobdiff - resources/views/components/entity-selector.blade.php
Update settings.php
[bookstack] / resources / views / components / entity-selector.blade.php
index 8fb2187e6ff7395e8264c657813990fb79472baf..cb41950cb0e1426cc21100be417613e6187a1d33 100644 (file)
@@ -1,8 +1,14 @@
-<div class="form-group">
-    <div entity-selector class="entity-selector {{$selectorSize or ''}}" entity-types="{{ $entityTypes or 'book,chapter,page' }}">
+<div class="form-group entity-selector-container">
+    <div entity-selector class="entity-selector {{$selectorSize ?? ''}}" entity-types="{{ $entityTypes ?? 'book,chapter,page' }}" entity-permission="{{ $entityPermission ?? 'view' }}">
         <input type="hidden" entity-selector-input name="{{$name}}" value="">
-        <input type="text" placeholder="{{ trans('common.search') }}" ng-model="search" ng-model-options="{debounce: 200}" ng-change="searchEntities()">
-        <div class="text-center loading" ng-show="loading">@include('partials.loading-icon')</div>
-        <div ng-show="!loading" ng-bind-html="entityResults"></div>
+        <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>
+        @if($showAdd ?? false)
+            <div class="entity-selector-add">
+                <button entity-selector-add-button type="button"
+                        class="button outline">@icon('add'){{ trans('common.add') }}</button>
+            </div>
+        @endif
     </div>
 </div>
\ No newline at end of file