|
@@ -1,16 +1,21 @@
|
1
|
1
|
<%inherit file="local:templates.master"/>
|
2
|
2
|
<%namespace name="POD" file="pboard.templates.pod"/>
|
3
|
3
|
<%namespace name="DOC" file="pboard.templates.document-widgets"/>
|
|
4
|
+<%namespace name="DOCTABS" file="pboard.templates.document-widgets-tabs"/>
|
4
|
5
|
|
5
|
6
|
<%def name="title()">
|
6
|
|
-pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id} / ${current_node.getStatus().label}]
|
|
7
|
+ % if current_node!=None:
|
|
8
|
+ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id} / ${current_node.getStatus().label}]
|
|
9
|
+ % else:
|
|
10
|
+ pod :: document root
|
|
11
|
+ % endif
|
7
|
12
|
</%def>
|
8
|
13
|
|
9
|
14
|
<%def name="node_treeview(node_list, indentation=-1)">
|
10
|
15
|
% if indentation==-1:
|
11
|
16
|
<div id='pod-menu-item-0' class="pod-toolbar-parent" style="padding-left: 0.5em; position: relative;">
|
12
|
17
|
<a class="toggle-child-menu-items"><i class='fa fa-folder-open'></i></a>
|
13
|
|
- <a href="?node=0" title="${_('Root')}">
|
|
18
|
+ <a href="${tg.url('/document')}" title="${_('Root')}">
|
14
|
19
|
${_('Root')}
|
15
|
20
|
</a>
|
16
|
21
|
<div class="pod-toolbar">
|
|
@@ -22,7 +27,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
22
|
27
|
% else:
|
23
|
28
|
% if len(node_list)>0:
|
24
|
29
|
% for node in node_list:
|
25
|
|
- <div id='pod-menu-item-${node.node_id}' class="pod-toolbar-parent ${'pod-status-active' if node.node_id==current_node.node_id else ''}" style="padding-left: ${(indentation+2)*0.5}em; position: relative;">
|
|
30
|
+ <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;">
|
26
|
31
|
<a class="toggle-child-menu-items"><i class='${node.getIconClass()}'></i></a>
|
27
|
32
|
<a href="${tg.url('/document/%s'%(node.node_id))}" title="${node.data_label}">
|
28
|
33
|
% if node.getStatus().status_family=='closed' or node.getStatus().status_family=='invisible':
|
|
@@ -80,6 +85,12 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
80
|
85
|
</div>
|
81
|
86
|
<div id='application-main-panel' class="span9">
|
82
|
87
|
|
|
88
|
+ % if current_node==None:
|
|
89
|
+ <div class="row">
|
|
90
|
+ ${DOC.FirstTimeFakeDocument()}
|
|
91
|
+ </div>
|
|
92
|
+
|
|
93
|
+ % else:
|
83
|
94
|
<div class="row">
|
84
|
95
|
<div id='application-document-panel' class="span5">
|
85
|
96
|
<div id='current-document-content' class="">
|
|
@@ -97,7 +108,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
97
|
108
|
</div>
|
98
|
109
|
<div id='application-metadata-panel' class="span4">
|
99
|
110
|
<div class="tabbable">
|
100
|
|
- <ul class="nav nav-tabs" style="margin-bottom: 0.5em;">
|
|
111
|
+ <ul class="nav nav-tabs" style="margin-bottom: 0em;">
|
101
|
112
|
<li>${DOC.MetadataTab('#subdocuments', 'tab', _('Subdocuments'), 'fa-file-text-o', current_node.getChildren())}</li>
|
102
|
113
|
<li class="active">${DOC.MetadataTab('#events', 'tab', _('Calendar'), 'fa-calendar', current_node.getEvents())}</li>
|
103
|
114
|
<li>${DOC.MetadataTab('#contacts', 'tab', _('Address book'), 'fa-user', current_node.getContacts())}</li>
|
|
@@ -113,20 +124,22 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
113
|
124
|
################################
|
114
|
125
|
<!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment -->
|
115
|
126
|
<div class="tab-pane" id="subdocuments">
|
116
|
|
- <p><strong>Sub-documents</strong></p>
|
|
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
|
+
|
117
|
130
|
% if len(current_node.getChildren())<=0:
|
118
|
131
|
<p class="pod-grey">
|
119
|
132
|
${_("There is currently no child documents.")}<br/>
|
120
|
133
|
</p>
|
121
|
134
|
<p>
|
122
|
|
-
|
123
|
|
- <a class="btn btn-success btn-small" href="${tg.url('/api/create_document?parent_id=%i'%current_node.node_id)}">
|
124
|
|
- <i class="fa fa-plus"></i> ${_("Add one")}
|
|
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")}
|
125
|
138
|
</a>
|
126
|
139
|
</p>
|
127
|
140
|
% else:
|
128
|
141
|
<p>
|
129
|
|
- <a class="btn btn-success btn-small" href="${tg.url('/api/create_document?parent_id=%i'%current_node.node_id)}">
|
|
142
|
+ <a href="#add-subdocument-modal-${current_node.node_id}" role="button" class="btn btn-success btn-small" data-toggle="modal">
|
130
|
143
|
<i class="fa fa-plus"></i> ${_("Add one")}
|
131
|
144
|
</a>
|
132
|
145
|
</p>
|
|
@@ -150,7 +163,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
150
|
163
|
##
|
151
|
164
|
################################
|
152
|
165
|
<div class="tab-pane active" id="events">
|
153
|
|
- <p><strong>Calendar</strong></p>
|
|
166
|
+ <h4>${_('Calendar')}</h4>
|
154
|
167
|
% if len(current_node.getEvents())<=0:
|
155
|
168
|
<p class="pod-grey">${_("The calendar is empty.")}<br/></p>
|
156
|
169
|
<p>${POD.AddButton('current-document-add-event-button', True, _(' Add first event'))}</p>
|
|
@@ -227,7 +240,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
227
|
240
|
##
|
228
|
241
|
##############################
|
229
|
242
|
<div class="tab-pane" id="contacts">
|
230
|
|
- <p><strong>${_('Address book')}</strong></p>
|
|
243
|
+ <h4>${_('Address book')}</h4>
|
231
|
244
|
% if len(current_node.getContacts())<=0:
|
232
|
245
|
<p class="pod-grey">${_("The address book is empty.")}<br/></p>
|
233
|
246
|
<p>${POD.AddButton('current-document-add-contact-button', True, _(' Add first contact'), True)}</p>
|
|
@@ -275,53 +288,54 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
275
|
288
|
## PANEL SHOWING LIST OF COMMENTS
|
276
|
289
|
##
|
277
|
290
|
################################
|
278
|
|
- <div class="tab-pane" id="comments">
|
279
|
|
- <p><strong>${_('Comment thread')}</strong></p>
|
|
291
|
+ <div class="tab-pane" id="comments" style="margin: 0;">
|
|
292
|
+ <h4>${_('Comment thread')}</h4>
|
280
|
293
|
% if len(current_node.getComments())<=0:
|
281
|
294
|
<p class="pod-grey">${_("The comment thread is empty.")}<br/></p>
|
282
|
|
- <p>${POD.AddButton('current-document-add-comment-button', True, _('Add first comment'), True)}</p>
|
283
|
|
- % else:
|
284
|
|
- <p>${POD.AddButton('current-document-add-comment-button', True, _('Add a comment'))}</p>
|
285
|
295
|
% endif
|
286
|
|
-
|
287
|
|
- <!-- ADD COMMENT FORM -->
|
288
|
|
- <form style='display: none;' id='current-document-add-comment-form' action='${tg.url('/api/create_comment')}' method='post' class="well">
|
289
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
290
|
|
- <fieldset>
|
291
|
|
- <legend>${_('Add a comment')}</legend>
|
292
|
|
- <label>
|
293
|
|
- <input type="text" name='data_label' placeholder="Title"/>
|
294
|
|
- </label>
|
295
|
|
- <label>
|
296
|
|
- <div>
|
297
|
|
- <input type="hidden" id="add_comment_data_content_textarea" name='data_content' />
|
298
|
|
- ${POD.RichTextEditor('add_comment_data_content_textarea_wysiwyg', '', 'boldanditalic|undoredo|fullscreen')}
|
299
|
|
- </div>
|
300
|
|
- </label>
|
301
|
|
- ${POD.CancelButton('current-document-add-comment-cancel-button', True)}
|
302
|
|
- ${POD.SaveButton('current-document-add-comment-save-button', True)}
|
303
|
|
- </fieldset>
|
304
|
|
- </form>
|
305
|
|
-
|
306
|
296
|
<!-- LIST OF COMMENTS -->
|
307
|
297
|
% if len(current_node.getComments())>0:
|
308
|
|
- <table class="table table-striped table-hover table-condensed">
|
|
298
|
+ <div>
|
309
|
299
|
% for comment in current_node.getComments():
|
310
|
|
- <tr title="Last updated: ${comment.updated_at}">
|
311
|
|
- <td>
|
312
|
|
- <i>The ${comment.getFormattedDate(comment.updated_at)} at ${comment.getFormattedTime(comment.updated_at)}: </i><br/>
|
313
|
|
- <b>${comment.data_label}</b>
|
314
|
|
- ## TODO - 2013-11-20 - Use the right form in order to update meta-data
|
315
|
|
- <a class="pull-right" href="${tg.url('/document/%i'%comment.node_id)}"><i class="fa fa-edit"></i></a>
|
316
|
|
- <br/>
|
317
|
|
- <p>
|
318
|
|
- ${comment.data_content|n}
|
319
|
|
- </p>
|
320
|
|
- </td>
|
321
|
|
- </tr>
|
|
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>
|
322
|
317
|
% endfor
|
323
|
|
- </table>
|
|
318
|
+ </div>
|
324
|
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
|
+
|
325
|
339
|
</div>
|
326
|
340
|
################################
|
327
|
341
|
##
|
|
@@ -329,7 +343,11 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
329
|
343
|
##
|
330
|
344
|
################################
|
331
|
345
|
<div class="tab-pane" id="files">
|
332
|
|
- <p><strong>${_('Attachments')}</strong></p>
|
|
346
|
+ ${DOCTABS.FilesTabContent(current_node)}
|
|
347
|
+ </div>
|
|
348
|
+
|
|
349
|
+ <div class="tab-pane" id="files">
|
|
350
|
+ <h4>${_('Attachments')}</h4>
|
333
|
351
|
% if len(current_node.getFiles())<=0:
|
334
|
352
|
<p class="pod-grey">${_("There is currently no attachment.")}<br/></p>
|
335
|
353
|
<p>${POD.AddButton('current-document-add-file-button', True, _(' Attach first file'))}</p>
|
|
@@ -390,14 +408,16 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
390
|
408
|
## PANEL SHOWING ACCESS MANAGEMENT
|
391
|
409
|
##
|
392
|
410
|
################################
|
|
411
|
+
|
393
|
412
|
<div class="tab-pane" id="accessmanagement">
|
394
|
|
- blabla
|
|
413
|
+ ${DOCTABS.AccessManagementTab(current_node)}
|
395
|
414
|
</div>
|
396
|
415
|
</div>
|
397
|
416
|
</div>
|
398
|
417
|
</div>
|
399
|
418
|
</div>
|
400
|
419
|
</div>
|
|
420
|
+ % endif
|
401
|
421
|
</div>
|
402
|
422
|
</div>
|
403
|
|
-
|
|
423
|
+</div>
|