]> BookStack Code Mirror - bookstack/blob - resources/views/pages/form-toolbox.blade.php
Added tags to page display and simplified editing flow
[bookstack] / resources / views / pages / form-toolbox.blade.php
1
2 <div toolbox class="floating-toolbox">
3     <div class="tabs primary-background-light">
4         <span toolbox-toggle><i class="zmdi zmdi-caret-left-circle"></i></span>
5         <span tab-button="tags" title="Page Tags" class="active"><i class="zmdi zmdi-tag"></i></span>
6     </div>
7     <div tab-content="tags" ng-controller="PageTagController" page-id="{{ $page->id or 0 }}">
8         <h4>Page Tags</h4>
9         <div class="padded tags">
10             <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>
11             <table class="no-style" style="width: 100%;">
12                 <tbody ui-sortable="sortOptions" ng-model="tags" >
13                     <tr ng-repeat="tag in tags track by $index">
14                         <td width="20" ><i class="handle zmdi zmdi-menu"></i></td>
15                         <td><input 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>
16                         <td><input 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>
17                         <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>
18                     </tr>
19                 </tbody>
20             </table>
21             <table class="no-style" style="width: 100%;">
22                 <tbody>
23                 <tr class="unsortable">
24                     <td  width="34"></td>
25                     <td ng-click="addEmptyTag()">
26                         <button type="button" class="text-button">Add another tag</button>
27                     </td>
28                     <td></td>
29                 </tr>
30                 </tbody>
31             </table>
32         </div>
33     </div>
34 </div>