diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb index 1165edf2..739c695d 100644 --- a/app/views/dmsf/show.html.erb +++ b/app/views/dmsf/show.html.erb @@ -30,9 +30,15 @@ <% html_title l(:dmsf) %>
- <% if @file_manipulation_allowed && !@locked_for_user && !@system_folder %> - <%= link_to l(:label_attachment_new), multi_dmsf_upload_path(id: @project, folder_id: @folder), - class: 'icon icon-add' %> + <% unless @locked_for_user || @system_folder %> + <% if @file_manipulation_allowed %> + <%= link_to l(:label_attachment_new), multi_dmsf_upload_path(id: @project, folder_id: @folder), + class: 'icon icon-add' %> + <% end %> + <% if @folder_manipulation_allowed %> + <%= link_to l(:link_create_folder), new_dmsf_path(id: @project, parent_id: @folder), + title: l(:link_create_folder), class: 'icon icon-add' %> + <% end %> <% end %> <% if defined?(EasyExtensions) %> <%= render partial: 'dmsf_context_menus/main', locals: { diff --git a/app/views/dmsf_context_menus/_main.html.erb b/app/views/dmsf_context_menus/_main.html.erb index 38bbda07..3fb9769b 100644 --- a/app/views/dmsf_context_menus/_main.html.erb +++ b/app/views/dmsf_context_menus/_main.html.erb @@ -59,10 +59,6 @@ type: 'link_from'), title: l(:title_create_link), class: 'icon icon-link' %> <% end %> - <%= link_to(l(:link_create_folder), - new_dmsf_path(id: project, parent_id: folder), - title: l(:link_create_folder), - class: 'icon icon-add') unless locked_for_user %> <% end %> <% if trash_enabled %> <%= link_to l(:link_trash_bin), trash_dmsf_path(project), title: l(:link_trash_bin), class: 'icon icon-del' %>