|
@@ -90,9 +90,6 @@ POD :: ${current_node.getTruncatedLabel(40)} [${current_node.getStatus().label}]
|
90
|
90
|
</div>
|
91
|
91
|
</div>
|
92
|
92
|
<div id='application-main-panel' class="span9">
|
93
|
|
-
|
94
|
|
-
|
95
|
|
-
|
96
|
93
|
<div class="btn-group">
|
97
|
94
|
<button class="btn">Status</button>
|
98
|
95
|
<a class="btn ${current_node.getStatus().css}" href="#"><i class="${current_node.getStatus().icon}"></i> ${current_node.getStatus().getLabel()}</a>
|
|
@@ -117,266 +114,269 @@ POD :: ${current_node.getTruncatedLabel(40)} [${current_node.getStatus().label}]
|
117
|
114
|
|
118
|
115
|
<a href='${tg.url('/api/force_delete_node?node_id=%i'%(current_node.node_id))}' id='current-document-force-delete-button' class="btn" onclick="return confirm('${_('Delete current document?')}');"><i class="icon-g-remove"></i> ${_('Delete')}</a>
|
119
|
116
|
</div>
|
120
|
|
-
|
|
117
|
+
|
121
|
118
|
<h3 id="current-document-title">#${current_node.node_id} - ${current_node.data_label}</h3>
|
122
|
|
- <form style='display: none; margin-top: 1em;' id="current-document-title-edit-form" method='post' action='${tg.url('/api/edit_label')}'>
|
123
|
|
- <div class="input-prepend input-append">
|
124
|
|
- <input type='hidden' name='node_id' value='${current_node.node_id}'/>
|
125
|
|
- ${POD.CancelButton('current-document-title-edit-cancel-button')}
|
126
|
|
- <input type='text' name='data_label' value='${current_node.data_label}' class="span2" />
|
127
|
|
- ${POD.SaveButton('current-document-title-save-cancel-button')}
|
|
119
|
+ <form style='display: none; margin-top: 1em;' id="current-document-title-edit-form" method='post' action='${tg.url('/api/edit_label')}'>
|
|
120
|
+ <div class="input-prepend input-append">
|
|
121
|
+ <input type='hidden' name='node_id' value='${current_node.node_id}'/>
|
|
122
|
+ ${POD.CancelButton('current-document-title-edit-cancel-button')}
|
|
123
|
+ <input type='text' name='data_label' value='${current_node.data_label}' class="span2" />
|
|
124
|
+ ${POD.SaveButton('current-document-title-save-cancel-button')}
|
|
125
|
+ </div>
|
|
126
|
+ </form>
|
|
127
|
+
|
|
128
|
+ <div id='application-document-panel' class="span5">
|
|
129
|
+ <p>
|
|
130
|
+ <div id='current-document-content' class="">
|
|
131
|
+ ${current_node.getContentWithTags()|n}
|
128
|
132
|
</div>
|
129
|
|
- </form>
|
|
133
|
+ <form style='display: none;' id="current-document-content-edit-form" method='post' action='${tg.url('/api/edit_content')}'>
|
|
134
|
+ <input type='hidden' name='node_id' value='${current_node.node_id}'/>
|
|
135
|
+ <textarea id="current_node_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="Enter something ...">
|
|
136
|
+ ${current_node.data_content|n}
|
|
137
|
+ </textarea>
|
|
138
|
+ ${POD.CancelButton('current-document-content-edit-cancel-button', True)}
|
|
139
|
+ ${POD.SaveButton('current-document-content-edit-save-button', True)}
|
|
140
|
+ </form>
|
|
141
|
+ </p>
|
130
|
142
|
</div>
|
131
|
|
- <div id='application-document-panel' class="span5">
|
132
|
|
- <p>
|
133
|
|
- <div id='current-document-content' class="">
|
134
|
|
- ${current_node.getContentWithTags()|n}
|
135
|
|
- </div>
|
136
|
|
- <form style='display: none;' id="current-document-content-edit-form" method='post' action='${tg.url('/api/edit_content')}'>
|
137
|
|
- <input type='hidden' name='node_id' value='${current_node.node_id}'/>
|
138
|
|
- <textarea id="current_node_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="Enter something ...">
|
139
|
|
- ${current_node.data_content|n}
|
140
|
|
- </textarea>
|
141
|
|
- ${POD.CancelButton('current-document-content-edit-cancel-button', True)}
|
142
|
|
- ${POD.SaveButton('current-document-content-edit-save-button', True)}
|
143
|
|
- </form>
|
144
|
|
- </p>
|
145
|
|
- </div>
|
146
|
|
- <div id='application-metadata-panel' class="span4">
|
147
|
|
- <div class="tabbable">
|
148
|
|
- <ul class="nav nav-tabs">
|
149
|
|
- ## DEBUG - D.A. - 2013-11-07 - <li class="active"><a href="#tags" data-toggle="tab" title="${_('Tags')}"><i class='icon-g-tags'></i></a></li>
|
150
|
|
- <li class="active"><a href="#events" data-toggle="tab" title="History"><i class="icon-g-history"></i>${POD.ItemNb(current_node.getEvents())}</a></li>
|
151
|
|
- <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="icon-g-user""></i>${POD.ItemNb(current_node.getContacts())}</a></li>
|
152
|
|
- <li><a href="#comments" data-toggle="tab" title="Comments"><i class="icon-g-conversation"></i>${POD.ItemNb(current_node.getComments())}</a></li>
|
153
|
|
- <li><a href="#files" data-toggle="tab" title="Files"><i class="icon-g-attach"></i>${POD.ItemNb(current_node.getFiles())}</a></li>
|
154
|
|
- </ul>
|
155
|
|
- <div class="tab-content">
|
156
|
|
- ################################
|
157
|
|
- ##
|
158
|
|
- ## PANEL SHOWING LIST OF TAGS
|
159
|
|
- ##
|
160
|
|
- ################################
|
161
|
|
- <!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment
|
162
|
|
- <div class="tab-pane" id="tags">
|
163
|
|
- <div class="well">
|
164
|
|
- <p>
|
165
|
|
- <i>
|
166
|
|
- ${_('Tags are automatically extracted from document content:')}
|
167
|
|
- <ul>
|
168
|
|
- <li>${_('<code>@visible_keyword</code> is a visible keyword generating a tag.')|n}</li>
|
169
|
|
- <li>
|
170
|
|
- ${_('<code>@invisible_keyword</code> is an <u>invisible</u> keyword generating a tag.')|n}</li>
|
171
|
|
- </ul>
|
172
|
|
- </i>
|
173
|
|
- </p>
|
174
|
|
- % for tag in current_node.getTagList():
|
175
|
|
- ${POD.Badge(tag)}
|
176
|
|
- % endfor
|
|
143
|
+ ## FIXME - D.A - 2013-11-07 - The following div should be span4 instead of span3 but some bug make it impossible
|
|
144
|
+ <div id='application-metadata-panel' class="span3">
|
|
145
|
+ <div class="tabbable">
|
|
146
|
+ <ul class="nav nav-tabs">
|
|
147
|
+ ## DEBUG - D.A. - 2013-11-07 - <li class="active"><a href="#tags" data-toggle="tab" title="${_('Tags')}"><i class='icon-g-tags'></i></a></li>
|
|
148
|
+ <li class="active"><a href="#events" data-toggle="tab" title="History"><i class="icon-g-history"></i>${POD.ItemNb(current_node.getEvents())}</a></li>
|
|
149
|
+ <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="icon-g-user""></i>${POD.ItemNb(current_node.getContacts())}</a></li>
|
|
150
|
+ <li><a href="#comments" data-toggle="tab" title="Comments"><i class="icon-g-conversation"></i>${POD.ItemNb(current_node.getComments())}</a></li>
|
|
151
|
+ <li><a href="#files" data-toggle="tab" title="Files"><i class="icon-g-attach"></i>${POD.ItemNb(current_node.getFiles())}</a></li>
|
|
152
|
+ </ul>
|
|
153
|
+ <div class="tab-content">
|
|
154
|
+ ################################
|
|
155
|
+ ##
|
|
156
|
+ ## PANEL SHOWING LIST OF TAGS
|
|
157
|
+ ##
|
|
158
|
+ ################################
|
|
159
|
+ <!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment
|
|
160
|
+ <div class="tab-pane" id="tags">
|
|
161
|
+ <div class="well">
|
|
162
|
+ <p>
|
|
163
|
+ <i>
|
|
164
|
+ ${_('Tags are automatically extracted from document content:')}
|
|
165
|
+ <ul>
|
|
166
|
+ <li>${_('<code>@visible_keyword</code> is a visible keyword generating a tag.')|n}</li>
|
|
167
|
+ <li>
|
|
168
|
+ ${_('<code>@invisible_keyword</code> is an <u>invisible</u> keyword generating a tag.')|n}</li>
|
|
169
|
+ </ul>
|
|
170
|
+ </i>
|
|
171
|
+ </p>
|
|
172
|
+ % for tag in current_node.getTagList():
|
|
173
|
+ ${POD.Badge(tag)}
|
|
174
|
+ % endfor
|
|
175
|
+ </div>
|
177
|
176
|
</div>
|
178
|
|
- </div>
|
179
|
|
- -->
|
180
|
|
- ################################
|
181
|
|
- ##
|
182
|
|
- ## PANEL SHOWING LIST OF EVENTS
|
183
|
|
- ##
|
184
|
|
- ################################
|
185
|
|
- <div class="tab-pane active" id="events">
|
186
|
|
- ${POD.AddButton('current-document-add-event-button', True, _(' Add event'))}
|
187
|
|
- <form style='display: none;' id='current-document-add-event-form' action='${tg.url('/api/create_event')}' method='post' class="well">
|
188
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
189
|
|
- <fieldset>
|
190
|
|
- <legend>Add an event</legend>
|
191
|
|
- <label>
|
192
|
|
- <input type="text" name='data_label' placeholder="Event"/>
|
193
|
|
- </label>
|
194
|
|
- <label>
|
195
|
|
- <div class="datetime-picker-input-div input-append date">
|
196
|
|
- <input name='data_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
|
197
|
|
- <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
|
198
|
|
- </div>
|
199
|
|
- </label>
|
200
|
|
- <label>
|
201
|
|
- <div>
|
202
|
|
- <textarea id="add_event_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('detail...')}"></textarea>
|
203
|
|
- </div>
|
204
|
|
- </label>
|
205
|
|
- <label class="checkbox">
|
206
|
|
- <input disabled name='add_reminder' type="checkbox"> add a reminder
|
207
|
|
- </label>
|
208
|
|
- <label>
|
209
|
|
- <div class="datetime-picker-input-div input-append date">
|
210
|
|
- <input disabled name='data_reminder_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
|
211
|
|
- <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
|
212
|
|
- </div>
|
213
|
|
- </label>
|
|
177
|
+ -->
|
|
178
|
+ ################################
|
|
179
|
+ ##
|
|
180
|
+ ## PANEL SHOWING LIST OF EVENTS
|
|
181
|
+ ##
|
|
182
|
+ ################################
|
|
183
|
+ <div class="tab-pane active" id="events">
|
|
184
|
+ ${POD.AddButton('current-document-add-event-button', True, _(' Add event'))}
|
|
185
|
+ <form style='display: none;' id='current-document-add-event-form' action='${tg.url('/api/create_event')}' method='post' class="well">
|
|
186
|
+ <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
|
187
|
+ <fieldset>
|
|
188
|
+ <legend>Add an event</legend>
|
|
189
|
+ <label>
|
|
190
|
+ <input type="text" name='data_label' placeholder="Event"/>
|
|
191
|
+ </label>
|
|
192
|
+ <label>
|
|
193
|
+ <div class="datetime-picker-input-div input-append date">
|
|
194
|
+ <input name='data_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
|
|
195
|
+ <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
|
|
196
|
+ </div>
|
|
197
|
+ </label>
|
|
198
|
+ <label>
|
|
199
|
+ <div>
|
|
200
|
+ <textarea id="add_event_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('detail...')}"></textarea>
|
|
201
|
+ </div>
|
|
202
|
+ </label>
|
|
203
|
+ <label class="checkbox">
|
|
204
|
+ <input disabled name='add_reminder' type="checkbox"> add a reminder
|
|
205
|
+ </label>
|
|
206
|
+ <label>
|
|
207
|
+ <div class="datetime-picker-input-div input-append date">
|
|
208
|
+ <input disabled name='data_reminder_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
|
|
209
|
+ <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
|
|
210
|
+ </div>
|
|
211
|
+ </label>
|
214
|
212
|
|
215
|
213
|
|
216
|
|
- ${POD.CancelButton('current-document-add-event-cancel-button', True)}
|
217
|
|
- ${POD.SaveButton('current-document-add-event-save-button', True)}
|
218
|
|
- </fieldset>
|
219
|
|
- </form>
|
|
214
|
+ ${POD.CancelButton('current-document-add-event-cancel-button', True)}
|
|
215
|
+ ${POD.SaveButton('current-document-add-event-save-button', True)}
|
|
216
|
+ </fieldset>
|
|
217
|
+ </form>
|
220
|
218
|
|
221
|
|
- % if len(current_node.getEvents())<=0:
|
222
|
|
- <p><i>${_('No history for the moment.')}</i></p>
|
223
|
|
- % else:
|
224
|
|
- <table class="table table-striped table-hover table-condensed">
|
225
|
|
- <thead>
|
226
|
|
- <tr>
|
227
|
|
- <th>Date</th>
|
228
|
|
- <th>Time</th>
|
229
|
|
- <th>
|
230
|
|
- Event
|
231
|
|
- </th>
|
232
|
|
- <th>
|
233
|
|
- <a href="" title="Add an event"><i class="icon-g-plus"></i></a>
|
234
|
|
- </th>
|
235
|
|
- </tr>
|
236
|
|
- </thead>
|
237
|
|
- % for event in current_node.getEvents():
|
238
|
|
- <tr class="item-with-data-popoverable" data-content="${event.data_content}" rel="popover" data-placement="left" data-trigger="hover">
|
239
|
|
- <td>${event.getFormattedDate(event.data_datetime)}</td>
|
240
|
|
- <td>${event.getFormattedTime(event.data_datetime)}</td>
|
241
|
|
- <td>${event.data_label}</td>
|
242
|
|
- </tr>
|
243
|
|
- % endfor
|
244
|
|
- </table>
|
245
|
|
- % endif
|
246
|
|
- </div>
|
247
|
|
- ##############################
|
248
|
|
- ##
|
249
|
|
- ## PANEL SHOWING LIST OF CONTACTS
|
250
|
|
- ##
|
251
|
|
- ##############################
|
252
|
|
- <div class="tab-pane" id="contacts">
|
253
|
|
-
|
254
|
|
- <!-- ADD CONTACT FORM -->
|
255
|
|
- ${POD.AddButton('current-document-add-contact-button', True, _(' Add contact'))}
|
256
|
|
- <form style='display: none;' id='current-document-add-contact-form' action='${tg.url('/api/create_contact')}' method='post' class="well">
|
257
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
258
|
|
- <fieldset>
|
259
|
|
- <legend>${_('Add a contact')}</legend>
|
260
|
|
- <label>
|
261
|
|
- <input type="text" name='data_label' placeholder="Title"/>
|
262
|
|
- </label>
|
263
|
|
- <label>
|
|
219
|
+ % if len(current_node.getEvents())<=0:
|
|
220
|
+ <p><i>${_('No history for the moment.')}</i></p>
|
|
221
|
+ % else:
|
|
222
|
+ <table class="table table-striped table-hover table-condensed">
|
|
223
|
+ <thead>
|
|
224
|
+ <tr>
|
|
225
|
+ <th>Date</th>
|
|
226
|
+ <th>Time</th>
|
|
227
|
+ <th>
|
|
228
|
+ Event
|
|
229
|
+ </th>
|
|
230
|
+ <th>
|
|
231
|
+ <a href="" title="Add an event"><i class="icon-g-plus"></i></a>
|
|
232
|
+ </th>
|
|
233
|
+ </tr>
|
|
234
|
+ </thead>
|
|
235
|
+ % for event in current_node.getEvents():
|
|
236
|
+ <tr class="item-with-data-popoverable" data-content="${event.data_content}" rel="popover" data-placement="left" data-trigger="hover">
|
|
237
|
+ <td>${event.getFormattedDate(event.data_datetime)}</td>
|
|
238
|
+ <td>${event.getFormattedTime(event.data_datetime)}</td>
|
|
239
|
+ <td>${event.data_label}</td>
|
|
240
|
+ </tr>
|
|
241
|
+ % endfor
|
|
242
|
+ </table>
|
|
243
|
+ % endif
|
|
244
|
+ </div>
|
|
245
|
+ ##############################
|
|
246
|
+ ##
|
|
247
|
+ ## PANEL SHOWING LIST OF CONTACTS
|
|
248
|
+ ##
|
|
249
|
+ ##############################
|
|
250
|
+ <div class="tab-pane" id="contacts">
|
|
251
|
+
|
|
252
|
+ <!-- ADD CONTACT FORM -->
|
|
253
|
+ ${POD.AddButton('current-document-add-contact-button', True, _(' Add contact'))}
|
|
254
|
+ <form style='display: none;' id='current-document-add-contact-form' action='${tg.url('/api/create_contact')}' method='post' class="well">
|
|
255
|
+ <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
|
256
|
+ <fieldset>
|
|
257
|
+ <legend>${_('Add a contact')}</legend>
|
|
258
|
+ <label>
|
|
259
|
+ <input type="text" name='data_label' placeholder="Title"/>
|
|
260
|
+ </label>
|
|
261
|
+ <label>
|
|
262
|
+ <div>
|
|
263
|
+ <textarea id="add_contact_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('detail...')}"></textarea>
|
|
264
|
+ </div>
|
|
265
|
+ </label>
|
|
266
|
+ ${POD.CancelButton('current-document-add-contact-cancel-button', True)}
|
|
267
|
+ ${POD.SaveButton('current-document-add-contact-save-button', True)}
|
|
268
|
+ </fieldset>
|
|
269
|
+ </form>
|
|
270
|
+
|
|
271
|
+ <!-- LIST OF CONTACT NODES -->
|
|
272
|
+ % for contact in current_node.getContacts():
|
|
273
|
+ <div class="well">
|
|
274
|
+ <legend class="text-info">${contact.data_label}</legend>
|
264
|
275
|
<div>
|
265
|
|
- <textarea id="add_contact_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('detail...')}"></textarea>
|
|
276
|
+ <a style='float: right;' href="" title='${_('Search on google maps')}'><i class='icon-g-google-maps'></i></a>
|
|
277
|
+ ${contact.data_content|n}
|
266
|
278
|
</div>
|
267
|
|
- </label>
|
268
|
|
- ${POD.CancelButton('current-document-add-contact-cancel-button', True)}
|
269
|
|
- ${POD.SaveButton('current-document-add-contact-save-button', True)}
|
270
|
|
- </fieldset>
|
271
|
|
- </form>
|
272
|
|
-
|
273
|
|
- <!-- LIST OF CONTACT NODES -->
|
274
|
|
- % for contact in current_node.getContacts():
|
275
|
|
- <div class="well">
|
276
|
|
- <legend class="text-info">${contact.data_label}</legend>
|
277
|
|
- <div>
|
278
|
|
- <a style='float: right;' href="" title='${_('Search on google maps')}'><i class='icon-g-google-maps'></i></a>
|
279
|
|
- ${contact.data_content|n}
|
280
|
279
|
</div>
|
281
|
|
- </div>
|
282
|
|
- % endfor
|
|
280
|
+ % endfor
|
283
|
281
|
|
284
|
282
|
|
285
|
|
- </div>
|
286
|
|
- ################################
|
287
|
|
- ##
|
288
|
|
- ## PANEL SHOWING LIST OF COMMENTS
|
289
|
|
- ##
|
290
|
|
- ################################
|
291
|
|
- <div class="tab-pane" id="comments">
|
292
|
|
- <!-- ADD COMMENT FORM -->
|
293
|
|
- ${POD.AddButton('current-document-add-comment-button', True, _(' Add comment'))}
|
294
|
|
- <form style='display: none;' id='current-document-add-comment-form' action='${tg.url('/api/create_comment')}' method='post' class="well">
|
295
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
296
|
|
- <fieldset>
|
297
|
|
- <legend>${_('Add a comment')}</legend>
|
298
|
|
- <label>
|
299
|
|
- <input type="text" name='data_label' placeholder="Title"/>
|
300
|
|
- </label>
|
301
|
|
- <label>
|
302
|
|
- <div>
|
303
|
|
- <textarea id="add_comment_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('comment...')}"></textarea>
|
304
|
|
- </div>
|
305
|
|
- </label>
|
306
|
|
- ${POD.CancelButton('current-document-add-comment-cancel-button', True)}
|
307
|
|
- ${POD.SaveButton('current-document-add-comment-save-button', True)}
|
308
|
|
- </fieldset>
|
309
|
|
- </form>
|
|
283
|
+ </div>
|
|
284
|
+ ################################
|
|
285
|
+ ##
|
|
286
|
+ ## PANEL SHOWING LIST OF COMMENTS
|
|
287
|
+ ##
|
|
288
|
+ ################################
|
|
289
|
+ <div class="tab-pane" id="comments">
|
|
290
|
+ <!-- ADD COMMENT FORM -->
|
|
291
|
+ ${POD.AddButton('current-document-add-comment-button', True, _(' Add comment'))}
|
|
292
|
+ <form style='display: none;' id='current-document-add-comment-form' action='${tg.url('/api/create_comment')}' method='post' class="well">
|
|
293
|
+ <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
|
294
|
+ <fieldset>
|
|
295
|
+ <legend>${_('Add a comment')}</legend>
|
|
296
|
+ <label>
|
|
297
|
+ <input type="text" name='data_label' placeholder="Title"/>
|
|
298
|
+ </label>
|
|
299
|
+ <label>
|
|
300
|
+ <div>
|
|
301
|
+ <textarea id="add_comment_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('comment...')}"></textarea>
|
|
302
|
+ </div>
|
|
303
|
+ </label>
|
|
304
|
+ ${POD.CancelButton('current-document-add-comment-cancel-button', True)}
|
|
305
|
+ ${POD.SaveButton('current-document-add-comment-save-button', True)}
|
|
306
|
+ </fieldset>
|
|
307
|
+ </form>
|
310
|
308
|
|
311
|
|
- <!-- LIST OF COMMENTS -->
|
312
|
|
- % if len(current_node.getComments())<=0:
|
313
|
|
- <p><i>${_('No comments.')}</i></p>
|
314
|
|
- % else:
|
315
|
|
- <table class="table table-striped table-hover table-condensed">
|
316
|
|
- % for comment in current_node.getComments():
|
317
|
|
- <tr title="Last updated: ${comment.updated_at}">
|
318
|
|
- <td>
|
319
|
|
- <i>The ${comment.getFormattedDate(comment.updated_at)} at ${comment.getFormattedTime(comment.updated_at)}, comment.author wrote: </i><br/>
|
320
|
|
- <b>${comment.data_label}</b><br/>
|
321
|
|
- <p>
|
322
|
|
- ${comment.data_content|n}
|
323
|
|
- </p>
|
324
|
|
- </td>
|
325
|
|
- </tr>
|
326
|
|
- % endfor
|
327
|
|
- </table>
|
328
|
|
- % endif
|
329
|
|
- </div>
|
330
|
|
- ################################
|
331
|
|
- ##
|
332
|
|
- ## PANEL SHOWING LIST OF FILES
|
333
|
|
- ##
|
334
|
|
- ################################
|
335
|
|
- <div class="tab-pane" id="files">
|
336
|
|
- <!-- ADD FILE FORM -->
|
337
|
|
- ${POD.AddButton('current-document-add-file-button', True, _(' Add file'))}
|
338
|
|
- <form style='display: none;' id='current-document-add-file-form' enctype="multipart/form-data" action='${tg.url('/api/create_file')}' method='post' class="well">
|
339
|
|
- <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
340
|
|
- <fieldset>
|
341
|
|
- <legend>${_('Add a file')}</legend>
|
342
|
|
- <label>
|
343
|
|
- <input type="text" name='data_label' placeholder="Title"/>
|
344
|
|
- </label>
|
345
|
|
- <label>
|
346
|
|
- <input type="file" name='data_file' placeholder="choose a file..."/>
|
347
|
|
- </label>
|
348
|
|
- <label>
|
349
|
|
- <div>
|
350
|
|
- <textarea id="add_file_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('comment...')}"></textarea>
|
351
|
|
- </div>
|
352
|
|
- </label>
|
353
|
|
- ${POD.CancelButton('current-document-add-file-cancel-button', True)}
|
354
|
|
- ${POD.SaveButton('current-document-add-file-save-button', True)}
|
355
|
|
- </fieldset>
|
356
|
|
- </form>
|
|
309
|
+ <!-- LIST OF COMMENTS -->
|
|
310
|
+ % if len(current_node.getComments())<=0:
|
|
311
|
+ <p><i>${_('No comments.')}</i></p>
|
|
312
|
+ % else:
|
|
313
|
+ <table class="table table-striped table-hover table-condensed">
|
|
314
|
+ % for comment in current_node.getComments():
|
|
315
|
+ <tr title="Last updated: ${comment.updated_at}">
|
|
316
|
+ <td>
|
|
317
|
+ <i>The ${comment.getFormattedDate(comment.updated_at)} at ${comment.getFormattedTime(comment.updated_at)}, comment.author wrote: </i><br/>
|
|
318
|
+ <b>${comment.data_label}</b><br/>
|
|
319
|
+ <p>
|
|
320
|
+ ${comment.data_content|n}
|
|
321
|
+ </p>
|
|
322
|
+ </td>
|
|
323
|
+ </tr>
|
|
324
|
+ % endfor
|
|
325
|
+ </table>
|
|
326
|
+ % endif
|
|
327
|
+ </div>
|
|
328
|
+ ################################
|
|
329
|
+ ##
|
|
330
|
+ ## PANEL SHOWING LIST OF FILES
|
|
331
|
+ ##
|
|
332
|
+ ################################
|
|
333
|
+ <div class="tab-pane" id="files">
|
|
334
|
+ <!-- ADD FILE FORM -->
|
|
335
|
+ ${POD.AddButton('current-document-add-file-button', True, _(' Add file'))}
|
|
336
|
+ <form style='display: none;' id='current-document-add-file-form' enctype="multipart/form-data" action='${tg.url('/api/create_file')}' method='post' class="well">
|
|
337
|
+ <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
|
338
|
+ <fieldset>
|
|
339
|
+ <legend>${_('Add a file')}</legend>
|
|
340
|
+ <label>
|
|
341
|
+ <input type="text" name='data_label' placeholder="Title"/>
|
|
342
|
+ </label>
|
|
343
|
+ <label>
|
|
344
|
+ <input type="file" name='data_file' placeholder="choose a file..."/>
|
|
345
|
+ </label>
|
|
346
|
+ <label>
|
|
347
|
+ <div>
|
|
348
|
+ <textarea id="add_file_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('comment...')}"></textarea>
|
|
349
|
+ </div>
|
|
350
|
+ </label>
|
|
351
|
+ ${POD.CancelButton('current-document-add-file-cancel-button', True)}
|
|
352
|
+ ${POD.SaveButton('current-document-add-file-save-button', True)}
|
|
353
|
+ </fieldset>
|
|
354
|
+ </form>
|
357
|
355
|
|
358
|
|
- <!-- LIST OF FILES -->
|
359
|
|
- % if len(current_node.getFiles())<=0:
|
360
|
|
- <p><i>${_('No files.')}</i></p>
|
361
|
|
- % else:
|
362
|
|
- <table class="table table-striped table-hover table-condensed">
|
363
|
|
- % for current_file in current_node.getFiles():
|
364
|
|
- <tr title="Last updated: ${current_file.updated_at}">
|
365
|
|
- <td>
|
366
|
|
- <img src="${tg.url('/api/get_file_content_thumbnail/%s'%(current_file.node_id))}" class="img-polaroid">
|
367
|
|
- </td>
|
368
|
|
- <td>
|
369
|
|
- <b>${current_file.data_label}</b><br/>
|
370
|
|
- <i>commented by comment.author the ${current_file.getFormattedDate(current_file.updated_at)} at ${current_file.getFormattedTime(current_file.updated_at)}</i></br>
|
371
|
|
- <p>
|
372
|
|
- ${current_file.data_content|n}
|
373
|
|
- </p>
|
374
|
|
- </td>
|
375
|
|
- </tr>
|
376
|
|
- % endfor
|
377
|
|
- </table>
|
378
|
|
- % endif
|
|
356
|
+ <!-- LIST OF FILES -->
|
|
357
|
+ % if len(current_node.getFiles())<=0:
|
|
358
|
+ <p><i>${_('No files.')}</i></p>
|
|
359
|
+ % else:
|
|
360
|
+ <table class="table table-striped table-hover table-condensed">
|
|
361
|
+ % for current_file in current_node.getFiles():
|
|
362
|
+ <tr title="Last updated: ${current_file.updated_at}">
|
|
363
|
+ <td>
|
|
364
|
+ <img src="${tg.url('/api/get_file_content_thumbnail/%s'%(current_file.node_id))}" class="img-polaroid">
|
|
365
|
+ </td>
|
|
366
|
+ <td>
|
|
367
|
+ <b>${current_file.data_label}</b><br/>
|
|
368
|
+ <i>commented by comment.author the ${current_file.getFormattedDate(current_file.updated_at)} at ${current_file.getFormattedTime(current_file.updated_at)}</i></br>
|
|
369
|
+ <p>
|
|
370
|
+ ${current_file.data_content|n}
|
|
371
|
+ </p>
|
|
372
|
+ </td>
|
|
373
|
+ </tr>
|
|
374
|
+ % endfor
|
|
375
|
+ </table>
|
|
376
|
+ % endif
|
|
377
|
+ </div>
|
379
|
378
|
</div>
|
|
379
|
+ </div>
|
380
|
380
|
</div>
|
381
|
381
|
</div>
|
382
|
382
|
</div>
|