]> BookStack Code Mirror - bookstack/blob - resources/views/pages/form-toolbox.blade.php
Started work on attachments
[bookstack] / resources / views / pages / form-toolbox.blade.php
1
2 <div toolbox class="floating-toolbox">
3
4     <div class="tabs primary-background-light">
5         <span toolbox-toggle><i class="zmdi zmdi-caret-left-circle"></i></span>
6         <span tab-button="tags" title="Page Tags" class="active"><i class="zmdi zmdi-tag"></i></span>
7         <span tab-button="files" title="Attachments"><i class="zmdi zmdi-attachment"></i></span>
8     </div>
9
10     <div tab-content="tags" ng-controller="PageTagController" page-id="{{ $page->id or 0 }}">
11         <h4>Page Tags</h4>
12         <div class="padded tags">
13             <p class="muted small">Add some tags to better categorise your content. <br> You can assign a value to a tag for more in-depth organisation.</p>
14             <table class="no-style" tag-autosuggestions style="width: 100%;">
15                 <tbody ui-sortable="sortOptions" ng-model="tags" >
16                     <tr ng-repeat="tag in tags track by $index">
17                         <td width="20" ><i class="handle zmdi zmdi-menu"></i></td>
18                         <td><input autosuggest="{{ baseUrl('/ajax/tags/suggest/names') }}" autosuggest-type="name" class="outline" ng-attr-name="tags[@{{$index}}][name]" type="text" ng-model="tag.name" ng-change="tagChange(tag)" ng-blur="tagBlur(tag)" placeholder="Tag"></td>
19                         <td><input autosuggest="{{ baseUrl('/ajax/tags/suggest/values') }}" autosuggest-type="value" class="outline" ng-attr-name="tags[@{{$index}}][value]" type="text" ng-model="tag.value" ng-change="tagChange(tag)" ng-blur="tagBlur(tag)" placeholder="Tag Value (Optional)"></td>
20                         <td width="10" ng-show="tags.length != 1" class="text-center text-neg" style="padding: 0;" ng-click="removeTag(tag)"><i class="zmdi zmdi-close"></i></td>
21                     </tr>
22                 </tbody>
23             </table>
24             <table class="no-style" style="width: 100%;">
25                 <tbody>
26                 <tr class="unsortable">
27                     <td  width="34"></td>
28                     <td ng-click="addEmptyTag()">
29                         <button type="button" class="text-button">Add another tag</button>
30                     </td>
31                     <td></td>
32                 </tr>
33                 </tbody>
34             </table>
35         </div>
36     </div>
37
38     <div tab-content="files" ng-controller="PageAttachmentController" page-id="{{ $page->id or 0 }}">
39         <h4>Attached Files</h4>
40         <div class="padded files">
41             <p class="muted small">Upload some files to display on your page. This are visible in the page sidebar.</p>
42             <drop-zone upload-url="@{{getUploadUrl()}}" uploaded-to="@{{uploadedTo}}" event-success="uploadSuccess"></drop-zone>
43
44             <table class="no-style" tag-autosuggestions style="width: 100%;">
45                 <tbody ui-sortable="sortOptions" ng-model="files" >
46                 <tr ng-repeat="file in files track by $index">
47                     <td width="20" ><i class="handle zmdi zmdi-menu"></i></td>
48                     <td ng-bind="file.name"></td>
49                     <td width="10" class="text-center text-neg" style="padding: 0;"><i class="zmdi zmdi-close"></i></td>
50                 </tr>
51                 </tbody>
52             </table>
53         </div>
54     </div>
55
56 </div>