]> BookStack Code Mirror - bookstack/blobdiff - resources/views/pages/form-toolbox.blade.php
Moved the code to the wysiwyg-editor file.
[bookstack] / resources / views / pages / form-toolbox.blade.php
index bd60af89a8fbf8cf8f93c144da001731263039f6..f6ee2510d0b4f5040b56e18eaac9ef2241d0741a 100644 (file)
@@ -1,48 +1,18 @@
 
-<div toolbox class="floating-toolbox">
+<div editor-toolbox class="floating-toolbox">
 
     <div class="tabs primary-background-light">
-        <span toolbox-toggle><i class="zmdi zmdi-caret-left-circle"></i></span>
-        <span toolbox-tab-button="tags" title="{{ trans('entities.page_tags') }}" class="active"><i class="zmdi zmdi-tag"></i></span>
+        <span toolbox-toggle>@icon('caret-left-circle')</span>
+        <span toolbox-tab-button="tags" title="{{ trans('entities.page_tags') }}" class="active">@icon('tag')</span>
         @if(userCan('attachment-create-all'))
-            <span toolbox-tab-button="files" title="{{ trans('entities.attachments') }}"><i class="zmdi zmdi-attachment"></i></span>
+            <span toolbox-tab-button="files" title="{{ trans('entities.attachments') }}">@icon('attach')</span>
         @endif
     </div>
 
-    <div toolbox-tab-content="tags" id="tag-manager" page-id="{{ $page->id or 0 }}">
+    <div toolbox-tab-content="tags">
         <h4>{{ trans('entities.page_tags') }}</h4>
-        <div class="padded tags">
-            <p class="muted small">{!! nl2br(e(trans('entities.tags_explain'))) !!}</p>
-
-            <draggable class="fake-table no-style tag-table" :options="{handle: '.handle'}" :list="tags" element="div">
-                <transition-group tag="div">
-                    <div v-for="(tag, i) in tags" :key="tag.key">
-                        <div width="20" class="handle" ><i class="zmdi zmdi-menu"></i></div>
-                        <div>
-                            <autosuggest url="/ajax/tags/suggest/names" type="name" class="outline" :name="getTagFieldName(i, 'name')"
-                                   v-model="tag.name" @input="tagChange(tag)" @blur="tagBlur(tag)" placeholder="{{ trans('entities.tag') }}"/>
-                        </div>
-                        <div>
-                            <autosuggest url="/ajax/tags/suggest/values" type="value" class="outline" :name="getTagFieldName(i, 'value')"
-                                         v-model="tag.value" @change="tagChange(tag)" @blur="tagBlur(tag)" placeholder="{{ trans('entities.tag') }}"/>
-                        </div>
-                        <div width="10" v-show="tags.length !== 1" class="text-center text-neg" style="padding: 0;" @click="removeTag(tag)"><i class="zmdi zmdi-close"></i></div>
-                    </div>
-                </transition-group>
-            </draggable>
-
-            <table class="no-style" style="width: 100%;">
-                <tbody>
-                <tr class="unsortable">
-                    <td width="34"></td>
-                    <td @click="addEmptyTag">
-                        <button type="button" class="text-button">{{ trans('entities.tags_add') }}</button>
-                    </td>
-                    <td></td>
-                </tr>
-                </tbody>
-            </table>
-
+        <div class="padded">
+            @include('components.tag-manager', ['entity' => $page, 'entityType' => 'page'])
         </div>
     </div>
 
                             <div @click="tab = 'link'" :class="{selected: tab === 'link'}" class="tab-item">{{ trans('entities.attachments_link') }}</div>
                         </div>
                         <div v-show="tab === 'list'">
-                            <draggable class="fake-table no-style " style="width: 100%;" :options="{handle: '.handle'}" @change="fileSortUpdate" :list="files" element="div">
-                                <transition-group tag="div">
-                                <div v-for="(file, index) in files" :key="file.id">
-                                    <div width="20" ><i class="handle zmdi zmdi-menu"></i></div>
-                                    <div>
+                            <draggable style="width: 100%;" :options="{handle: '.handle'}" @change="fileSortUpdate" :list="files" element="div">
+                                <div v-for="(file, index) in files" :key="file.id" class="card drag-card">
+                                    <div class="handle">@icon('grip')</div>
+                                    <div class="padded">
                                         <a :href="getFileUrl(file)" target="_blank" v-text="file.name"></a>
                                         <div v-if="file.deleting">
                                             <span class="neg small">{{ trans('entities.attachments_delete_confirm') }}</span>
                                             <span class="text-primary small" @click="file.deleting = false;">{{ trans('common.cancel') }}</span>
                                         </div>
                                     </div>
-                                    <div width="10" @click="startEdit(file)" class="text-center text-primary" style="padding: 0;"><i class="zmdi zmdi-edit"></i></div>
-                                    <div width="5"></div>
-                                    <div width="10" @click="deleteFile(file)" class="text-center text-neg" style="padding: 0;"><i class="zmdi zmdi-close"></i></div>
+                                    <div @click="startEdit(file)" class="drag-card-action text-center text-primary" style="padding: 0;">@icon('edit')</div>
+                                    <div @click="deleteFile(file)" class="drag-card-action text-center text-neg" style="padding: 0;">@icon('close')</div>
                                 </div>
-                                </transition-group>
                             </draggable>
                             <p class="small muted" v-if="files.length === 0">
                                 {{ trans('entities.attachments_no_files') }}
                         </div>
                     </div>
 
-                    <button type="button" class="button" @click="cancelEdit">{{ trans('common.back') }}</button>
+                    <button type="button" class="button outline" @click="cancelEdit">{{ trans('common.back') }}</button>
                     <button @click.enter.prevent="updateFile(fileToEdit)" class="button pos">{{ trans('common.save') }}</button>
                 </div>
 
         </div>
     @endif
 
-</div>
\ No newline at end of file
+</div>