|
@@ -18,13 +18,14 @@
|
18
|
18
|
<a href="${tg.url('/document')}" title="${_('Root')}">
|
19
|
19
|
${_('Root')}
|
20
|
20
|
</a>
|
21
|
|
- <div class="pod-toolbar">
|
22
|
|
- <a href="${tg.url('/api/create_document?parent_id=0')}" title="${_('Add child document')}"><i class="fa fa-plus-circle"></i></a>
|
23
|
|
- </div>
|
24
|
21
|
</div>
|
25
|
22
|
<div id="pod-menu-item-0-children">${node_treeview(node_list, 0)}</div>
|
26
|
23
|
|
27
|
24
|
% else:
|
|
25
|
+ % if len(node_list)<=0 and indentation==0:
|
|
26
|
+ <p class="pod-grey">${_('You have no document yet.')}</p>
|
|
27
|
+ % endif
|
|
28
|
+
|
28
|
29
|
% if len(node_list)>0:
|
29
|
30
|
% for node in node_list:
|
30
|
31
|
<div id='pod-menu-item-${node.node_id}' class="pod-toolbar-parent ${'pod-status-active' if current_node!=None and node.node_id==current_node.node_id else ''}" style="padding-left: ${(indentation+2)*0.5}em; position: relative;">
|
|
@@ -41,7 +42,6 @@
|
41
|
42
|
<div class="pod-toolbar">
|
42
|
43
|
<a href="${tg.url('/api/move_node_upper?node_id=%i'%(node.node_id))}" title="${_('Move up')}"><i class="fa fa-arrow-up"></i></a>
|
43
|
44
|
<a href="${tg.url('/api/move_node_lower?node_id=%i'%(node.node_id))}" title="${_('Move down')}"><i class="fa fa-arrow-down"></i></a>
|
44
|
|
- <a href="${tg.url('/api/create_document?parent_id=%i'%(node.node_id))}" title="${_('Add child document')}"><i class="fa fa-plus-circle"></i></a>
|
45
|
45
|
</div>
|
46
|
46
|
<div class="pod-status ${node.getStatus().css}" title='${node.getStatus().label}'>
|
47
|
47
|
<i class='${node.getStatus().icon}'></i>
|
|
@@ -107,6 +107,15 @@
|
107
|
107
|
${DOC.EditForm(current_node)}
|
108
|
108
|
</div>
|
109
|
109
|
<div id='application-metadata-panel' class="span4">
|
|
110
|
+ ######
|
|
111
|
+ ##
|
|
112
|
+ ## HERE WE INCLUDE ALL MODAL DIALOG WHICH WILL BE ACCESSIBLE THROUGH TABS OR MENU
|
|
113
|
+ ##
|
|
114
|
+ ${DOC.DocumentEditModalDialog(current_node.node_id, None, tg.url('/api/create_document'), h.ID.AddDocumentModalForm(current_node), _('New Sub-document'))}
|
|
115
|
+ ${DOC.EventEditModalDialog(current_node.node_id, None, tg.url('/api/create_event'), h.ID.AddEventModalForm(current_node), _('Add an event'))}
|
|
116
|
+ ${DOC.ContactEditModalDialog(current_node.node_id, None, tg.url('/api/create_contact'), h.ID.AddContactModalForm(current_node), _('Add a new contact'))}
|
|
117
|
+ ${DOC.FileEditModalDialog(current_node.node_id, None, tg.url('/api/create_file'), h.ID.AddFileModalForm(current_node), _('Add a new file'))}
|
|
118
|
+
|
110
|
119
|
<div class="tabbable">
|
111
|
120
|
<ul class="nav nav-tabs" style="margin-bottom: 0em;">
|
112
|
121
|
<li>${DOC.MetadataTab('#subdocuments', 'tab', _('Subdocuments'), 'fa-file-text-o', current_node.getChildren())}</li>
|
|
@@ -116,303 +125,18 @@
|
116
|
125
|
<li>${DOC.MetadataTab('#files', 'tab', _('Attachments'), 'fa-paperclip', current_node.getFiles())}</li>
|
117
|
126
|
<li class="pull-right">${DOC.MetadataTab('#accessmanagement', 'tab', _('Access Management'), 'fa-key', [])}</li>
|
118
|
127
|
</ul>
|
|
128
|
+ ################################
|
|
129
|
+ ##
|
|
130
|
+ ## PANEL SHOWING ASSOCIATED DATA AND METADATA
|
|
131
|
+ ##
|
|
132
|
+ ################################
|
119
|
133
|
<div class="tab-content">
|
120
|
|
- ################################
|
121
|
|
- ##
|
122
|
|
- ## PANEL SHOWING LIST OF SUB DOCUMENTS
|
123
|
|
- ##
|
124
|
|
- ################################
|
125
|
|
- <!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment -->
|
126
|
|
- <div class="tab-pane" id="subdocuments">
|
127
|
|
- <h4>${_('Sub-documents')}</h4>
|
128
|
|
- ${DOC.DocumentEditModalDialog(current_node.node_id, None, tg.url('/api/create_document'), 'add-subdocument-modal-%i'%current_node.node_id, _('New Sub-document'))}
|
129
|
|
-
|
130
|
|
- % if len(current_node.getChildren())<=0:
|
131
|
|
- <p class="pod-grey">
|
132
|
|
- ${_("There is currently no child documents.")}<br/>
|
133
|
|
- </p>
|
134
|
|
- <p>
|
135
|
|
- <a href="#add-subdocument-modal-${current_node.node_id}" role="button" class="btn btn-success btn-small" data-toggle="modal">
|
136
|
|
- <i class="fa fa-plus"></i>
|
137
|
|
- ${_("Add one")}
|
138
|
|
- </a>
|
139
|
|
- </p>
|
140
|
|
- % else:
|
141
|
|
- <p>
|
142
|
|
- <a href="#add-subdocument-modal-${current_node.node_id}" role="button" class="btn btn-success btn-small" data-toggle="modal">
|
143
|
|
- <i class="fa fa-plus"></i> ${_("Add one")}
|
144
|
|
- </a>
|
145
|
|
- </p>
|
146
|
|
-
|
147
|
|
- <div>
|
148
|
|
- % for subnode in current_node.getChildren():
|
149
|
|
- <p style="list-style-type:none;">
|
150
|
|
- <i class="fa-fw ${subnode.getIconClass()}"></i>
|
151
|
|
- <a href="${tg.url('/document/%i'%subnode.node_id)}">
|
152
|
|
- ${subnode.data_label}
|
153
|
|
- </a>
|
154
|
|
- </p>
|
155
|
|
- % endfor
|
156
|
|
- </div>
|
157
|
|
- % endif
|
158
|
|
- </div>
|
159
|
|
-
|
160
|
|
- ################################
|
161
|
|
- ##
|
162
|
|
- ## PANEL SHOWING LIST OF EVENTS
|
163
|
|
- ##
|
164
|
|
- ################################
|
165
|
|
- <div class="tab-pane active" id="events">
|
166
|
|
- <h4>${_('Calendar')}</h4>
|
167
|
|
- % if len(current_node.getEvents())<=0:
|
168
|
|
- <p class="pod-grey">${_("The calendar is empty.")}<br/></p>
|
169
|
|
- <p>${POD.AddButton('current-document-add-event-button', True, _(' Add first event'))}</p>
|
170
|
|
- % else:
|
171
|
|
- <p>${POD.AddButton('current-document-add-event-button', True, _(' Add an event'))}</p>
|
172
|
|
- % endif
|
173
|
|
-
|
174
|
|
- <form style='display: none;' id='current-document-add-event-form' action='${tg.url('/api/create_event')}' method='post' class="well">
|
175
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
176
|
|
- <fieldset>
|
177
|
|
- <legend>Add an event</legend>
|
178
|
|
- <label>
|
179
|
|
- <input type="text" name='data_label' placeholder="Event"/>
|
180
|
|
- </label>
|
181
|
|
- <label>
|
182
|
|
- <div class="datetime-picker-input-div input-append date">
|
183
|
|
- <input name='data_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
|
184
|
|
- <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
|
185
|
|
- </div>
|
186
|
|
- </label>
|
187
|
|
- <label>
|
188
|
|
- <div>
|
189
|
|
- <input type="hidden" id="add_event_data_content_textarea" name='data_content' />
|
190
|
|
- ${POD.RichTextEditor('add_event_data_content_textarea_wysiwyg', '', 'boldanditalic|undoredo|fullscreen')}
|
191
|
|
- </div>
|
192
|
|
- </label>
|
193
|
|
- <label class="checkbox">
|
194
|
|
- <input disabled name='add_reminder' type="checkbox"> add a reminder
|
195
|
|
- </label>
|
196
|
|
- <label>
|
197
|
|
- <div class="datetime-picker-input-div input-append date">
|
198
|
|
- <input disabled name='data_reminder_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
|
199
|
|
- <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
|
200
|
|
- </div>
|
201
|
|
- </label>
|
202
|
|
-
|
203
|
|
-
|
204
|
|
- ${POD.CancelButton('current-document-add-event-cancel-button', True)}
|
205
|
|
- ${POD.SaveButton('current-document-add-event-save-button', True)}
|
206
|
|
- </fieldset>
|
207
|
|
- </form>
|
208
|
|
-
|
209
|
|
- % if len(current_node.getEvents())>0:
|
210
|
|
- <table class="table table-striped table-hover table-condensed">
|
211
|
|
- <thead>
|
212
|
|
- <tr>
|
213
|
|
- <th>Date</th>
|
214
|
|
- <th>Time</th>
|
215
|
|
- <th>
|
216
|
|
- Event
|
217
|
|
- </th>
|
218
|
|
- <th>
|
219
|
|
- <a href="" title="Add an event"><i class="icon-g-plus"></i></a>
|
220
|
|
- </th>
|
221
|
|
- </tr>
|
222
|
|
- </thead>
|
223
|
|
- % for event in current_node.getEvents():
|
224
|
|
- <tr class="item-with-data-popoverable" data-content="${event.data_content}" rel="popover" data-placement="left" data-trigger="hover">
|
225
|
|
- <td>${event.getFormattedDate(event.data_datetime)}</td>
|
226
|
|
- <td>${event.getFormattedTime(event.data_datetime)}</td>
|
227
|
|
- <td>${event.data_label}</td>
|
228
|
|
- </tr>
|
229
|
|
- ## FIXME <script>
|
230
|
|
- ## $('.item-with-data-popoverable').popover({ html: true});
|
231
|
|
- ## </script>
|
232
|
|
-
|
233
|
|
- % endfor
|
234
|
|
- </table>
|
235
|
|
- % endif
|
236
|
|
- </div>
|
237
|
|
- ##############################
|
238
|
|
- ##
|
239
|
|
- ## PANEL SHOWING LIST OF CONTACTS
|
240
|
|
- ##
|
241
|
|
- ##############################
|
242
|
|
- <div class="tab-pane" id="contacts">
|
243
|
|
- <h4>${_('Address book')}</h4>
|
244
|
|
- % if len(current_node.getContacts())<=0:
|
245
|
|
- <p class="pod-grey">${_("The address book is empty.")}<br/></p>
|
246
|
|
- <p>${POD.AddButton('current-document-add-contact-button', True, _(' Add first contact'), True)}</p>
|
247
|
|
- % else:
|
248
|
|
- <p>${POD.AddButton('current-document-add-contact-button', True, _(' Add a contact'))}</p>
|
249
|
|
- % endif
|
250
|
|
-
|
251
|
|
- <!-- ADD CONTACT FORM -->
|
252
|
|
- <form style='display: none;' id='current-document-add-contact-form' action='${tg.url('/api/create_contact')}' method='post' class="well">
|
253
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
254
|
|
- <fieldset>
|
255
|
|
- <legend>${_('Add a contact')}</legend>
|
256
|
|
- <label>
|
257
|
|
- <input type="text" name='data_label' placeholder="Title"/>
|
258
|
|
- </label>
|
259
|
|
- <label>
|
260
|
|
- <div>
|
261
|
|
- <input type="hidden" id="add_contact_data_content_textarea" name='data_content' />
|
262
|
|
- ${POD.RichTextEditor('add_contact_data_content_textarea_wysiwyg', '', 'boldanditalic|undoredo|fullscreen')}
|
263
|
|
- </div>
|
264
|
|
- </label>
|
265
|
|
- ${POD.CancelButton('current-document-add-contact-cancel-button', True)}
|
266
|
|
- ${POD.SaveButton('current-document-add-contact-save-button', True)}
|
267
|
|
- </fieldset>
|
268
|
|
- </form>
|
269
|
|
-
|
270
|
|
- <!-- LIST OF CONTACT NODES -->
|
271
|
|
- % for contact in current_node.getContacts():
|
272
|
|
- <div class="well">
|
273
|
|
- <legend class="text-info">
|
274
|
|
- ${contact.data_label}
|
275
|
|
- ## TODO - 2013-11-20 - Use the right form in order to update meta-data
|
276
|
|
- <a class="pull-right" href="${tg.url('/document/%i'%contact.node_id)}"><i class="fa fa-edit"></i></a>
|
277
|
|
- </legend>
|
278
|
|
-
|
279
|
|
- <div>
|
280
|
|
- ## FIXME - D.A. - 2013-11-15 - Implement localisation stuff <a style='float: right;' href="" title='${_('Search on google maps')}'><i class='icon-g-google-maps'></i></a>
|
281
|
|
- ${contact.data_content|n}
|
282
|
|
- </div>
|
283
|
|
- </div>
|
284
|
|
- % endfor
|
285
|
|
- </div>
|
286
|
|
- ################################
|
287
|
|
- ##
|
288
|
|
- ## PANEL SHOWING LIST OF COMMENTS
|
289
|
|
- ##
|
290
|
|
- ################################
|
291
|
|
- <div class="tab-pane" id="comments" style="margin: 0;">
|
292
|
|
- <h4>${_('Comment thread')}</h4>
|
293
|
|
- % if len(current_node.getComments())<=0:
|
294
|
|
- <p class="pod-grey">${_("The comment thread is empty.")}<br/></p>
|
295
|
|
- % endif
|
296
|
|
- <!-- LIST OF COMMENTS -->
|
297
|
|
- % if len(current_node.getComments())>0:
|
298
|
|
- <div>
|
299
|
|
- % for comment in current_node.getComments():
|
300
|
|
- <p>
|
301
|
|
- <a href="${tg.url('/api/toggle_share_status', dict(node_id=comment.node_id))}">
|
302
|
|
- % if comment.is_shared:
|
303
|
|
- <span class="label label-warning" title="${_('Shared comment. Click to make private.')}"><i class="fa fa-group"></i></span>
|
304
|
|
- % else:
|
305
|
|
- <span class="label label-info" title="${_('Private comment. Click to share.')}"><i class="fa fa-key"></i></span>
|
306
|
|
- % endif
|
307
|
|
- </a>
|
308
|
|
- <strong>${comment._oOwner.display_name}</strong>
|
309
|
|
- <i class="pull-right">
|
310
|
|
- The ${comment.getFormattedDate(comment.updated_at)}
|
311
|
|
- at ${comment.getFormattedTime(comment.updated_at)}
|
312
|
|
- </i>
|
313
|
|
- <br/>
|
314
|
|
- ${comment.data_content|n}
|
315
|
|
- <hr style="border-top: 1px dotted #ccc; margin: 0;"/>
|
316
|
|
- </p>
|
317
|
|
- % endfor
|
318
|
|
- </div>
|
319
|
|
- % endif
|
320
|
|
-
|
321
|
|
- <!-- ADD COMMENT FORM -->
|
322
|
|
- <form class="form" id='current-document-add-comment-form' action='${tg.url('/api/create_comment')}' method='post'>
|
323
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
324
|
|
- <input type="hidden" name='data_label' value=""/>
|
325
|
|
- <input type="hidden" id="add_comment_data_content_textarea" name='data_content' />
|
326
|
|
- ${POD.RichTextEditor('add_comment_data_content_textarea_wysiwyg', '', '')}
|
327
|
|
- <label>
|
328
|
|
- <input type="checkbox" name='is_shared'/> ${_('Share this comment')}
|
329
|
|
- </label>
|
330
|
|
- <span class="pull-right">
|
331
|
|
- % if len(current_node.getComments())<=0:
|
332
|
|
- ${POD.SaveButton('current-document-add-comment-save-button', True, _('Add first comment'))}
|
333
|
|
- % else:
|
334
|
|
- ${POD.SaveButton('current-document-add-comment-save-button', True, _('Comment'))}
|
335
|
|
- % endif
|
336
|
|
- </span>
|
337
|
|
- </form>
|
338
|
|
-
|
339
|
|
- </div>
|
340
|
|
- ################################
|
341
|
|
- ##
|
342
|
|
- ## PANEL SHOWING LIST OF FILES
|
343
|
|
- ##
|
344
|
|
- ################################
|
345
|
|
- <div class="tab-pane" id="files">
|
346
|
|
- ${DOCTABS.FilesTabContent(current_node)}
|
347
|
|
- </div>
|
348
|
|
-
|
349
|
|
- <div class="tab-pane" id="files">
|
350
|
|
- <h4>${_('Attachments')}</h4>
|
351
|
|
- % if len(current_node.getFiles())<=0:
|
352
|
|
- <p class="pod-grey">${_("There is currently no attachment.")}<br/></p>
|
353
|
|
- <p>${POD.AddButton('current-document-add-file-button', True, _(' Attach first file'))}</p>
|
354
|
|
- % else:
|
355
|
|
- <p>${POD.AddButton('current-document-add-file-button', True, _(' Attach a file'))}</p>
|
356
|
|
- % endif
|
357
|
|
-
|
358
|
|
- <!-- ADD FILE FORM -->
|
359
|
|
- <form style='display: none;' id='current-document-add-file-form' enctype="multipart/form-data" action='${tg.url('/api/create_file')}' method='post' class="well">
|
360
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
361
|
|
- <fieldset>
|
362
|
|
- <legend>${_('Add a file')}</legend>
|
363
|
|
- <label>
|
364
|
|
- <input type="text" name='data_label' placeholder="Title"/>
|
365
|
|
- </label>
|
366
|
|
- <label>
|
367
|
|
- <input type="file" name='data_file' placeholder="choose a file..."/>
|
368
|
|
- </label>
|
369
|
|
- <label>
|
370
|
|
- <div>
|
371
|
|
- <input type="hidden" id="add_file_data_content_textarea" name='data_content' />
|
372
|
|
- ${POD.RichTextEditor('add_file_data_content_textarea_wysiwyg', '', 'boldanditalic|undoredo|fullscreen')}
|
373
|
|
- </div>
|
374
|
|
- </label>
|
375
|
|
- ${POD.CancelButton('current-document-add-file-cancel-button', True)}
|
376
|
|
- ${POD.SaveButton('current-document-add-file-save-button', True)}
|
377
|
|
- </fieldset>
|
378
|
|
- </form>
|
379
|
|
-
|
380
|
|
- <!-- LIST OF FILES -->
|
381
|
|
- <div>
|
382
|
|
- % if len(current_node.getFiles())>0:
|
383
|
|
- % for current_file in current_node.getFiles():
|
384
|
|
- <p style="list-style-type:none; margin-bottom: 0.5em;">
|
385
|
|
- <i class="fa fa-paperclip"></i>
|
386
|
|
- <a
|
387
|
|
- href="${tg.url('/document/%i'%current_file.node_id)}"
|
388
|
|
- title="${_('View the attachment')}: ${current_file.data_label}"
|
389
|
|
- >
|
390
|
|
- ${current_file.getTruncatedLabel(50)}
|
391
|
|
- </a>
|
392
|
|
- <a
|
393
|
|
- class="pull-right"
|
394
|
|
- href="${tg.url('/api/get_file_content/%s'%(current_file.node_id))}"
|
395
|
|
- title="${_('View the attachment')}"
|
396
|
|
- >
|
397
|
|
- <i class="fa fa-download"></i>
|
398
|
|
- </a>
|
399
|
|
- </p>
|
400
|
|
- % endfor
|
401
|
|
- % endif
|
402
|
|
- </div>
|
403
|
|
- </div>
|
404
|
|
-
|
405
|
|
-
|
406
|
|
- ################################
|
407
|
|
- ##
|
408
|
|
- ## PANEL SHOWING ACCESS MANAGEMENT
|
409
|
|
- ##
|
410
|
|
- ################################
|
411
|
|
-
|
412
|
|
- <div class="tab-pane" id="accessmanagement">
|
413
|
|
- ${DOCTABS.AccessManagementTab(current_node)}
|
414
|
|
- </div>
|
415
|
|
- </div>
|
|
134
|
+ <div class="tab-pane" id="subdocuments">${DOCTABS.SubdocumentContent(current_node)}</div>
|
|
135
|
+ <div class="tab-pane active" id="events">${DOCTABS.EventTabContent(current_node)}</div>
|
|
136
|
+ <div class="tab-pane" id="contacts">${DOCTABS.ContactTabContent(current_node)}</div>
|
|
137
|
+ <div class="tab-pane" id="comments">${DOCTABS.CommentTabContent(current_node)}</div>
|
|
138
|
+ <div class="tab-pane" id="files">${DOCTABS.FileTabContent(current_node)}</div>
|
|
139
|
+ <div class="tab-pane" id="accessmanagement">${DOCTABS.AccessManagementTab(current_node)}</div>
|
416
|
140
|
</div>
|
417
|
141
|
</div>
|
418
|
142
|
</div>
|