|
@@ -1,33 +1,11 @@
|
1
|
1
|
<%inherit file="local:templates.master"/>
|
2
|
2
|
<%namespace name="POD" file="pboard.templates.pod"/>
|
|
3
|
+<%namespace name="DOC" file="pboard.templates.document-widgets"/>
|
3
|
4
|
|
4
|
5
|
<%def name="title()">
|
5
|
6
|
pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id} / ${current_node.getStatus().label}]
|
6
|
7
|
</%def>
|
7
|
8
|
|
8
|
|
-<%def name="node_treeview_for_set_parent_menu(node_id, node_list, indentation=-1)">
|
9
|
|
- % if indentation==-1:
|
10
|
|
- <li>
|
11
|
|
- <a href="${tg.url('/api/set_parent_node?node_id=%i&new_parent_id=0'%(current_node.node_id))}">
|
12
|
|
- <i class="fa fa-file-text-o"></i> ${_('Home')}
|
13
|
|
- </a>
|
14
|
|
- ${node_treeview_for_set_parent_menu(node_id, node_list, 0)}
|
15
|
|
- </li>
|
16
|
|
- % else:
|
17
|
|
- % if len(node_list)>0:
|
18
|
|
- <ul style="list-style: none;">
|
19
|
|
- % for new_parent_node in node_list:
|
20
|
|
- <li>
|
21
|
|
- <a href="${tg.url('/api/set_parent_node?node_id=%i&new_parent_id=%i'%(node_id, new_parent_node.node_id))}"><i class="fa fa-file-text-o"></i> ${new_parent_node.getTruncatedLabel(40-indentation*2)}
|
22
|
|
- </a>
|
23
|
|
- ${node_treeview_for_set_parent_menu(node_id, new_parent_node.getStaticChildList(), indentation+1)}
|
24
|
|
- </li>
|
25
|
|
- % endfor
|
26
|
|
- </ul>
|
27
|
|
- % endif
|
28
|
|
- % endif
|
29
|
|
-</%def>
|
30
|
|
-
|
31
|
9
|
<%def name="node_treeview(node_list, indentation=-1)">
|
32
|
10
|
% if indentation==-1:
|
33
|
11
|
<div id='pod-menu-item-0' class="pod-toolbar-parent" style="padding-left: 0.5em; position: relative;">
|
|
@@ -91,13 +69,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
91
|
69
|
## HERE COMES THE BREADCRUMB
|
92
|
70
|
##
|
93
|
71
|
<div class="row">
|
94
|
|
-<ul class="breadcrumb span12">
|
95
|
|
- <li><span class="divider"> / Documents /</span></li>
|
96
|
|
- % for breadcrumb_node in current_node.getBreadCrumbNodes():
|
97
|
|
- <li><a href="${tg.url('/document/%s'%(breadcrumb_node.node_id))}">${breadcrumb_node.getTruncatedLabel(30)}</a> <span class="divider">/</span></li>
|
98
|
|
- % endfor
|
99
|
|
- <li class="active">${current_node.data_label}</li>
|
100
|
|
-</ul>
|
|
72
|
+ ${DOC.BreadCrumb(current_node)}
|
101
|
73
|
</div>
|
102
|
74
|
|
103
|
75
|
<div class="row">
|
|
@@ -111,148 +83,27 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
111
|
83
|
<div class="row">
|
112
|
84
|
<div id='application-document-panel' class="span5">
|
113
|
85
|
<div id='current-document-content' class="">
|
114
|
|
-######
|
115
|
|
-##
|
116
|
|
-## CURRENT DOCUMENT TOOLBAR - START
|
117
|
|
-##
|
118
|
|
- <div id="current-document-toobar">
|
119
|
|
- <div class="btn-group">
|
120
|
|
- % if current_node.parent_id!=None and current_node.parent_id!=0:
|
121
|
|
- ${POD.EditButton('current-document-content-edit-button', True)}
|
122
|
|
- % endif
|
123
|
|
- ## </div>
|
124
|
|
- ## <div class="btn-group">
|
125
|
|
- <button class="btn btn-small" data-toggle="dropdown" href="#">
|
126
|
|
- <i class="fa fa-signal"></i>
|
127
|
|
- ${_("Change status")}
|
128
|
|
- </button>
|
129
|
|
- <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
|
130
|
|
- <span class="caret"></span>
|
131
|
|
- </a>
|
132
|
|
- <ul class="dropdown-menu">
|
133
|
|
- % for node_status in node_status_list:
|
134
|
|
- % if node_status.status_id==current_node.getStatus().status_id:
|
135
|
|
- <li title="${h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id)}">
|
136
|
|
- <a class="${node_status.css}" href="#" style="color: #999;">
|
137
|
|
- <i class="${node_status.icon_id}"></i> ${node_status.label}
|
138
|
|
- </a>
|
139
|
|
- </li>
|
140
|
|
- % else:
|
141
|
|
- <li title="${h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id)}">
|
142
|
|
- <a class="${node_status.css}" href="${tg.url('/api/edit_status?node_id=%i&node_status=%s'%(current_node.node_id, node_status.status_id))}">
|
143
|
|
- <i class="${node_status.icon_id}"></i> ${node_status.label}
|
144
|
|
- </a>
|
145
|
|
- </li>
|
146
|
|
- % endif
|
147
|
|
- % endfor
|
148
|
|
- </ul>
|
149
|
|
- </div>
|
150
|
|
- <div class="btn-group">
|
151
|
|
- <button class="btn btn-small btn-success" data-toggle="dropdown" href="#">
|
152
|
|
- <i class="fa fa-plus"></i> ${_('Add')}
|
153
|
|
- </button>
|
154
|
|
- <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
155
|
|
- <ul class="dropdown-menu">
|
156
|
|
-
|
157
|
|
- <li>
|
158
|
|
- <div class="btn-success strong" ><strong><i class="fa fa-magic"></i> Add New...</strong><br/></div>
|
159
|
|
- <div class="pod-grey"><i>create a totally new item...</i></div>
|
160
|
|
- </li>
|
161
|
|
-
|
162
|
|
- <li><a><i class="fa fa-file-text-o"></i> Document</a></li>
|
163
|
|
- <li><a><i class="fa fa-paperclip"></i> File</a></li>
|
164
|
|
- <li><a><i class="fa fa-calendar"></i> Event</a></li>
|
165
|
|
- <li><a><i class="fa fa-user"></i> Contact</a></li>
|
166
|
|
- <li><a><i class="fa fa-comments-o"></i> Comment</a></li>
|
167
|
|
-
|
168
|
|
- <li class="divider" role="presentation"></li>
|
169
|
|
-
|
170
|
|
- <li>
|
171
|
|
- <div class="btn-warning strong" ><strong><i class="fa fa-link"></i> Add Existing...</strong><br/></div>
|
172
|
|
- <div class="pod-grey"><i>link to an existing item...</i></div>
|
173
|
|
- </li>
|
174
|
|
- <li><a><i class="fa fa-file-text-o"></i> Document</a></li>
|
175
|
|
- <li><a><i class="fa fa-paperclip"></i> File</a></li>
|
176
|
|
- <li><a><i class="fa fa-calendar"></i> Event</a></li>
|
177
|
|
- <li><a><i class="fa fa-user"></i> Contact</a></li>
|
178
|
|
- <li><a><i class="fa fa-comments-o"></i> Comment</a></li>
|
179
|
|
-
|
180
|
|
- </ul>
|
181
|
|
- </div>
|
182
|
|
- <div class="btn-group ">
|
183
|
|
- <a
|
184
|
|
- class="btn btn-small btn-warning"
|
185
|
|
- href="#"
|
186
|
|
- data-toggle="dropdown"
|
187
|
|
- title="${_('Move to')}"
|
188
|
|
- ><i class="fa fa-arrows"></i></a>
|
189
|
|
- <ul class="dropdown-menu">
|
190
|
|
- <li >
|
191
|
|
- <div class="btn-warning strong" ><strong><i class="fa fa-magic"></i> ${_("Move the document...")}</strong><br/></div>
|
192
|
|
- <div class="pod-grey"><i>move the document to...</i></div>
|
193
|
|
- </li>
|
194
|
|
- ${node_treeview_for_set_parent_menu(current_node.node_id, root_node_list)}
|
195
|
|
- </ul>
|
196
|
|
- <a
|
197
|
|
- class="btn btn-small btn-danger"
|
198
|
|
- href='${tg.url('/api/edit_status?node_id=%i&node_status=%s'%(current_node.node_id, 'deleted'))}'
|
199
|
|
- id='current-document-force-delete-button' onclick="return confirm('${_('Delete current document?')}');"
|
200
|
|
- title="${_('Delete')}"
|
201
|
|
- ><i class="fa fa-trash-o"></i></a>
|
202
|
|
- </div>
|
203
|
|
- </div>
|
204
|
|
-##
|
205
|
|
-## CURRENT DOCUMENT TOOLBAR - END
|
206
|
|
-##
|
207
|
|
-######
|
208
|
|
-
|
209
|
|
-######
|
210
|
|
-##
|
211
|
|
-## CURRENT DOCUMENT CONTENT - START
|
212
|
|
-##
|
213
|
|
- <h3 id="current-document-title">#${current_node.node_id} - ${current_node.data_label}
|
214
|
|
- <span class="label ${current_node.getStatus().css}" href="#">${current_node.getStatus().label}</a>
|
215
|
|
- </h3>
|
216
|
|
- % if len(keywords)>0 and keywords!='':
|
217
|
|
- ${current_node.getContentWithHighlightedKeywords(keywords.split(), current_node.getContentWithTags())|n}
|
218
|
|
- % else:
|
219
|
|
- ${current_node.getContentWithTags()|n}
|
220
|
|
- % endif
|
|
86
|
+ ######
|
|
87
|
+ ##
|
|
88
|
+ ## CURRENT DOCUMENT TOOLBAR - START
|
|
89
|
+ ##
|
|
90
|
+ ## The Toolbar is a div with a specific id
|
|
91
|
+ ##
|
|
92
|
+ ${DOC.Toolbar(current_node, node_status_list, root_node_list, 'current-document-toobar')}
|
|
93
|
+ ${DOC.ShowTitle(current_node, keywords, 'current-document-title')}
|
|
94
|
+ ${DOC.ShowContent(current_node, keywords)}
|
221
|
95
|
</div>
|
222
|
|
- <form style='display: none;' id="current-document-content-edit-form" method='post' action='${tg.url('/api/edit_label_and_content')}'>
|
223
|
|
- <div>
|
224
|
|
- ${POD.CancelButton('current-document-content-edit-cancel-button-top', True)}
|
225
|
|
- ${POD.SaveButton('current-document-content-edit-save-button-top', True)}
|
226
|
|
- </div>
|
227
|
|
- <div style="padding: 0.5em 0 0 0">
|
228
|
|
- <input type='hidden' name='node_id' value='${current_node.node_id}'/>
|
229
|
|
- <input type="hidden" name='data_content' id="current_node_textarea" />
|
230
|
|
- <input type='text' name='data_label' value='${current_node.data_label}' class="span4" placeholder="document title" />
|
231
|
|
- </div>
|
232
|
|
- <div>
|
233
|
|
- ${POD.RichTextEditor('current_node_textarea_wysiwyg', current_node.data_content)}
|
234
|
|
- </div>
|
235
|
|
- <div class="pull-right">
|
236
|
|
- ${POD.CancelButton('current-document-content-edit-cancel-button', True)}
|
237
|
|
- ${POD.SaveButton('current-document-content-edit-save-button', True)}
|
238
|
|
- </div>
|
239
|
|
- </form>
|
|
96
|
+ ${DOC.EditForm(current_node)}
|
240
|
97
|
</div>
|
241
|
|
- ## FIXME - D.A - 2013-11-07 - The following div should be span4 instead of span3 but some bug make it impossible
|
242
|
98
|
<div id='application-metadata-panel' class="span4">
|
243
|
99
|
<div class="tabbable">
|
244
|
|
- <ul class="nav nav-tabs">
|
245
|
|
- <li><a href="#subdocuments" data-toggle="tab" title="${_('Subdocuments')}"><i class='pod-dark-grey fa fa-file-text-o'></i>
|
246
|
|
-
|
247
|
|
- ${POD.ItemNb(current_node.getChildren())}</a></li>
|
248
|
|
-
|
249
|
|
- <li class="active"><a href="#events" data-toggle="tab" title="${_('Calendar')}"><i class="pod-dark-grey fa fa-calendar"></i>${POD.ItemNb(current_node.getEvents())}</a></li>
|
250
|
|
- <li><a href="#contacts" data-toggle="tab" title="${_('Address book')}"><i class="pod-dark-grey fa fa-user"></i>${POD.ItemNb(current_node.getContacts())}</a></li>
|
251
|
|
- <li><a href="#comments" data-toggle="tab" title="${_('Comment thread')}"><i class="pod-dark-grey fa fa-comments-o"></i>${POD.ItemNb(current_node.getComments())}</a></li>
|
252
|
|
- <li><a href="#files" data-toggle="tab" title="${_('Attachments')}"><i class="pod-dark-grey fa fa-paperclip"></i>${POD.ItemNb(current_node.getFiles())}</a></li>
|
253
|
|
-
|
254
|
|
- <li class="pull-right"><a href="#accessmanagement" data-toggle="tab" title="${_('Access Management')}"><i class="pod-dark-grey fa fa-key"></i>${POD.ItemNb(current_node.getFiles())}</a></li>
|
255
|
|
-
|
|
100
|
+ <ul class="nav nav-tabs" style="margin-bottom: 0.5em;">
|
|
101
|
+ <li>${DOC.MetadataTab('#subdocuments', 'tab', _('Subdocuments'), 'fa-file-text-o', current_node.getChildren())}</li>
|
|
102
|
+ <li class="active">${DOC.MetadataTab('#events', 'tab', _('Calendar'), 'fa-calendar', current_node.getEvents())}</li>
|
|
103
|
+ <li>${DOC.MetadataTab('#contacts', 'tab', _('Address book'), 'fa-user', current_node.getContacts())}</li>
|
|
104
|
+ <li>${DOC.MetadataTab('#comments', 'tab', _('Comment thread'), 'fa-comments-o', current_node.getComments())}</li>
|
|
105
|
+ <li>${DOC.MetadataTab('#files', 'tab', _('Attachments'), 'fa-paperclip', current_node.getFiles())}</li>
|
|
106
|
+ <li class="pull-right">${DOC.MetadataTab('#accessmanagement', 'tab', _('Access Management'), 'fa-key', [])}</li>
|
256
|
107
|
</ul>
|
257
|
108
|
<div class="tab-content">
|
258
|
109
|
################################
|
|
@@ -262,11 +113,13 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
262
|
113
|
################################
|
263
|
114
|
<!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment -->
|
264
|
115
|
<div class="tab-pane" id="subdocuments">
|
|
116
|
+ <p><strong>Sub-documents</strong></p>
|
265
|
117
|
% if len(current_node.getChildren())<=0:
|
266
|
118
|
<p class="pod-grey">
|
267
|
119
|
${_("There is currently no child documents.")}<br/>
|
268
|
120
|
</p>
|
269
|
121
|
<p>
|
|
122
|
+
|
270
|
123
|
<a class="btn btn-success btn-small" href="${tg.url('/api/create_document?parent_id=%i'%current_node.node_id)}">
|
271
|
124
|
<i class="fa fa-plus"></i> ${_("Add one")}
|
272
|
125
|
</a>
|
|
@@ -274,7 +127,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
274
|
127
|
% else:
|
275
|
128
|
<p>
|
276
|
129
|
<a class="btn btn-success btn-small" href="${tg.url('/api/create_document?parent_id=%i'%current_node.node_id)}">
|
277
|
|
- <i class="fa fa-plus"></i> ${_("Add new document")}
|
|
130
|
+ <i class="fa fa-plus"></i> ${_("Add one")}
|
278
|
131
|
</a>
|
279
|
132
|
</p>
|
280
|
133
|
|
|
@@ -297,6 +150,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
297
|
150
|
##
|
298
|
151
|
################################
|
299
|
152
|
<div class="tab-pane active" id="events">
|
|
153
|
+ <p><strong>Calendar</strong></p>
|
300
|
154
|
% if len(current_node.getEvents())<=0:
|
301
|
155
|
<p class="pod-grey">${_("The calendar is empty.")}<br/></p>
|
302
|
156
|
<p>${POD.AddButton('current-document-add-event-button', True, _(' Add first event'))}</p>
|
|
@@ -373,6 +227,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
373
|
227
|
##
|
374
|
228
|
##############################
|
375
|
229
|
<div class="tab-pane" id="contacts">
|
|
230
|
+ <p><strong>${_('Address book')}</strong></p>
|
376
|
231
|
% if len(current_node.getContacts())<=0:
|
377
|
232
|
<p class="pod-grey">${_("The address book is empty.")}<br/></p>
|
378
|
233
|
<p>${POD.AddButton('current-document-add-contact-button', True, _(' Add first contact'), True)}</p>
|
|
@@ -414,8 +269,6 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
414
|
269
|
</div>
|
415
|
270
|
</div>
|
416
|
271
|
% endfor
|
417
|
|
-
|
418
|
|
-
|
419
|
272
|
</div>
|
420
|
273
|
################################
|
421
|
274
|
##
|
|
@@ -423,6 +276,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
423
|
276
|
##
|
424
|
277
|
################################
|
425
|
278
|
<div class="tab-pane" id="comments">
|
|
279
|
+ <p><strong>${_('Comment thread')}</strong></p>
|
426
|
280
|
% if len(current_node.getComments())<=0:
|
427
|
281
|
<p class="pod-grey">${_("The comment thread is empty.")}<br/></p>
|
428
|
282
|
<p>${POD.AddButton('current-document-add-comment-button', True, _('Add first comment'), True)}</p>
|
|
@@ -475,6 +329,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
475
|
329
|
##
|
476
|
330
|
################################
|
477
|
331
|
<div class="tab-pane" id="files">
|
|
332
|
+ <p><strong>${_('Attachments')}</strong></p>
|
478
|
333
|
% if len(current_node.getFiles())<=0:
|
479
|
334
|
<p class="pod-grey">${_("There is currently no attachment.")}<br/></p>
|
480
|
335
|
<p>${POD.AddButton('current-document-add-file-button', True, _(' Attach first file'))}</p>
|
|
@@ -538,9 +393,6 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
538
|
393
|
<div class="tab-pane" id="accessmanagement">
|
539
|
394
|
blabla
|
540
|
395
|
</div>
|
541
|
|
-
|
542
|
|
-
|
543
|
|
-
|
544
|
396
|
</div>
|
545
|
397
|
</div>
|
546
|
398
|
</div>
|