|
|
@@ -4,7 +4,7 @@
|
|
4
|
4
|
<%def name="node_treeview_for_set_parent_menu(node_id, node_list, indentation=-1)">
|
|
5
|
5
|
% if indentation==-1:
|
|
6
|
6
|
<li>
|
|
7
|
|
- <a href="${tg.url('/api/set_parent_node?node_id=%i&new_parent_id=0'%(current_node.node_id))}">
|
|
|
7
|
+ <a href="${tg.url('/api/set_parent_node', dict(node_id=node_id, new_parent_id=0))}">
|
|
8
|
8
|
<i class="fa fa-file-text-o"></i> ${_('Home')}
|
|
9
|
9
|
</a>
|
|
10
|
10
|
${node_treeview_for_set_parent_menu(node_id, node_list, 0)}
|
|
|
@@ -14,7 +14,7 @@
|
|
14
|
14
|
<ul style="list-style: none;">
|
|
15
|
15
|
% for new_parent_node in node_list:
|
|
16
|
16
|
<li>
|
|
17
|
|
- <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)}
|
|
|
17
|
+ <a href="${tg.url('/api/set_parent_node', dict(node_id=node_id, new_parent_id=new_parent_node.node_id))}"><i class="fa fa-file-text-o"></i> ${new_parent_node.getTruncatedLabel(40-indentation*2)}
|
|
18
|
18
|
</a>
|
|
19
|
19
|
${node_treeview_for_set_parent_menu(node_id, new_parent_node.getStaticChildList(), indentation+1)}
|
|
20
|
20
|
</li>
|
|
|
@@ -24,12 +24,26 @@
|
|
24
|
24
|
% endif
|
|
25
|
25
|
</%def>
|
|
26
|
26
|
|
|
|
27
|
+<%def name="ToolbarMenuItemModal(psTargetModalId, psIconClasses, psMenuLabel)">
|
|
|
28
|
+ <li><a href="#${psTargetModalId}" role="button" data-toggle="modal"><i class="${psIconClasses}"></i> ${psMenuLabel}</a></li>
|
|
|
29
|
+</%def>
|
|
|
30
|
+
|
|
|
31
|
+<%def name="ToolbarMenuItemInline(psTargetId, psIconClasses, psMenuLabel)">
|
|
|
32
|
+ <li><a href="#${psTargetId}"><i class="${psIconClasses}"></i> ${psMenuLabel}</a></li>
|
|
|
33
|
+</%def>
|
|
|
34
|
+<%def name="ToolbarMenuItemLink(psTargetUrl, psIconClasses, psMenuLabel, psLinkCss='', psLinkTitle='')">
|
|
|
35
|
+ % if psTargetUrl=='#':
|
|
|
36
|
+ <li class="disabled"><a href="${psTargetUrl}" class="${psLinkCss}" title="${psLinkTitle}"><i class="${psIconClasses}"></i> ${psMenuLabel}</a></li>
|
|
|
37
|
+ % else:
|
|
|
38
|
+ <li><a href="${psTargetUrl}" class="${psLinkCss}" title="${psLinkTitle}"><i class="${psIconClasses}"></i> ${psMenuLabel}</a></li>
|
|
|
39
|
+ % endif
|
|
|
40
|
+</%def>
|
|
|
41
|
+
|
|
|
42
|
+
|
|
27
|
43
|
<%def name="Toolbar(poNode, plNodeStatusList, plRootNodes, psDivId)">
|
|
28
|
44
|
<div id="${psDivId}">
|
|
29
|
45
|
<div class="btn-group">
|
|
30
|
|
- % if poNode.parent_id!=None and poNode.parent_id!=0:
|
|
31
|
46
|
${POD.EditButton('current-document-content-edit-button', True)}
|
|
32
|
|
- % endif
|
|
33
|
47
|
<button class="btn btn-small" data-toggle="dropdown" href="#">
|
|
34
|
48
|
<i class="fa fa-signal"></i>
|
|
35
|
49
|
${_("Change status")}
|
|
|
@@ -38,19 +52,22 @@
|
|
38
|
52
|
<span class="caret"></span>
|
|
39
|
53
|
</a>
|
|
40
|
54
|
<ul class="dropdown-menu">
|
|
|
55
|
+ <li>
|
|
|
56
|
+ <div class="pod-grey strong" ><strong><i class="fa fa-magic"></i> ${_('Current status is...')}</strong><br/></div>
|
|
|
57
|
+ </li>
|
|
41
|
58
|
% for node_status in plNodeStatusList:
|
|
42
|
59
|
% if node_status.status_id==poNode.getStatus().status_id:
|
|
43
|
|
- <li title="${h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id)}">
|
|
44
|
|
- <a class="${node_status.css}" href="#" style="color: #999;">
|
|
45
|
|
- <i class="${node_status.icon_id}"></i> ${node_status.label}
|
|
46
|
|
- </a>
|
|
47
|
|
- </li>
|
|
48
|
|
- % else:
|
|
49
|
|
- <li title="${h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id)}">
|
|
50
|
|
- <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))}">
|
|
51
|
|
- <i class="${node_status.icon_id}"></i> ${node_status.label}
|
|
52
|
|
- </a>
|
|
|
60
|
+ ${ToolbarMenuItemLink('#', node_status.icon_id, node_status.label, 'disabled '+node_status.css, h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id))}
|
|
|
61
|
+ % endif
|
|
|
62
|
+ % endfor
|
|
|
63
|
+ <li class="divider" role="presentation"></li>
|
|
|
64
|
+ <li>
|
|
|
65
|
+ <div class=" strong" ><strong><i class="fa fa-magic"></i> ${_('Change to...')}</strong><br/></div>
|
|
|
66
|
+ <div class="pod-grey"><i>${_('change the status to...')}</i></div>
|
|
53
|
67
|
</li>
|
|
|
68
|
+ % for node_status in plNodeStatusList:
|
|
|
69
|
+ % if node_status.status_id!=poNode.getStatus().status_id:
|
|
|
70
|
+ ${ToolbarMenuItemLink(tg.url('/api/edit_status', dict(node_id=current_node.node_id, node_status=node_status.status_id)), node_status.icon_id, node_status.label, node_status.css, h.getExplanationAboutStatus(node_status.status_id, current_node.getStatus().status_id))}
|
|
54
|
71
|
% endif
|
|
55
|
72
|
% endfor
|
|
56
|
73
|
</ul>
|
|
|
@@ -63,15 +80,18 @@
|
|
63
|
80
|
<ul class="dropdown-menu">
|
|
64
|
81
|
|
|
65
|
82
|
<li>
|
|
66
|
|
- <div class="btn-success strong" ><strong><i class="fa fa-magic"></i> Add New...</strong><br/></div>
|
|
67
|
|
- <div class="pod-grey"><i>create a totally new item...</i></div>
|
|
|
83
|
+ <div class="btn-success strong" ><strong><i class="fa fa-magic"></i> ${_('Add New...')}</strong><br/></div>
|
|
|
84
|
+ <div class="pod-grey"><i>${_('create a totally new item...')}</i></div>
|
|
68
|
85
|
</li>
|
|
69
|
86
|
|
|
70
|
|
- <li><a><i class="fa fa-file-text-o"></i> Document</a></li>
|
|
71
|
|
- <li><a><i class="fa fa-paperclip"></i> File</a></li>
|
|
72
|
|
- <li><a><i class="fa fa-calendar"></i> Event</a></li>
|
|
73
|
|
- <li><a><i class="fa fa-user"></i> Contact</a></li>
|
|
74
|
|
- <li><a><i class="fa fa-comments-o"></i> Comment</a></li>
|
|
|
87
|
+ ${ToolbarMenuItemModal(h.ID.AddDocumentModalForm(current_node), 'fa fa-file-text-o', _('Document'))}
|
|
|
88
|
+ ${ToolbarMenuItemModal(h.ID.AddFileModalForm(current_node), 'fa fa-paperclip', _('File'))}
|
|
|
89
|
+ ${ToolbarMenuItemModal(h.ID.AddEventModalForm(current_node), 'fa fa-calendar', _('Event'))}
|
|
|
90
|
+ ${ToolbarMenuItemModal(h.ID.AddContactModalForm(current_node), 'fa fa-user', _('Contact'))}
|
|
|
91
|
+##
|
|
|
92
|
+## FIXME - DA - 07-05-2014 - The link below is not working clean
|
|
|
93
|
+##
|
|
|
94
|
+ ${ToolbarMenuItemInline(h.ID.AddCommentInlineForm(), 'fa fa-comments-o', _('Comment'))}
|
|
75
|
95
|
|
|
76
|
96
|
<li class="divider" role="presentation"></li>
|
|
77
|
97
|
|
|
|
@@ -79,12 +99,7 @@
|
|
79
|
99
|
<div class="btn-warning strong" ><strong><i class="fa fa-link"></i> Add Existing...</strong><br/></div>
|
|
80
|
100
|
<div class="pod-grey"><i>link to an existing item...</i></div>
|
|
81
|
101
|
</li>
|
|
82
|
|
- <li><a><i class="fa fa-file-text-o"></i> Document</a></li>
|
|
83
|
|
- <li><a><i class="fa fa-paperclip"></i> File</a></li>
|
|
84
|
|
- <li><a><i class="fa fa-calendar"></i> Event</a></li>
|
|
85
|
|
- <li><a><i class="fa fa-user"></i> Contact</a></li>
|
|
86
|
|
- <li><a><i class="fa fa-comments-o"></i> Comment</a></li>
|
|
87
|
|
-
|
|
|
102
|
+ <li><p class="pod-grey"><i class="fa fa-danger"></i> coming soon!</p></li>
|
|
88
|
103
|
</ul>
|
|
89
|
104
|
</div>
|
|
90
|
105
|
<div class="btn-group ">
|
|
|
@@ -103,7 +118,7 @@
|
|
103
|
118
|
</ul>
|
|
104
|
119
|
<a
|
|
105
|
120
|
class="btn btn-small btn-danger"
|
|
106
|
|
- href='${tg.url('/api/edit_status?node_id=%i&node_status=%s'%(poNode.node_id, 'deleted'))}'
|
|
|
121
|
+ href='${tg.url('/api/edit_status', dict(node_id=poNode.node_id, node_status='deleted'))}'
|
|
107
|
122
|
id='current-document-force-delete-button' onclick="return confirm('${_('Delete current document?')}');"
|
|
108
|
123
|
title="${_('Delete')}"
|
|
109
|
124
|
><i class="fa fa-trash-o"></i></a>
|
|
|
@@ -114,15 +129,21 @@
|
|
114
|
129
|
<%def name="BreadCrumb(poNode)">
|
|
115
|
130
|
<ul class="breadcrumb span12">
|
|
116
|
131
|
<li>
|
|
117
|
|
- <span class="divider"> / Documents /</span>
|
|
118
|
|
- </li>
|
|
119
|
|
- % for breadcrumb_node in poNode.getBreadCrumbNodes():
|
|
120
|
|
- <li>
|
|
121
|
|
- <a href="${tg.url('/document/%s'%(breadcrumb_node.node_id))}">${breadcrumb_node.getTruncatedLabel(30)}</a>
|
|
122
|
132
|
<span class="divider">/</span>
|
|
|
133
|
+ <a href="${tg.url('/document/')}">Documents</a>
|
|
123
|
134
|
</li>
|
|
124
|
|
- % endfor
|
|
125
|
|
- <li class="active">${poNode.data_label}</li>
|
|
|
135
|
+ % if poNode!=None:
|
|
|
136
|
+ % for breadcrumb_node in poNode.getBreadCrumbNodes():
|
|
|
137
|
+ <li>
|
|
|
138
|
+ <span class="divider">/</span>
|
|
|
139
|
+ <a href="${tg.url('/document/%s'%(breadcrumb_node.node_id))}">${breadcrumb_node.getTruncatedLabel(30)}</a>
|
|
|
140
|
+ </li>
|
|
|
141
|
+ % endfor
|
|
|
142
|
+ <li class="active">
|
|
|
143
|
+ <span class="divider">/</span>
|
|
|
144
|
+ ${poNode.data_label}
|
|
|
145
|
+ </li>
|
|
|
146
|
+ % endif
|
|
126
|
147
|
</ul>
|
|
127
|
148
|
</%def>
|
|
128
|
149
|
|
|
|
@@ -140,13 +161,16 @@
|
|
140
|
161
|
<div style="padding: 0.5em 0 0 0">
|
|
141
|
162
|
<input type="hidden" name="node_id" value="${current_node.node_id}"/>
|
|
142
|
163
|
<input type="hidden" name="data_content" id="current_node_textarea" />
|
|
143
|
|
- <input
|
|
144
|
|
- type="text"
|
|
145
|
|
- name="data_label"
|
|
146
|
|
- value="${current_node.data_label}"
|
|
147
|
|
- class="span4"
|
|
148
|
|
- placeholder="${_('document title')}"
|
|
149
|
|
- />
|
|
|
164
|
+ <label>
|
|
|
165
|
+ ${_('Title')}
|
|
|
166
|
+ <input
|
|
|
167
|
+ type="text"
|
|
|
168
|
+ name="data_label"
|
|
|
169
|
+ value="${current_node.data_label}"
|
|
|
170
|
+ class="span4"
|
|
|
171
|
+ placeholder="${_('document title')}"
|
|
|
172
|
+ />
|
|
|
173
|
+ </label>
|
|
150
|
174
|
</div>
|
|
151
|
175
|
<div>
|
|
152
|
176
|
${POD.RichTextEditor('current_node_textarea_wysiwyg', current_node.data_content)}
|
|
|
@@ -172,8 +196,32 @@
|
|
172
|
196
|
<h3 id="${psId}" title="Document ${poNode.node_id}: ${poNode.data_label}">
|
|
173
|
197
|
${poNode.data_label}
|
|
174
|
198
|
<sup class="label ${poNode.getStatus().css}" href="#">
|
|
|
199
|
+ <i class="${poNode.getStatus().icon_id}"></i>
|
|
175
|
200
|
${poNode.getStatus().label}
|
|
176
|
201
|
</sup>
|
|
|
202
|
+
|
|
|
203
|
+ % if poNode.is_shared==False:
|
|
|
204
|
+ <sup class="label label-info" title="${_('This document is private')}">
|
|
|
205
|
+ <i class="fa fa-key"></i>
|
|
|
206
|
+ ${_('private')}
|
|
|
207
|
+ </sup>
|
|
|
208
|
+ % else:
|
|
|
209
|
+ <sup class="label label-warning" title="${_('This document is collaborative')}">
|
|
|
210
|
+ <i class="fa fa-group"></i>
|
|
|
211
|
+ ${_('collaborative')}
|
|
|
212
|
+ </sup>
|
|
|
213
|
+ % endif
|
|
|
214
|
+######
|
|
|
215
|
+##
|
|
|
216
|
+## 2014-05-06 - D.A. - The document is not yet internet-sharable
|
|
|
217
|
+##
|
|
|
218
|
+## % if poNode.is_public==True:
|
|
|
219
|
+## <sup class="label label-warning" href="#">
|
|
|
220
|
+## <i class="fa fa-globe"></i>
|
|
|
221
|
+## <span title="${_('This document is published through internet at %s')%poNode.public_url_key}">${_('shared')}</span>
|
|
|
222
|
+## </sup>
|
|
|
223
|
+## % endif
|
|
|
224
|
+
|
|
177
|
225
|
</h3>
|
|
178
|
226
|
</%def>
|
|
179
|
227
|
|
|
|
@@ -192,3 +240,300 @@
|
|
192
|
240
|
</a>
|
|
193
|
241
|
</%def>
|
|
194
|
242
|
|
|
|
243
|
+
|
|
|
244
|
+<%def name="FirstTimeFakeDocument()">
|
|
|
245
|
+ <div id='application-document-panel' class="span5">
|
|
|
246
|
+ <div id='current-document-content' class="">
|
|
|
247
|
+ <p class="well">
|
|
|
248
|
+ <strong>${_('Welcome aboard')}</strong>
|
|
|
249
|
+ <i class="fa fa-smile-o fa-2x"></i>
|
|
|
250
|
+ </p>
|
|
|
251
|
+ ${_('<p>We suggest you to...<br/><br/></p>')|n}
|
|
|
252
|
+ <h4>
|
|
|
253
|
+ <i class="fa fa-angle-double-left fa-3x fa-fw pod-blue" style="vertical-align: middle"></i>
|
|
|
254
|
+ ${_('work on existing documents')}
|
|
|
255
|
+ </h4>
|
|
|
256
|
+ <p class="text-center">${_('or')}</p>
|
|
|
257
|
+ <h4 class="text-right">
|
|
|
258
|
+ ${_('create a new document')}
|
|
|
259
|
+ <i class="fa fa-angle-double-down fa-3x fa-fw pod-blue" style="vertical-align: middle"></i>
|
|
|
260
|
+ </h4>
|
|
|
261
|
+ <p class="pull-right">
|
|
|
262
|
+ <a href="#${h.ID.AddDocumentModalForm()}" role="button" class="btn btn-success" data-toggle="modal">
|
|
|
263
|
+ <i class="fa fa-plus"></i>
|
|
|
264
|
+ ${_('Create a new document')}
|
|
|
265
|
+ </a>
|
|
|
266
|
+ </p>
|
|
|
267
|
+
|
|
|
268
|
+ ${DocumentEditModalDialog(None, None, tg.url('/api/create_document'), h.ID.AddDocumentModalForm(), 'Create your first document')}
|
|
|
269
|
+ <div style="clear: both;"></div>
|
|
|
270
|
+ <p class="alert alert-info" style="margin-top: 2em;">
|
|
|
271
|
+ <i class="fa fa-info-circle"></i> ${_('<strong>Note :</strong> You can even create a dummy document: you will be able to remove it later.')|n}
|
|
|
272
|
+ </p>
|
|
|
273
|
+ </div>
|
|
|
274
|
+ <script>
|
|
|
275
|
+ </script>
|
|
|
276
|
+ </div>
|
|
|
277
|
+</%def>
|
|
|
278
|
+
|
|
|
279
|
+<%def name="DocumentEditModalDialog(piParentNodeId, poNode, psPostUrl, psModalId, psTitle)">
|
|
|
280
|
+ <div
|
|
|
281
|
+ id="${psModalId}"
|
|
|
282
|
+ class="modal hide"
|
|
|
283
|
+ tabindex="-1"
|
|
|
284
|
+ role="dialog"
|
|
|
285
|
+ aria-labelledby="myModalLabel"
|
|
|
286
|
+ aria-hidden="true">
|
|
|
287
|
+
|
|
|
288
|
+ <div class="modal-header">
|
|
|
289
|
+## MODAL HEADER
|
|
|
290
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
291
|
+ <h3 id="myModalLabel">${psTitle}</h3>
|
|
|
292
|
+## MODAL HEADER [END]
|
|
|
293
|
+ </div>
|
|
|
294
|
+
|
|
|
295
|
+ <div class="modal-body">
|
|
|
296
|
+## MODAL BODY
|
|
|
297
|
+ <form id='${psModalId}-form' method="GET" action="${psPostUrl}">
|
|
|
298
|
+ <div style="padding: 0.5em 0 0 0">
|
|
|
299
|
+ % if poNode!=None:
|
|
|
300
|
+ <input type="hidden" name="node_id" value="${poNode.node_id}"/>
|
|
|
301
|
+ % endif
|
|
|
302
|
+ <input type="hidden" name="parent_id" value="${piParentNodeId if piParentNodeId else 0}"/>
|
|
|
303
|
+
|
|
|
304
|
+ <input type="hidden" name="data_content" id="${psModalId}-textarea" />
|
|
|
305
|
+ <input
|
|
|
306
|
+ type="text"
|
|
|
307
|
+ name="data_label"
|
|
|
308
|
+ value="${poNode.data_label if poNode!=None else ''}"
|
|
|
309
|
+ class="span4"
|
|
|
310
|
+ placeholder="${_('document title')}"
|
|
|
311
|
+ />
|
|
|
312
|
+ </div>
|
|
|
313
|
+ <div>
|
|
|
314
|
+ ${POD.RichTextEditor(psModalId+'-textarea-wysiwyg', poNode.data_content if poNode!=None else '')}
|
|
|
315
|
+ </div>
|
|
|
316
|
+ </form>
|
|
|
317
|
+
|
|
|
318
|
+## MODAL BODY [END]
|
|
|
319
|
+ </div>
|
|
|
320
|
+
|
|
|
321
|
+ <div class="modal-footer">
|
|
|
322
|
+## MODAL FOOTER
|
|
|
323
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">
|
|
|
324
|
+ <i class="fa fa-ban"></i> ${_('Cancel')}
|
|
|
325
|
+ </button>
|
|
|
326
|
+ <button class="btn btn-success" id="${psModalId}-form-submit-button">
|
|
|
327
|
+ <i class="fa fa-check"></i> ${_('Save changes')}
|
|
|
328
|
+ </button>
|
|
|
329
|
+## MODAL FOOTER [END]
|
|
|
330
|
+ <script>
|
|
|
331
|
+ $('#${psModalId}-form-submit-button').click(function(){
|
|
|
332
|
+ $('#${psModalId}-textarea-wysiwyg').cleanHtml();
|
|
|
333
|
+ $('#${psModalId}-textarea').val($('#${psModalId}-textarea-wysiwyg').html());
|
|
|
334
|
+ $('#${psModalId}-form')[0].submit();
|
|
|
335
|
+ });
|
|
|
336
|
+ </script>
|
|
|
337
|
+ </div>
|
|
|
338
|
+ </div>
|
|
|
339
|
+</%def>
|
|
|
340
|
+
|
|
|
341
|
+
|
|
|
342
|
+<%def name="FileEditModalDialog(piParentNodeId, poNode, psPostUrl, psModalId, psTitle)">
|
|
|
343
|
+ <div
|
|
|
344
|
+ id="${psModalId}"
|
|
|
345
|
+ class="modal hide"
|
|
|
346
|
+ tabindex="-1"
|
|
|
347
|
+ role="dialog"
|
|
|
348
|
+ aria-labelledby="myModalLabel"
|
|
|
349
|
+ aria-hidden="true">
|
|
|
350
|
+
|
|
|
351
|
+ <div class="modal-header">
|
|
|
352
|
+ ## MODAL HEADER
|
|
|
353
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
354
|
+ <h3 id="myModalLabel">${psTitle}</h3>
|
|
|
355
|
+ ## MODAL HEADER [END]
|
|
|
356
|
+ </div>
|
|
|
357
|
+
|
|
|
358
|
+ <div class="modal-body">
|
|
|
359
|
+ ## MODAL BODY
|
|
|
360
|
+ <form id='${psModalId}-form' method="POST" action="${psPostUrl}" enctype="multipart/form-data">
|
|
|
361
|
+ % if poNode!=None:
|
|
|
362
|
+ <input type="hidden" name="node_id" value="${poNode.node_id}"/>
|
|
|
363
|
+ % endif
|
|
|
364
|
+ <input type="hidden" name="parent_id" value="${piParentNodeId if piParentNodeId else 0}"/>
|
|
|
365
|
+ <input type="hidden" name="data_content" id="${psModalId}-textarea" />
|
|
|
366
|
+ <div>
|
|
|
367
|
+ <label>
|
|
|
368
|
+ ${_('Title')}
|
|
|
369
|
+ <input
|
|
|
370
|
+ type="text"
|
|
|
371
|
+ name="data_label"
|
|
|
372
|
+ value="${poNode.data_label if poNode!=None else ''}"
|
|
|
373
|
+ class="span4"
|
|
|
374
|
+ placeholder="${_('this field is optionnal')}"
|
|
|
375
|
+ />
|
|
|
376
|
+ </label>
|
|
|
377
|
+ <label>
|
|
|
378
|
+ ${_('Choose a file...')}
|
|
|
379
|
+ <input type="file" class="span4" placeholder="${_('choose a file...')}" name="data_file"/>
|
|
|
380
|
+ </label>
|
|
|
381
|
+
|
|
|
382
|
+ </div>
|
|
|
383
|
+ <div>
|
|
|
384
|
+ <label>${_('File description (optionnal)')}</label>
|
|
|
385
|
+ ${POD.RichTextEditor(psModalId+'-textarea-wysiwyg', poNode.data_content if poNode!=None else '', '')}
|
|
|
386
|
+ </div>
|
|
|
387
|
+ </form>
|
|
|
388
|
+ ## MODAL BODY [END]
|
|
|
389
|
+ </div>
|
|
|
390
|
+
|
|
|
391
|
+ <div class="modal-footer">
|
|
|
392
|
+ ## MODAL FOOTER
|
|
|
393
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">
|
|
|
394
|
+ <i class="fa fa-ban"></i> ${_('Cancel')}
|
|
|
395
|
+ </button>
|
|
|
396
|
+ <button class="btn btn-success" id="${psModalId}-form-submit-button">
|
|
|
397
|
+ <i class="fa fa-check"></i> ${_('Save changes')}
|
|
|
398
|
+ </button>
|
|
|
399
|
+ <script>
|
|
|
400
|
+ $('#${psModalId}-form-submit-button').click(function(){
|
|
|
401
|
+ $('#${psModalId}-textarea-wysiwyg').cleanHtml();
|
|
|
402
|
+ $('#${psModalId}-textarea').val($('#${psModalId}-textarea-wysiwyg').html());
|
|
|
403
|
+ $('#${psModalId}-form')[0].submit();
|
|
|
404
|
+ });
|
|
|
405
|
+ </script>
|
|
|
406
|
+ ## MODAL FOOTER [END]
|
|
|
407
|
+ </div>
|
|
|
408
|
+ </div>
|
|
|
409
|
+</%def>
|
|
|
410
|
+
|
|
|
411
|
+<%def name="EventEditModalDialog(piParentNodeId, poNode, psPostUrl, psModalId, psTitle)">
|
|
|
412
|
+ <div
|
|
|
413
|
+ id="${psModalId}"
|
|
|
414
|
+ class="modal hide"
|
|
|
415
|
+ tabindex="-1"
|
|
|
416
|
+ role="dialog"
|
|
|
417
|
+ aria-labelledby="myModalLabel"
|
|
|
418
|
+ aria-hidden="true">
|
|
|
419
|
+
|
|
|
420
|
+ <div class="modal-header">
|
|
|
421
|
+ ## MODAL HEADER
|
|
|
422
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
423
|
+ <h3 id="myModalLabel">
|
|
|
424
|
+ ${psTitle}
|
|
|
425
|
+ </h3>
|
|
|
426
|
+ ## MODAL HEADER [END]
|
|
|
427
|
+ </div>
|
|
|
428
|
+
|
|
|
429
|
+ <div class="modal-body">
|
|
|
430
|
+ ###### MODAL BODY
|
|
|
431
|
+ <form id='${psModalId}-form' action='${psPostUrl}' method='POST'>
|
|
|
432
|
+ <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
|
|
|
433
|
+ <fieldset>
|
|
|
434
|
+ <label>
|
|
|
435
|
+ ${_('Event')}
|
|
|
436
|
+ <input type="text" name='data_label' placeholder="Event"/>
|
|
|
437
|
+ </label>
|
|
|
438
|
+ <label>
|
|
|
439
|
+ ${_('Date and time')}
|
|
|
440
|
+ <div class="datetime-picker-input-div input-append date">
|
|
|
441
|
+ <input name='data_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
|
|
|
442
|
+ <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
|
|
|
443
|
+ </div>
|
|
|
444
|
+ </label>
|
|
|
445
|
+ <label>
|
|
|
446
|
+ ${_('Event description:')}
|
|
|
447
|
+ <div>
|
|
|
448
|
+ <input type="hidden" name="data_content" id="${psModalId}-textarea" />
|
|
|
449
|
+ ${POD.RichTextEditor(psModalId+'-textarea-wysiwyg', poNode.data_content if poNode!=None else '', 'boldanditalic')}
|
|
|
450
|
+ </div>
|
|
|
451
|
+ </label>
|
|
|
452
|
+ </fieldset>
|
|
|
453
|
+ </form>
|
|
|
454
|
+ ###### MODAL BODY [END]
|
|
|
455
|
+ </div>
|
|
|
456
|
+
|
|
|
457
|
+ <div class="modal-footer">
|
|
|
458
|
+ ###### MODAL FOOTER
|
|
|
459
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">
|
|
|
460
|
+ <i class="fa fa-ban"></i> ${_('Cancel')}
|
|
|
461
|
+ </button>
|
|
|
462
|
+ <button class="btn btn-success" id="${psModalId}-form-submit-button">
|
|
|
463
|
+ <i class="fa fa-check"></i> ${_('Save changes')}
|
|
|
464
|
+ </button>
|
|
|
465
|
+ <script>
|
|
|
466
|
+ $('#${psModalId}-form-submit-button').click(function(){
|
|
|
467
|
+ $('#${psModalId}-textarea-wysiwyg').cleanHtml();
|
|
|
468
|
+ $('#${psModalId}-textarea').val($('#${psModalId}-textarea-wysiwyg').html());
|
|
|
469
|
+ $('#${psModalId}-form')[0].submit();
|
|
|
470
|
+ });
|
|
|
471
|
+ </script>
|
|
|
472
|
+ ###### MODAL FOOTER [END]
|
|
|
473
|
+ </div>
|
|
|
474
|
+ </div>
|
|
|
475
|
+</%def>
|
|
|
476
|
+
|
|
|
477
|
+<%def name="ContactEditModalDialog(piParentNodeId, poNode, psPostUrl, psModalId, psTitle)">
|
|
|
478
|
+ <div
|
|
|
479
|
+ id="${psModalId}"
|
|
|
480
|
+ class="modal hide"
|
|
|
481
|
+ tabindex="-1"
|
|
|
482
|
+ role="dialog"
|
|
|
483
|
+ aria-labelledby="myModalLabel"
|
|
|
484
|
+ aria-hidden="true">
|
|
|
485
|
+
|
|
|
486
|
+ <div class="modal-header">
|
|
|
487
|
+ ## MODAL HEADER
|
|
|
488
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
489
|
+ <h3 id="myModalLabel">${psTitle}</h3>
|
|
|
490
|
+ ## MODAL HEADER [END]
|
|
|
491
|
+ </div>
|
|
|
492
|
+
|
|
|
493
|
+ <div class="modal-body">
|
|
|
494
|
+ ## MODAL BODY
|
|
|
495
|
+ <form id='${psModalId}-form' method="POST" action="${psPostUrl}">
|
|
|
496
|
+ % if poNode!=None:
|
|
|
497
|
+ <input type="hidden" name="node_id" value="${poNode.node_id}"/>
|
|
|
498
|
+ % endif
|
|
|
499
|
+ <input type="hidden" name="parent_id" value="${piParentNodeId if piParentNodeId else 0}"/>
|
|
|
500
|
+ <input type="hidden" name="data_content" id="${psModalId}-textarea" />
|
|
|
501
|
+ <div>
|
|
|
502
|
+ <label>
|
|
|
503
|
+ ${_('Contact name and firstname')}
|
|
|
504
|
+ <input
|
|
|
505
|
+ type="text"
|
|
|
506
|
+ name="data_label"
|
|
|
507
|
+ value="${poNode.data_label if poNode!=None else ''}"
|
|
|
508
|
+ class="span4"
|
|
|
509
|
+ placeholder="${_('name, firstname, title...')}"
|
|
|
510
|
+ />
|
|
|
511
|
+ </label>
|
|
|
512
|
+ </div>
|
|
|
513
|
+ <div>
|
|
|
514
|
+ <label>${_('Address, phone, email, company...')}</label>
|
|
|
515
|
+ ${POD.RichTextEditor(psModalId+'-textarea-wysiwyg', poNode.data_content if poNode!=None else '', 'boldanditalic')}
|
|
|
516
|
+ </div>
|
|
|
517
|
+ </form>
|
|
|
518
|
+ ## MODAL BODY [END]
|
|
|
519
|
+ </div>
|
|
|
520
|
+
|
|
|
521
|
+ <div class="modal-footer">
|
|
|
522
|
+ ## MODAL FOOTER
|
|
|
523
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">
|
|
|
524
|
+ <i class="fa fa-ban"></i> ${_('Cancel')}
|
|
|
525
|
+ </button>
|
|
|
526
|
+ <button class="btn btn-success" id="${psModalId}-form-submit-button">
|
|
|
527
|
+ <i class="fa fa-check"></i> ${_('Save changes')}
|
|
|
528
|
+ </button>
|
|
|
529
|
+ <script>
|
|
|
530
|
+ $('#${psModalId}-form-submit-button').click(function(){
|
|
|
531
|
+ $('#${psModalId}-textarea-wysiwyg').cleanHtml();
|
|
|
532
|
+ $('#${psModalId}-textarea').val($('#${psModalId}-textarea-wysiwyg').html());
|
|
|
533
|
+ $('#${psModalId}-form')[0].submit();
|
|
|
534
|
+ });
|
|
|
535
|
+ </script>
|
|
|
536
|
+ ## MODAL FOOTER [END]
|
|
|
537
|
+ </div>
|
|
|
538
|
+ </div>
|
|
|
539
|
+</%def>
|