Browse Source

fixes bug #140 - http://tracim.org/workspaces/4/folders/5/threads/140

Damien ACCORSI 9 years ago
parent
commit
e5a4a40b01
1 changed files with 12 additions and 7 deletions
  1. 12 7
      tracim/tracim/templates/workspace/getone.mak

+ 12 - 7
tracim/tracim/templates/workspace/getone.mak View File

@@ -120,13 +120,18 @@
120 120
                                 %>
121 121
                                 <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT(modal_dialog_id, content_type.label, new_form_content_url, icon_classes)}</li>
122 122
                             % else:
123
-                                ## Only show 'new folder' to content managers
124
-                                <%
125
-                                    new_form_content_url = tg.url('/workspaces/{}/folders/{}/{}s/new'.format(result.folder.workspace.id, result.folder.id, content_type.id), params={'workspace_id': result.folder.workspace.id, 'parent_id': result.folder.id})
126
-                                    modal_dialog_id = '{content_type}-new-modal-dialog'.format(content_type=content_type.id)
127
-                                    icon_classes = content_type.icon+' '+content_type.color
128
-                                %>
129
-                                <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT(modal_dialog_id, content_type.label, new_form_content_url, icon_classes)}</li>
123
+                                <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT('', _('You are not allowed to create content'), '', 't-less-visible fa fa-ban')}</li>
124
+## Show new content entries in the menu is currently not available at root of a workspace
125
+## TODO - D.A. - 2015-08-20 - Allow to put content at root (and show related entry in the menu
126
+##                             % if user_role == 2:
127
+##                                 ## Only show 'new folder' to content managers
128
+##                                 <%
129
+##                                     new_form_content_url = tg.url('/workspaces/{}/folders/{}/{}s/new'.format(result.folder.workspace.id, result.folder.id, content_type.id), params={'workspace_id': result.folder.workspace.id, 'parent_id': result.folder.id})
130
+##                                     modal_dialog_id = '{content_type}-new-modal-dialog'.format(content_type=content_type.id)
131
+##                                     icon_classes = content_type.icon+' '+content_type.color
132
+##                                 %>
133
+##                                 <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT(modal_dialog_id, content_type.label, new_form_content_url, icon_classes)}</li>
134
+##                             % endif
130 135
                             % endif
131 136
                         % endfor
132 137
                     </ul>