-
Notifications
You must be signed in to change notification settings - Fork 539
/
viewPage.html
195 lines (180 loc) · 7.46 KB
/
viewPage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<div ng-controller="Wiki.ViewController">
<div class="logbar" ng-controller="Wiki.NavBarController">
<div class="wiki logbar-container">
<ul class="nav nav-tabs">
<li ng-show="branches.length || branch" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
title="The branch to view">
{{branch || 'branch'}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li ng-repeat="otherBranch in branches">
<a ng-href="{{branchLink(otherBranch)}}{{hash}}"
ng-hide="otherBranch === branch"
title="Switch to the {{otherBranch}} branch"
data-placement="bottom">
{{otherBranch}}</a>
</li>
</ul>
</li>
<li ng-repeat="link in breadcrumbs" ng-class='{active : isActive(link.href)}'>
<a ng-href="{{link.href}}{{hash}}">{{link.name}}</a>
</li>
<li class="pull-right dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Actions <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li ng-show="sourceLink()">
<a ng-href="{{sourceLink()}}" title="View source code"
data-placement="bottom">
<i class="icon-file-alt"></i> Source</a>
</li>
<li>
<a ng-href="{{historyLink}}{{hash}}" ng-hide="!historyLink" title="View the history of this file"
data-placement="bottom">
<i class="icon-comments-alt"></i> History</a>
</li>
<li class="divider">
</li>
<li>
<a ng-click="openRenameDialog()" ng-disabled="gridOptions.selectedItems.length !== 1"
title="Rename the selected document"
data-placement="bottom">
<i class="icon-adjust"></i> Rename</a>
</li>
<li>
<a ng-click="openMoveDialog()" ng-disabled="!gridOptions.selectedItems.length"
title="move the selected documents to a new folder"
data-placement="bottom">
<i class="icon-move"></i> Move</a>
</li>
<li class="divider">
</li>
<li>
<a ng-click="openDeleteDialog()" ng-disabled="!gridOptions.selectedItems.length"
title="Delete the selected document(s)"
data-placement="bottom">
<i class="icon-remove"></i> Delete</a>
</li>
</ul>
</li>
<li class="pull-right">
<a ng-href="{{editLink()}}{{hash}}" ng-hide="!editLink()" title="Edit this page"
data-placement="bottom">
<i class="icon-edit"></i> Edit</a>
</li>
<li class="pull-right">
<a title="Create new page" ng-click="openAddDialog()"
data-placement="bottom">
<i class="icon-plus"></i> Create</a>
<!--
<a ng-href="{{createLink()}}{{hash}}" title="Create new page"
data-placement="bottom">
<i class="icon-plus"></i> Create</a>
-->
</li>
</ul>
</div>
</div>
<div class="wiki-fixed form-horizontal">
<div ng-hide="!children">
<div class="row-fluid">
<div class="wikiGridStyle" ng-grid="gridOptions"></div>
</div>
</div>
<div ng-hide="!html">
<div ng-bind-html-unsafe="html"></div>
</div>
<div ng-include="sourceView" class="editor-autoresize"></div>
</div>
<div class="modal-large">
<div modal="addDialog.show" close="addDialog.close()" ng-options="addDialog.options">
<div class="modal-header"><h4>Create Document</h4></div>
<div class="modal-body">
<div class="control-group">
<div hawtio-tree="createDocumentTree" hideRoot="true" onSelect="onCreateDocumentSelect"
activateNodes="createDocumentTreeActivations"></div>
</div>
<div class="control-group">
<div class="well">
{{selectedCreateDocumentTemplate.tooltip}}
</div>
</div>
<form class="form-inline" ng-submit="addAndCloseDialog()">
<label class="control-label" for="fileName">Name: </label>
<input id="fileName" type="text" ng-model="newDocumentName"
placeholder="{{selectedCreateDocumentTemplate.exemplar}}"/>
</form>
<div class="control-group">
<div ng-show="fileExists.exists" class="alert">
Please choose a different name as <b>{{fileExists.name}}</b> already exists
</div>
</div>
</div>
<div class="modal-footer">
<input id="submit" class="btn btn-primary add" type="submit" ng-click="addAndCloseDialog()"
ng-disabled="!selectedCreateDocumentTemplate.exemplar || fileExists.exists"
value="Create">
<button class="btn btn-warning cancel" type="button" ng-click="addDialog.close()">Cancel</button>
</div>
</div>
</div>
<div hawtio-confirm-dialog="deleteDialog"
ok-button-text="Delete"
on-ok="deleteAndCloseDialog()">
<div class="dialog-body">
<p>You are about to delete
<ng-pluralize count="gridOptions.selectedItems.length"
when="{'1': 'this document!', 'other': 'these {} documents!'}">
</ng-pluralize>
</p>
<div ng-bind-html-unsafe="selectedFileHtml"></div>
</div>
</div>
<div modal="moveDialog.show" close="moveDialog.close()" ng-options="moveDialog.options">
<form class="form-horizontal" ng-submit="moveAndCloseDialog()">
<div class="modal-header"><h4>Move Document</h4></div>
<div class="modal-body">
<div class="control-group">
<label class="control-label" for="moveFolder">Folder</label>
<div class="controls">
<input type="text" id="moveFolder" ng-model="moveFolder"
typeahead="title for title in folderNames($viewValue) | filter:$viewValue" typeahead-editable='true'>
</div>
</div>
</div>
<div class="modal-footer">
<input class="btn btn-primary" type="submit"
ng-disabled="!moveFolder"
value="Move">
<button class="btn btn-warning cancel" type="button" ng-click="moveDialog.close()">Cancel</button>
</div>
</form>
</div>
<div modal="renameDialog.show" close="renameDialog.close()" ng-options="renameDialog.options">
<form class="form-horizontal" ng-submit="renameAndCloseDialog()">
<div class="modal-header"><h4>Rename Document</h4></div>
<div class="modal-body">
<div class="control-group">
<label class="control-label" for="renameFileName">Name</label>
<div class="controls">
<input type="text" id="renameFileName" ng-model="fileName">
</div>
</div>
<div class="control-group">
<div ng-show="fileExists.exists" class="alert">
Please choose a different name as <b>{{fileExists.name}}</b> already exists
</div>
</div>
</div>
<div class="modal-footer">
<input class="btn btn-primary" type="submit"
ng-disabled="!fileName || fileExists.exists"
value="Rename">
<button class="btn btn-warning cancel" type="button" ng-click="renameDialog.close()">Cancel</button>
</div>
</form>
</div>
</div>