|
@@ -40,12 +40,15 @@
|
40
|
40
|
</%def>
|
41
|
41
|
|
42
|
42
|
|
43
|
|
-<%def name="Toolbar(poNode, plNodeStatusList, plRootNodes, psDivId)">
|
|
43
|
+<%def name="Toolbar(poNode, plNodeStatusList, plRootNodes, psDivId, user_rights, user)">
|
44
|
44
|
<div id="${psDivId}">
|
|
45
|
+
|
|
46
|
+##
|
|
47
|
+## TOOLBAR ITEMS ARE SHOWN ACCORDING TO THE R/W PERMISSIONS GRANTED TO THE USER
|
|
48
|
+##
|
|
49
|
+% if user.user_id==poNode.owner_id or (user_rights and user_rights.hasWriteAccess()):
|
45
|
50
|
<div class="btn-group">
|
46
|
|
- % if current_user_rights and current_user_rights.hasWriteAccess():
|
47
|
51
|
${POD.EditButton('current-document-content-edit-button', True)}
|
48
|
|
- % endif
|
49
|
52
|
|
50
|
53
|
<button class="btn btn-small" data-toggle="dropdown" href="#">
|
51
|
54
|
<i class="fa fa-signal"></i>
|
|
@@ -75,7 +78,8 @@
|
75
|
78
|
% endfor
|
76
|
79
|
</ul>
|
77
|
80
|
</div>
|
78
|
|
-
|
|
81
|
+% endif
|
|
82
|
+
|
79
|
83
|
<div class="btn-group">
|
80
|
84
|
<button class="btn btn-small btn-success" data-toggle="dropdown" href="#">
|
81
|
85
|
<i class="fa fa-plus"></i> ${_('Add')}
|
|
@@ -106,7 +110,7 @@
|
106
|
110
|
<li><p class="pod-grey"><i class="fa fa-danger"></i> coming soon!</p></li>
|
107
|
111
|
</ul>
|
108
|
112
|
</div>
|
109
|
|
-
|
|
113
|
+% if user.user_id==poNode.owner_id or (user_rights and user_rights.hasWriteAccess()):
|
110
|
114
|
<div class="btn-group pull-right">
|
111
|
115
|
<button class="btn btn-small btn-link" data-toggle="dropdown" href="#">
|
112
|
116
|
${_('more ...')}
|
|
@@ -121,9 +125,9 @@
|
121
|
125
|
##
|
122
|
126
|
${ToolbarMenuItemModal(h.ID.MoveDocumentModalForm(current_node), 'fa fa-arrows', _('Move'), 'btn-warning')}
|
123
|
127
|
${ToolbarMenuItemLink(tg.url('/api/edit_status', dict(node_id=poNode.node_id, node_status='deleted')), 'fa fa-trash-o', _('Delete'), 'btn-danger', _('Delete the current document'), 'return confirm(\'{0}\');'.format('Delete current document?'))}
|
124
|
|
-
|
125
|
128
|
</ul>
|
126
|
129
|
</div>
|
|
130
|
+% endif
|
127
|
131
|
</div>
|
128
|
132
|
</%def>
|
129
|
133
|
|