|
@@ -1,29 +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><a href="${tg.url('/api/set_parent_node?node_id=%i&new_parent_id=0'%(current_node.node_id))}">${_('Home')}</a>
|
11
|
|
- ${node_treeview_for_set_parent_menu(node_id, node_list, 0)}
|
12
|
|
- </li>
|
13
|
|
- % else:
|
14
|
|
- % if len(node_list)>0:
|
15
|
|
- <ul>
|
16
|
|
- % for new_parent_node in node_list:
|
17
|
|
- <li>
|
18
|
|
- <a href="${tg.url('/api/set_parent_node?node_id=%i&new_parent_id=%i'%(node_id, new_parent_node.node_id))}">${new_parent_node.getTruncatedLabel(40-indentation*2)}</a>
|
19
|
|
- ${node_treeview_for_set_parent_menu(node_id, new_parent_node.getStaticChildList(), indentation+1)}
|
20
|
|
- </li>
|
21
|
|
- % endfor
|
22
|
|
- </ul>
|
23
|
|
- % endif
|
24
|
|
- % endif
|
25
|
|
-</%def>
|
26
|
|
-
|
27
|
9
|
<%def name="node_treeview(node_list, indentation=-1)">
|
28
|
10
|
% if indentation==-1:
|
29
|
11
|
<div id='pod-menu-item-0' class="pod-toolbar-parent" style="padding-left: 0.5em; position: relative;">
|
|
@@ -82,6 +64,14 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
82
|
64
|
% endif
|
83
|
65
|
</%def>
|
84
|
66
|
|
|
67
|
+#######
|
|
68
|
+##
|
|
69
|
+## HERE COMES THE BREADCRUMB
|
|
70
|
+##
|
|
71
|
+ <div class="row">
|
|
72
|
+ ${DOC.BreadCrumb(current_node)}
|
|
73
|
+ </div>
|
|
74
|
+
|
85
|
75
|
<div class="row">
|
86
|
76
|
<div id='application-left-panel' class="span3">
|
87
|
77
|
<div>
|
|
@@ -89,107 +79,85 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
89
|
79
|
</div>
|
90
|
80
|
</div>
|
91
|
81
|
<div id='application-main-panel' class="span9">
|
92
|
|
- % if current_node.parent_id!=None and current_node.parent_id!=0:
|
93
|
|
- <div class="btn-group">
|
94
|
|
- <a class="btn " href="${tg.url('/document/%i'%current_node.parent_id)}" title="${_("Go to parent document")}"><i class="fa fa-hand-o-left"></i></a>
|
95
|
|
- </div>
|
96
|
|
- % endif
|
97
|
|
- <div class="btn-group">
|
98
|
|
- <button class="btn" data-toggle="dropdown" href="#">${_("Change status")}</button>
|
99
|
|
- <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
100
|
|
- <ul class="dropdown-menu">
|
101
|
|
- % for node_status in node_status_list:
|
102
|
|
- % if node_status.status_id==current_node.getStatus().status_id:
|
103
|
|
- <li title="${h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id)}">
|
104
|
|
- <a class="${node_status.css}" href="#" style="color: #999;">
|
105
|
|
- <i class="${node_status.icon_id}"></i> ${node_status.label}
|
106
|
|
- </a>
|
107
|
|
- </li>
|
108
|
|
- % else:
|
109
|
|
- <li title="${h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id)}">
|
110
|
|
- <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))}">
|
111
|
|
- <i class="${node_status.icon_id}"></i> ${node_status.label}
|
112
|
|
- </a>
|
113
|
|
- </li>
|
114
|
|
- % endif
|
115
|
|
- % endfor
|
116
|
|
- </ul>
|
117
|
|
- </div>
|
118
|
|
- <div class="btn-group">
|
119
|
|
- ${POD.EditButton('current-document-content-edit-button', True)}
|
120
|
|
- <a class="btn" href="#" data-toggle="dropdown"><i class="icon-g-move"></i> ${_('Move to')} <span class="caret"></span></a>
|
121
|
|
- <ul class="dropdown-menu">
|
122
|
|
- ${node_treeview_for_set_parent_menu(current_node.node_id, root_node_list)}
|
123
|
|
- </ul>
|
124
|
|
-
|
125
|
|
- <a href='${tg.url('/api/edit_status?node_id=%i&node_status=%s'%(current_node.node_id, 'deleted'))}' id='current-document-force-delete-button' class="btn" onclick="return confirm('${_('Delete current document?')}');"><i class="fa fa-trash-o"></i> ${_('Delete')}</a>
|
126
|
|
-
|
127
|
|
- </div>
|
128
|
82
|
|
129
|
83
|
<div class="row">
|
130
|
84
|
<div id='application-document-panel' class="span5">
|
131
|
|
- <p>
|
132
|
|
- <div id='current-document-content' class="">
|
133
|
|
- <h3 id="current-document-title">#${current_node.node_id} - ${current_node.data_label}
|
134
|
|
- <span class="label ${current_node.getStatus().css}" href="#">${current_node.getStatus().label}</a>
|
135
|
|
-
|
136
|
|
- </h3>
|
137
|
|
- ${current_node.getContentWithTags()|n}
|
138
|
|
- </div>
|
139
|
|
- <form style='display: none;' id="current-document-content-edit-form" method='post' action='${tg.url('/api/edit_label_and_content')}'>
|
140
|
|
- <input type='hidden' name='node_id' value='${current_node.node_id}'/>
|
141
|
|
- <input type="hidden" name='data_content' id="current_node_textarea" />
|
142
|
|
- <input type='text' name='data_label' value='${current_node.data_label}' class="span4" placeholder="document title" />
|
143
|
|
- ${POD.RichTextEditor('current_node_textarea_wysiwyg', current_node.data_content)}
|
144
|
|
- ${POD.CancelButton('current-document-content-edit-cancel-button', True)}
|
145
|
|
- ${POD.SaveButton('current-document-content-edit-save-button', True)}
|
146
|
|
-
|
147
|
|
-
|
148
|
|
- </form>
|
149
|
|
- </p>
|
|
85
|
+ <div id='current-document-content' class="">
|
|
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)}
|
|
95
|
+ </div>
|
|
96
|
+ ${DOC.EditForm(current_node)}
|
150
|
97
|
</div>
|
151
|
|
- ## FIXME - D.A - 2013-11-07 - The following div should be span4 instead of span3 but some bug make it impossible
|
152
|
98
|
<div id='application-metadata-panel' class="span4">
|
153
|
99
|
<div class="tabbable">
|
154
|
|
- <ul class="nav nav-tabs">
|
155
|
|
- ## FIXME - D.A. - 2013-11-07 - TO REMOVE OR TO REACTIVATE <li class="active"><a href="#tags" data-toggle="tab" title="${_('Tags')}"><i class='icon-g-tags'></i></a></li>
|
156
|
|
- <li class="active"><a href="#events" data-toggle="tab" title="History"><i class="pod-dark-grey fa fa-calendar"></i>${POD.ItemNb(current_node.getEvents())}</a></li>
|
157
|
|
- <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="pod-dark-grey fa fa-user"></i>${POD.ItemNb(current_node.getContacts())}</a></li>
|
158
|
|
- <li><a href="#comments" data-toggle="tab" title="Comments"><i class="pod-dark-grey fa fa-comments-o"></i>${POD.ItemNb(current_node.getComments())}</a></li>
|
159
|
|
- <li><a href="#files" data-toggle="tab" title="Files"><i class="pod-dark-grey fa fa-file-text-o"></i>${POD.ItemNb(current_node.getFiles())}</a></li>
|
|
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>
|
160
|
107
|
</ul>
|
161
|
108
|
<div class="tab-content">
|
162
|
109
|
################################
|
163
|
110
|
##
|
164
|
|
- ## PANEL SHOWING LIST OF TAGS
|
|
111
|
+ ## PANEL SHOWING LIST OF SUB DOCUMENTS
|
165
|
112
|
##
|
166
|
113
|
################################
|
167
|
|
- <!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment
|
168
|
|
- <div class="tab-pane" id="tags">
|
169
|
|
- <div class="well">
|
170
|
|
- <p>
|
171
|
|
- <i>
|
172
|
|
- ${_('Tags are automatically extracted from document content:')}
|
173
|
|
- <ul>
|
174
|
|
- <li>${_('<code>@visible_keyword</code> is a visible keyword generating a tag.')|n}</li>
|
175
|
|
- <li>
|
176
|
|
- ${_('<code>@invisible_keyword</code> is an <u>invisible</u> keyword generating a tag.')|n}</li>
|
177
|
|
- </ul>
|
178
|
|
- </i>
|
179
|
|
- </p>
|
180
|
|
- % for tag in current_node.getTagList():
|
181
|
|
- ${POD.Badge(tag)}
|
|
114
|
+ <!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment -->
|
|
115
|
+ <div class="tab-pane" id="subdocuments">
|
|
116
|
+ <p><strong>Sub-documents</strong></p>
|
|
117
|
+ % if len(current_node.getChildren())<=0:
|
|
118
|
+ <p class="pod-grey">
|
|
119
|
+ ${_("There is currently no child documents.")}<br/>
|
|
120
|
+ </p>
|
|
121
|
+ <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")}
|
|
125
|
+ </a>
|
|
126
|
+ </p>
|
|
127
|
+ % else:
|
|
128
|
+ <p>
|
|
129
|
+ <a class="btn btn-success btn-small" href="${tg.url('/api/create_document?parent_id=%i'%current_node.node_id)}">
|
|
130
|
+ <i class="fa fa-plus"></i> ${_("Add one")}
|
|
131
|
+ </a>
|
|
132
|
+ </p>
|
|
133
|
+
|
|
134
|
+ <div>
|
|
135
|
+ % for subnode in current_node.getChildren():
|
|
136
|
+ <p style="list-style-type:none;">
|
|
137
|
+ <i class="fa-fw ${subnode.getIconClass()}"></i>
|
|
138
|
+ <a href="${tg.url('/document/%i'%subnode.node_id)}">
|
|
139
|
+ ${subnode.data_label}
|
|
140
|
+ </a>
|
|
141
|
+ </p>
|
182
|
142
|
% endfor
|
183
|
143
|
</div>
|
|
144
|
+ % endif
|
184
|
145
|
</div>
|
185
|
|
- -->
|
|
146
|
+
|
186
|
147
|
################################
|
187
|
148
|
##
|
188
|
149
|
## PANEL SHOWING LIST OF EVENTS
|
189
|
150
|
##
|
190
|
151
|
################################
|
191
|
152
|
<div class="tab-pane active" id="events">
|
192
|
|
- ${POD.AddButton('current-document-add-event-button', True, _(' Add event'))}
|
|
153
|
+ <p><strong>Calendar</strong></p>
|
|
154
|
+ % if len(current_node.getEvents())<=0:
|
|
155
|
+ <p class="pod-grey">${_("The calendar is empty.")}<br/></p>
|
|
156
|
+ <p>${POD.AddButton('current-document-add-event-button', True, _(' Add first event'))}</p>
|
|
157
|
+ % else:
|
|
158
|
+ <p>${POD.AddButton('current-document-add-event-button', True, _(' Add an event'))}</p>
|
|
159
|
+ % endif
|
|
160
|
+
|
193
|
161
|
<form style='display: none;' id='current-document-add-event-form' action='${tg.url('/api/create_event')}' method='post' class="well">
|
194
|
162
|
<input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
195
|
163
|
<fieldset>
|
|
@@ -225,9 +193,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
225
|
193
|
</fieldset>
|
226
|
194
|
</form>
|
227
|
195
|
|
228
|
|
- % if len(current_node.getEvents())<=0:
|
229
|
|
- <p><i>${_('No history for the moment.')}</i></p>
|
230
|
|
- % else:
|
|
196
|
+ % if len(current_node.getEvents())>0:
|
231
|
197
|
<table class="table table-striped table-hover table-condensed">
|
232
|
198
|
<thead>
|
233
|
199
|
<tr>
|
|
@@ -261,9 +227,15 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
261
|
227
|
##
|
262
|
228
|
##############################
|
263
|
229
|
<div class="tab-pane" id="contacts">
|
264
|
|
-
|
|
230
|
+ <p><strong>${_('Address book')}</strong></p>
|
|
231
|
+ % if len(current_node.getContacts())<=0:
|
|
232
|
+ <p class="pod-grey">${_("The address book is empty.")}<br/></p>
|
|
233
|
+ <p>${POD.AddButton('current-document-add-contact-button', True, _(' Add first contact'), True)}</p>
|
|
234
|
+ % else:
|
|
235
|
+ <p>${POD.AddButton('current-document-add-contact-button', True, _(' Add a contact'))}</p>
|
|
236
|
+ % endif
|
|
237
|
+
|
265
|
238
|
<!-- ADD CONTACT FORM -->
|
266
|
|
- ${POD.AddButton('current-document-add-contact-button', True, _(' Add contact'))}
|
267
|
239
|
<form style='display: none;' id='current-document-add-contact-form' action='${tg.url('/api/create_contact')}' method='post' class="well">
|
268
|
240
|
<input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
269
|
241
|
<fieldset>
|
|
@@ -297,8 +269,6 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
297
|
269
|
</div>
|
298
|
270
|
</div>
|
299
|
271
|
% endfor
|
300
|
|
-
|
301
|
|
-
|
302
|
272
|
</div>
|
303
|
273
|
################################
|
304
|
274
|
##
|
|
@@ -306,8 +276,15 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
306
|
276
|
##
|
307
|
277
|
################################
|
308
|
278
|
<div class="tab-pane" id="comments">
|
|
279
|
+ <p><strong>${_('Comment thread')}</strong></p>
|
|
280
|
+ % if len(current_node.getComments())<=0:
|
|
281
|
+ <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
|
+ % endif
|
|
286
|
+
|
309
|
287
|
<!-- ADD COMMENT FORM -->
|
310
|
|
- ${POD.AddButton('current-document-add-comment-button', True, _(' Add comment'))}
|
311
|
288
|
<form style='display: none;' id='current-document-add-comment-form' action='${tg.url('/api/create_comment')}' method='post' class="well">
|
312
|
289
|
<input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
313
|
290
|
<fieldset>
|
|
@@ -327,9 +304,7 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
327
|
304
|
</form>
|
328
|
305
|
|
329
|
306
|
<!-- LIST OF COMMENTS -->
|
330
|
|
- % if len(current_node.getComments())<=0:
|
331
|
|
- <p><i>${_('No comments.')}</i></p>
|
332
|
|
- % else:
|
|
307
|
+ % if len(current_node.getComments())>0:
|
333
|
308
|
<table class="table table-striped table-hover table-condensed">
|
334
|
309
|
% for comment in current_node.getComments():
|
335
|
310
|
<tr title="Last updated: ${comment.updated_at}">
|
|
@@ -354,8 +329,15 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
354
|
329
|
##
|
355
|
330
|
################################
|
356
|
331
|
<div class="tab-pane" id="files">
|
|
332
|
+ <p><strong>${_('Attachments')}</strong></p>
|
|
333
|
+ % if len(current_node.getFiles())<=0:
|
|
334
|
+ <p class="pod-grey">${_("There is currently no attachment.")}<br/></p>
|
|
335
|
+ <p>${POD.AddButton('current-document-add-file-button', True, _(' Attach first file'))}</p>
|
|
336
|
+ % else:
|
|
337
|
+ <p>${POD.AddButton('current-document-add-file-button', True, _(' Attach a file'))}</p>
|
|
338
|
+ % endif
|
|
339
|
+
|
357
|
340
|
<!-- ADD FILE FORM -->
|
358
|
|
- ${POD.AddButton('current-document-add-file-button', True, _(' Add file'))}
|
359
|
341
|
<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
|
342
|
<input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
361
|
343
|
<fieldset>
|
|
@@ -378,34 +360,38 @@ pod :: document ${current_node.getTruncatedLabel(40)} [#${current_node.node_id}
|
378
|
360
|
</form>
|
379
|
361
|
|
380
|
362
|
<!-- LIST OF FILES -->
|
381
|
|
- % if len(current_node.getFiles())<=0:
|
382
|
|
- <p><i>${_('No files.')}</i></p>
|
383
|
|
- % else:
|
384
|
|
- <table class="table table-striped table-hover table-condensed">
|
|
363
|
+ <div>
|
|
364
|
+ % if len(current_node.getFiles())>0:
|
385
|
365
|
% for current_file in current_node.getFiles():
|
386
|
|
- <tr title="Last updated: ${current_file.updated_at}">
|
387
|
|
- <td>
|
388
|
|
- <a href="${tg.url('/api/get_file_content/%s'%(current_file.node_id))}" title="${_("Download file")}">
|
389
|
|
- <i class="fa fa-2x fa-file-text-o"></i>
|
390
|
|
- </a>
|
391
|
|
- ## FIXME - SHOW THUMBNAIL WHEN IT WILL BE OK<img src="${tg.url('/api/get_file_content_thumbnail/%s'%(current_file.node_id))}" class="img-polaroid">
|
392
|
|
- </td>
|
393
|
|
- <td>
|
394
|
|
- <b>${current_file.data_label}</b>
|
395
|
|
- <a class="pull-right" href="${tg.url('/api/get_file_content/%s'%(current_file.node_id))}" title="${_("Download file")}">
|
396
|
|
- <i class="fa fa-download"></i>
|
397
|
|
- </a>
|
398
|
|
- <a class="pull-right" href="${tg.url('/document/%i'%current_file.node_id)}" title="${_("Edit title or comment")}"><i class="fa fa-edit"></i></a>
|
399
|
|
-
|
400
|
|
- <br/>
|
401
|
|
- <p>
|
402
|
|
- ${current_file.data_content|n}
|
403
|
|
- </p>
|
404
|
|
- </td>
|
405
|
|
- </tr>
|
|
366
|
+ <p style="list-style-type:none; margin-bottom: 0.5em;">
|
|
367
|
+ <i class="fa fa-paperclip"></i>
|
|
368
|
+ <a
|
|
369
|
+ href="${tg.url('/document/%i'%current_file.node_id)}"
|
|
370
|
+ title="${_('View the attachment')}: ${current_file.data_label}"
|
|
371
|
+ >
|
|
372
|
+ ${current_file.getTruncatedLabel(50)}
|
|
373
|
+ </a>
|
|
374
|
+ <a
|
|
375
|
+ class="pull-right"
|
|
376
|
+ href="${tg.url('/api/get_file_content/%s'%(current_file.node_id))}"
|
|
377
|
+ title="${_('View the attachment')}"
|
|
378
|
+ >
|
|
379
|
+ <i class="fa fa-download"></i>
|
|
380
|
+ </a>
|
|
381
|
+ </p>
|
406
|
382
|
% endfor
|
407
|
|
- </table>
|
408
|
383
|
% endif
|
|
384
|
+ </div>
|
|
385
|
+ </div>
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+ ################################
|
|
389
|
+ ##
|
|
390
|
+ ## PANEL SHOWING ACCESS MANAGEMENT
|
|
391
|
+ ##
|
|
392
|
+ ################################
|
|
393
|
+ <div class="tab-pane" id="accessmanagement">
|
|
394
|
+ blabla
|
409
|
395
|
</div>
|
410
|
396
|
</div>
|
411
|
397
|
</div>
|