#1563 icons
This commit is contained in:
parent
aa969a3fdd
commit
de02696e8b
@ -27,6 +27,7 @@ def dmsf_init
|
|||||||
Redmine::MenuManager.map :admin_menu do |menu|
|
Redmine::MenuManager.map :admin_menu do |menu|
|
||||||
menu.push :dmsf_approvalworkflows, :dmsf_workflows_path,
|
menu.push :dmsf_approvalworkflows, :dmsf_workflows_path,
|
||||||
caption: :label_dmsf_workflow_plural,
|
caption: :label_dmsf_workflow_plural,
|
||||||
|
icon: 'workflows',
|
||||||
html: { class: 'icon icon-workflows' },
|
html: { class: 'icon icon-workflows' },
|
||||||
if: proc { |_| User.current.admin? }
|
if: proc { |_| User.current.admin? }
|
||||||
end
|
end
|
||||||
|
|||||||
@ -23,15 +23,13 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<% unless @locked_for_user || @system_folder %>
|
<% unless @locked_for_user || @system_folder %>
|
||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<%= link_to l(:label_document_new), multi_dmsf_upload_path(id: @project, folder_id: @folder),
|
<%= link_to sprite_icon('add', l(:label_document_new)),
|
||||||
class: 'icon icon-add',
|
multi_dmsf_upload_path(id: @project, folder_id: @folder), class: 'icon icon-add',
|
||||||
data: { cy: 'button__new-file--dmsf' } %>
|
data: { cy: 'button__new-file--dmsf' } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @folder_manipulation_allowed %>
|
<% if @folder_manipulation_allowed %>
|
||||||
<%= link_to l(:link_create_folder),
|
<%= link_to sprite_icon('add', l(:link_create_folder)), new_dmsf_path(id: @project, parent_id: @folder),
|
||||||
new_dmsf_path(id: @project, parent_id: @folder),
|
class: 'icon icon-add', data: { cy: 'button__create-folder--dmsf' } %>
|
||||||
class: 'icon icon-add',
|
|
||||||
data: { cy: 'button__create-folder--dmsf' } %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if defined?(EasyExtensions) %>
|
<% if defined?(EasyExtensions) %>
|
||||||
|
|||||||
@ -23,12 +23,15 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<% if !@folder.new_record? && User.current.allowed_to?(:folder_manipulation, @project) && !@folder.system %>
|
<% if !@folder.new_record? && User.current.allowed_to?(:folder_manipulation, @project) && !@folder.system %>
|
||||||
<% if @folder.locked? %>
|
<% if @folder.locked? %>
|
||||||
<%= link_to_if @folder.unlockable? && (!@folder.locked_for_user? || @force_file_unlock_allowed), l(:button_unlock),
|
<%= link_to_if @folder.unlockable? && (!@folder.locked_for_user? || @force_file_unlock_allowed),
|
||||||
unlock_dmsf_path(id: @project, folder_id: @folder, back_url: edit_dmsf_url(id: @project, folder_id: @folder)),
|
sprite_icon('unlock', l(:button_unlock)),
|
||||||
|
unlock_dmsf_path(id: @project, folder_id: @folder,
|
||||||
|
back_url: edit_dmsf_url(id: @project, folder_id: @folder)),
|
||||||
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:button_lock), lock_dmsf_path(id: @project, folder_id: @folder,
|
<%= link_to sprite_icon('lock', l(:button_lock)),
|
||||||
back_url: edit_dmsf_url(id: @project, folder_id: @folder)),
|
lock_dmsf_path(id: @project, folder_id: @folder,
|
||||||
|
back_url: edit_dmsf_url(id: @project, folder_id: @folder)),
|
||||||
title: l(:title_lock_file), class: 'icon icon-lock' %>
|
title: l(:title_lock_file), class: 'icon icon-lock' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if defined?(EasyExtensions) %>
|
<% if defined?(EasyExtensions) %>
|
||||||
|
|||||||
@ -23,12 +23,12 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<% if @notifications && User.current.allowed_to?(:folder_manipulation, @project) %>
|
<% if @notifications && User.current.allowed_to?(:folder_manipulation, @project) %>
|
||||||
<% if @project.dmsf_notification %>
|
<% if @project.dmsf_notification %>
|
||||||
<%= link_to l(:label_notifications_off),
|
<%= link_to sprite_icon('email', l(:label_notifications_off)),
|
||||||
notify_deactivate_dmsf_path(id: @project, back_url: edit_root_dmsf_path(id: @project)),
|
notify_deactivate_dmsf_path(id: @project, back_url: edit_root_dmsf_path(id: @project)),
|
||||||
title: l(:title_notifications_active_deactivate),
|
title: l(:title_notifications_active_deactivate),
|
||||||
class: 'icon icon-email' %>
|
class: 'icon icon-email' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:label_notifications_on),
|
<%= link_to sprite_icon('email-disabled', l(:label_notifications_on)),
|
||||||
notify_activate_dmsf_path(id: @project, back_url: edit_root_dmsf_path(id: @project)),
|
notify_activate_dmsf_path(id: @project, back_url: edit_root_dmsf_path(id: @project)),
|
||||||
title: l(:title_notifications_active_deactivate),
|
title: l(:title_notifications_active_deactivate),
|
||||||
class: 'icon icon-email-add' %>
|
class: 'icon icon-email-add' %>
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
<%= label_tag 'email[to]', l(:label_email_to) %>
|
<%= label_tag 'email[to]', l(:label_email_to) %>
|
||||||
<span>
|
<span>
|
||||||
<%= text_field_tag 'email[to]', @email_params[:to], class: 'dmsf-full-width', required: true %>
|
<%= text_field_tag 'email[to]', @email_params[:to], class: 'dmsf-full-width', required: true %>
|
||||||
<%= link_to l(:button_add), add_email_dmsf_path(id: @project),
|
<%= link_to sprite_icon('add', l(:button_add)), add_email_dmsf_path(id: @project),
|
||||||
title: l(:label_email_address_add), class: 'icon icon-add', remote: true %>
|
title: l(:label_email_address_add), class: 'icon icon-add', remote: true %>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<% if @file_delete_allowed %>
|
<% if @file_delete_allowed %>
|
||||||
<%= link_to l(:label_empty_trash_bin), empty_trash_path(id: @project), class: 'icon icon-del' %>
|
<%= link_to sprite_icon('del', l(:label_empty_trash_bin)), empty_trash_path(id: @project), class: 'icon icon-del' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -32,44 +32,52 @@
|
|||||||
<% index = assignments.find_index{ |assignment| assignment.user_id == User.current.id } if assignments %>
|
<% index = assignments.find_index{ |assignment| assignment.user_id == User.current.id } if assignments %>
|
||||||
<% assignment_id = (index && assignments && assignments[index]) ? assignments[index].id : nil %>
|
<% assignment_id = (index && assignments && assignments[index]) ? assignments[index].id : nil %>
|
||||||
<% if allowed_minor %>
|
<% if allowed_minor %>
|
||||||
<%= context_menu_link l(:title_approval), action_dmsf_workflow_path(project_id: project.id, id: wf.id,
|
<%= context_menu_link sprite_icon('checked', l(:title_approval)),
|
||||||
dmsf_workflow_step_assignment_id: assignment_id,
|
action_dmsf_workflow_path(project_id: project.id, id: wf.id,
|
||||||
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
dmsf_workflow_step_assignment_id: assignment_id,
|
||||||
back_url: back_url),
|
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
||||||
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow',
|
back_url: back_url),
|
||||||
disabled: !assignments || !index %>
|
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow',
|
||||||
|
disabled: !assignments || !index %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= context_menu_link l(:title_approval_minor), action_dmsf_workflow_path(project_id: project.id, id: wf.id,
|
<%= context_menu_link sprite_icon('checked', l(:title_approval_minor)),
|
||||||
dmsf_workflow_step_assignment_id: assignment_id,
|
action_dmsf_workflow_path(project_id: project.id, id: wf.id,
|
||||||
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
dmsf_workflow_step_assignment_id: assignment_id,
|
||||||
back_url: back_url),
|
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
||||||
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow',
|
back_url: back_url),
|
||||||
disabled: true %>
|
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow', disabled: true %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when DmsfWorkflow::STATE_ASSIGNED %>
|
<% when DmsfWorkflow::STATE_ASSIGNED %>
|
||||||
<% if allowed_minor %>
|
<% if allowed_minor %>
|
||||||
<%= context_menu_link l(:title_start), start_dmsf_workflow_path(id: dmsf_file.last_revision.dmsf_workflow_id,
|
<%= context_menu_link sprite_icon('checked', l(:title_start)),
|
||||||
dmsf_file_revision_id: dmsf_file.last_revision.id, back_url: back_url),
|
start_dmsf_workflow_path(id: dmsf_file.last_revision.dmsf_workflow_id,
|
||||||
class: 'icon icon-ok', disabled: !allowed %>
|
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
||||||
|
back_url: back_url),
|
||||||
|
class: 'icon icon-ok', disabled: !allowed %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= context_menu_link l(:title_start_minor), start_dmsf_workflow_path(id: dmsf_file.last_revision.dmsf_workflow_id,
|
<%= context_menu_link sprite_icon('checked', l(:title_start_minor)),
|
||||||
dmsf_file_revision_id: dmsf_file.last_revision.id, back_url: back_url),
|
start_dmsf_workflow_path(id: dmsf_file.last_revision.dmsf_workflow_id,
|
||||||
class: 'icon icon-ok', disabled: true %>
|
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
||||||
|
back_url: back_url),
|
||||||
|
class: 'icon icon-ok', disabled: true %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when DmsfWorkflow::STATE_APPROVED, DmsfWorkflow::STATE_REJECTED, DmsfWorkflow::STATE_OBSOLETE %>
|
<% when DmsfWorkflow::STATE_APPROVED, DmsfWorkflow::STATE_REJECTED, DmsfWorkflow::STATE_OBSOLETE %>
|
||||||
<%# %>
|
<%# %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if allowed_minor %>
|
<% if allowed_minor %>
|
||||||
<%= context_menu_link l(:title_assignment), assign_dmsf_workflow_path(id: project.id, project_id: project.id,
|
<%= context_menu_link sprite_icon('checked', l(:title_assignment)),
|
||||||
dmsf_file_revision_id: dmsf_file.last_revision.id, back_url: back_url),
|
assign_dmsf_workflow_path(id: project.id, project_id: project.id,
|
||||||
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow',
|
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
||||||
disabled: locked || !workflows_available %>
|
back_url: back_url),
|
||||||
|
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow',
|
||||||
|
disabled: locked || !workflows_available %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= context_menu_link l(:title_assignment_minor), assign_dmsf_workflow_path(id: project.id, project_id: project.id,
|
<%= context_menu_link sprite_icon('checked', l(:title_assignment_minor)),
|
||||||
dmsf_file_revision_id: dmsf_file.last_revision.id, back_url: back_url),
|
assign_dmsf_workflow_path(id: project.id, project_id: project.id,
|
||||||
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow',
|
dmsf_file_revision_id: dmsf_file.last_revision.id,
|
||||||
disabled: true %>
|
back_url: back_url),
|
||||||
|
remote: true, class: 'icon icon-ok', id: 'dmsf-cm-workflow', disabled: true %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@ -19,20 +19,19 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_edit), dmsf_file_path(id: dmsf_file, back_url: back_url), class: 'icon icon-edit',
|
<%= context_menu_link sprite_icon('edit', l(:button_edit)), dmsf_file_path(id: dmsf_file, back_url: back_url),
|
||||||
data: { cy: "icon__edit--dmsf_file_#{dmsf_file.id}" },
|
class: 'icon icon-edit', data: { cy: "icon__edit--dmsf_file_#{dmsf_file.id}" },
|
||||||
disabled: !allowed || (locked && !unlockable) %>
|
disabled: !allowed || (locked && !unlockable) %>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<% unless dmsf_link %>
|
<% unless dmsf_link %>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}",
|
<%= context_menu_link sprite_icon('copy', "#{l(:button_copy)}/#{l(:button_move)}"),
|
||||||
copymove_entries_path(id: project, folder_id: folder, ids: ["file-#{dmsf_file.id}"],
|
copymove_entries_path(id: project, folder_id: folder, ids: ["file-#{dmsf_file.id}"],
|
||||||
back_url: back_url), title: l(:title_copy), class: 'icon icon-copy',
|
back_url: back_url), title: l(:title_copy), class: 'icon icon-copy',
|
||||||
data: { cy: "icon__copy--dmsf_file_#{dmsf_file.id}" } %>
|
data: { cy: "icon__copy--dmsf_file_#{dmsf_file.id}" } %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to l(:label_link_to),
|
<%= link_to sprite_icon('link', l(:label_link_to)),
|
||||||
new_dmsf_link_path(project_id: dmsf_file.project.id, dmsf_folder_id: dmsf_file.dmsf_folder,
|
new_dmsf_link_path(project_id: dmsf_file.project.id, dmsf_folder_id: dmsf_file.dmsf_folder,
|
||||||
dmsf_file_id: dmsf_file.id, type: 'link_to', back_url: back_url),
|
dmsf_file_id: dmsf_file.id, type: 'link_to', back_url: back_url),
|
||||||
title: l(:title_create_link), class: 'icon dmsf-icon-link',
|
title: l(:title_create_link), class: 'icon dmsf-icon-link',
|
||||||
@ -41,24 +40,27 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<li>
|
||||||
<% if locked %>
|
<% if locked %>
|
||||||
<%= context_menu_link l(:button_unlock), unlock_dmsf_files_path(id: dmsf_file, back_url: back_url),
|
<%= context_menu_link sprite_icon('unlock', l(:button_unlock)), unlock_dmsf_files_path(id: dmsf_file, back_url: back_url),
|
||||||
class: 'icon icon-unlock', data: { cy: "icon__unlock--dmsf_file_#{dmsf_file.id}" },
|
class: 'icon icon-unlock', data: { cy: "icon__unlock--dmsf_file_#{dmsf_file.id}" },
|
||||||
title: l(:title_locked_by_user, user: dmsf_file.locked_by), disabled: !unlockable %>
|
title: l(:title_locked_by_user, user: dmsf_file.locked_by), disabled: !unlockable %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= context_menu_link l(:button_lock), lock_dmsf_files_path(id: dmsf_file, back_url: back_url),
|
<%= context_menu_link sprite_icon('lock', l(:button_lock)), lock_dmsf_files_path(id: dmsf_file, back_url: back_url),
|
||||||
class: 'icon icon-lock', data: { cy: "icon__lock--dmsf_file_#{dmsf_file.id}" }, disabled: !allowed %>
|
class: 'icon icon-lock', data: { cy: "icon__lock--dmsf_file_#{dmsf_file.id}" }, disabled: !allowed %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<% if notifications %>
|
<% if notifications %>
|
||||||
<li>
|
<li>
|
||||||
<% if dmsf_file.notification %>
|
<% if dmsf_file.notification %>
|
||||||
<%= context_menu_link l(:label_notifications_off), notify_deactivate_dmsf_files_path(id: dmsf_file,
|
<%= context_menu_link sprite_icon('email', l(:label_notifications_off)),
|
||||||
back_url: back_url), class: 'icon icon-email', data: { cy: "icon__email--dmsf_file_#{dmsf_file.id}" },
|
notify_deactivate_dmsf_files_path(id: dmsf_file, back_url: back_url),
|
||||||
disabled: !allowed || locked %>
|
class: 'icon icon-email', data: { cy: "icon__email--dmsf_file_#{dmsf_file.id}" },
|
||||||
|
disabled: !allowed || locked %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= context_menu_link l(:label_notifications_on), notify_activate_dmsf_files_path(id: dmsf_file,
|
<%= context_menu_link sprite_icon('email-disabled', l(:label_notifications_on)),
|
||||||
back_url: back_url), class: 'icon icon-email-add',
|
notify_activate_dmsf_files_path(id: dmsf_file, back_url: back_url),
|
||||||
data: { cy: "icon__email_add--dmsf_file_#{dmsf_file.id}" }, disabled: !allowed || locked %>
|
class: 'icon icon-email-add',
|
||||||
|
data: { cy: "icon__email_add--dmsf_file_#{dmsf_file.id}" },
|
||||||
|
disabled: !allowed || locked %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -69,13 +71,16 @@
|
|||||||
<li>
|
<li>
|
||||||
<% member = Member.find_by(user_id: User.current.id, project_id: dmsf_file.project.id) %>
|
<% member = Member.find_by(user_id: User.current.id, project_id: dmsf_file.project.id) %>
|
||||||
<% filename = dmsf_file.last_revision&.formatted_name(member) %>
|
<% filename = dmsf_file.last_revision&.formatted_name(member) %>
|
||||||
<%= context_menu_link l(:button_download), static_dmsf_file_path(dmsf_file, filename: filename),
|
<%= context_menu_link sprite_icon('download', l(:button_download)),
|
||||||
|
static_dmsf_file_path(dmsf_file, filename: filename),
|
||||||
class: 'icon icon-download', data: { cy: "icon__download--dmsf_file_#{dmsf_file.id}" },
|
class: 'icon icon-download', data: { cy: "icon__download--dmsf_file_#{dmsf_file.id}" },
|
||||||
disabled: false %>
|
disabled: false %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:field_mail), entries_operations_dmsf_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('email', l(:field_mail)),
|
||||||
ids: params[:ids], email_entries: true, back_url: back_url), method: :post, class: 'icon icon-email',
|
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
|
||||||
|
email_entries: true, back_url: back_url),
|
||||||
|
method: :post, class: 'icon icon-email',
|
||||||
data: { cy: "icon__email--dmsf_file_#{dmsf_file.id}" }, disabled: !email_allowed %>
|
data: { cy: "icon__email--dmsf_file_#{dmsf_file.id}" }, disabled: !email_allowed %>
|
||||||
</li>
|
</li>
|
||||||
<% if Setting.plugin_redmine_dmsf['dmsf_webdav'].present? %>
|
<% if Setting.plugin_redmine_dmsf['dmsf_webdav'].present? %>
|
||||||
@ -87,9 +92,10 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% url << dmsf_file.name %>
|
<% url << dmsf_file.name %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= context_menu_link l(:button_edit_content), url, class: "icon icon-file #{DmsfHelper.filetype_css(dmsf_file.name)}",
|
<%= context_menu_link sprite_icon('edit', l(:button_edit_content)), url,
|
||||||
disabled: url.blank? || (locked && !unlockable) ||
|
class: "icon icon-file #{DmsfHelper.filetype_css(dmsf_file.name)}",
|
||||||
(Setting.plugin_redmine_dmsf['dmsf_webdav_strategy'] != 'WEBDAV_READ_WRITE') %>
|
disabled: url.blank? || (locked && !unlockable) ||
|
||||||
|
(Setting.plugin_redmine_dmsf['dmsf_webdav_strategy'] != 'WEBDAV_READ_WRITE') %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<li>
|
||||||
@ -97,12 +103,12 @@
|
|||||||
</li>
|
</li>
|
||||||
<% if @preview %>
|
<% if @preview %>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:label_preview), view_dmsf_file_path(dmsf_file, preview: true),
|
<%= context_menu_link sprite_icon('zoom-in', l(:label_preview)), view_dmsf_file_path(dmsf_file, preview: true),
|
||||||
class: 'icon icon-magnifier', disabled: false %>
|
class: 'icon icon-zoom-in', disabled: false %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_delete),
|
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||||
dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder, back_url: back_url) : dmsf_file_path(id: dmsf_file,
|
dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder, back_url: back_url) : dmsf_file_path(id: dmsf_file,
|
||||||
folder_id: folder, back_url: back_url),
|
folder_id: folder, back_url: back_url),
|
||||||
method: :delete, class: 'icon icon-del', data: { confirm: l(:text_are_you_sure),
|
method: :delete, class: 'icon icon-del', data: { confirm: l(:text_are_you_sure),
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:title_restore),
|
<%= context_menu_link sprite_icon('reload', l(:title_restore)),
|
||||||
dmsf_link ? restore_dmsf_link_path(id: dmsf_link) : restore_dmsf_file_path(id: dmsf_file),
|
dmsf_link ? restore_dmsf_link_path(id: dmsf_link) : restore_dmsf_file_path(id: dmsf_file),
|
||||||
class: 'icon icon-cancel', disabled: !allowed_restore %>
|
class: 'icon icon-cancel', disabled: !allowed_restore %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_delete),
|
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||||
dmsf_link ? dmsf_link_path(id: dmsf_link, commit: 'yes') : dmsf_file_path(id: dmsf_file, commit: 'yes'),
|
dmsf_link ? dmsf_link_path(id: dmsf_link, commit: 'yes') : dmsf_file_path(id: dmsf_file, commit: 'yes'),
|
||||||
data: { confirm: l(:text_are_you_sure) }, method: :delete, class: 'icon icon-del',
|
data: { confirm: l(:text_are_you_sure) }, method: :delete, class: 'icon icon-del',
|
||||||
id: 'dmsf-cm-delete', disabled: !allowed_delete %>
|
id: 'dmsf-cm-delete', disabled: !allowed_delete %>
|
||||||
|
|||||||
@ -20,34 +20,39 @@
|
|||||||
|
|
||||||
<% unless edit %>
|
<% unless edit %>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_edit), edit_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder,
|
<%= context_menu_link sprite_icon('edit', l(:button_edit)),
|
||||||
back_url: back_url), class: 'icon icon-edit', data: { cy: "icon__edit--dmsf_folder_#{dmsf_folder.id}" },
|
edit_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, back_url: back_url),
|
||||||
|
class: 'icon icon-edit', data: { cy: "icon__edit--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
disabled: !allowed || locked %>
|
disabled: !allowed || locked %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless dmsf_link %>
|
<% unless dmsf_link %>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copymove_entries_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('copy', "#{l(:button_copy)}/#{l(:button_move)}"),
|
||||||
ids: ["folder-#{dmsf_folder.id}"], back_url: back_url), class: 'icon icon-copy',
|
copymove_entries_path(id: project, folder_id: folder, ids: ["folder-#{dmsf_folder.id}"],
|
||||||
data: { cy: "icon__copy--dmsf_folder_#{dmsf_folder.id}" }, disabled: !allowed || locked %>
|
back_url: back_url), class: 'icon icon-copy',
|
||||||
|
data: { cy: "icon__copy--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
|
disabled: !allowed || locked %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:label_link_to),
|
<%= context_menu_link sprite_icon('link', l(:label_link_to)),
|
||||||
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_folder.id, type: 'link_to',
|
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_folder.id, type: 'link_to',
|
||||||
back_url: back_url), class: 'icon dmsf-icon-link',
|
back_url: back_url), class: 'icon dmsf-icon-link',
|
||||||
data: { cy: "icon__link_to--dmsf_folder_#{dmsf_folder.id}" } %>
|
data: { cy: "icon__link_to--dmsf_folder_#{dmsf_folder.id}" } %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless edit %>
|
<% unless edit %>
|
||||||
<li>
|
<li>
|
||||||
<% if locked %>
|
<% if locked %>
|
||||||
<%= context_menu_link l(:button_unlock), unlock_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder,
|
<%= context_menu_link sprite_icon('unlock', l(:button_unlock)),
|
||||||
back_url: back_url), title: l(:title_locked_by_user, user: dmsf_folder.locked_by),
|
unlock_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, back_url: back_url),
|
||||||
class: 'icon icon-unlock', data: { cy: "icon__unlock--dmsf_folder_#{dmsf_folder.id}" },
|
title: l(:title_locked_by_user, user: dmsf_folder.locked_by), class: 'icon icon-unlock',
|
||||||
|
data: { cy: "icon__unlock--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
disabled: !allowed || !unlockable %>
|
disabled: !allowed || !unlockable %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= context_menu_link l(:button_lock), lock_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder,
|
<%= context_menu_link sprite_icon('lock', l(:button_lock)),
|
||||||
back_url: back_url), class: 'icon icon-lock', data: { cy: "icon__lock--dmsf_folder_#{dmsf_folder.id}" },
|
lock_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, back_url: back_url),
|
||||||
|
class: 'icon icon-lock', data: { cy: "icon__lock--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
disabled: !allowed %>
|
disabled: !allowed %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
@ -55,28 +60,34 @@
|
|||||||
<% if notifications %>
|
<% if notifications %>
|
||||||
<li>
|
<li>
|
||||||
<% if dmsf_folder.notification %>
|
<% if dmsf_folder.notification %>
|
||||||
<%= context_menu_link l(:label_notifications_off), notify_deactivate_dmsf_path(id: dmsf_folder.project,
|
<%= context_menu_link sprite_icon('email', l(:label_notifications_off)),
|
||||||
folder_id: dmsf_folder, back_url: back_url), class: 'icon icon-email',
|
notify_deactivate_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder,
|
||||||
data: { cy: "icon__email--dmsf_folder_#{dmsf_folder.id}" },
|
back_url: back_url), class: 'icon icon-email',
|
||||||
disabled: !allowed || locked || !dmsf_folder.notification? %>
|
data: { cy: "icon__email--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
|
disabled: !allowed || locked || !dmsf_folder.notification? %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= context_menu_link l(:label_notifications_on), notify_activate_dmsf_path(id: dmsf_folder.project,
|
<%= context_menu_link sprite_icon('email-disabled', l(:label_notifications_on)),
|
||||||
folder_id: dmsf_folder, back_url: back_url), class: 'icon icon-email-add',
|
notify_activate_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder,
|
||||||
data: { cy: "icon__email_add--dmsf_folder_#{dmsf_folder.id}" },
|
back_url: back_url), class: 'icon icon-email-add',
|
||||||
disabled: !allowed || locked || dmsf_folder.notification? %>
|
data: { cy: "icon__email_add--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
|
disabled: !allowed || locked || dmsf_folder.notification? %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless edit %>
|
<% unless edit %>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_download), entries_operations_dmsf_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('download', l(:button_download)),
|
||||||
ids: params[:ids], download_entries: true, back_url: back_url), method: :post, class: 'icon icon-download',
|
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
|
||||||
|
download_entries: true, back_url: back_url),
|
||||||
|
method: :post, class: 'icon icon-download',
|
||||||
data: { cy: "icon__download--dmsf_folder_#{dmsf_folder.id}" },
|
data: { cy: "icon__download--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
id: 'dmsf-cm-download', disabled: false %>
|
id: 'dmsf-cm-download', disabled: false %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:field_mail), entries_operations_dmsf_path(id: dmsf_folder.project, folder_id: folder,
|
<%= context_menu_link sprite_icon('email', l(:field_mail)),
|
||||||
ids: params[:ids], email_entries: true, back_url: back_url), method: :post, class: 'icon icon-email',
|
entries_operations_dmsf_path(id: dmsf_folder.project, folder_id: folder, ids: params[:ids],
|
||||||
|
email_entries: true, back_url: back_url),
|
||||||
|
method: :post, class: 'icon icon-email',
|
||||||
data: { cy: "icon__email--dmsf_folder_#{dmsf_folder.id}" },
|
data: { cy: "icon__email--dmsf_folder_#{dmsf_folder.id}" },
|
||||||
disabled: !email_allowed %>
|
disabled: !email_allowed %>
|
||||||
</li>
|
</li>
|
||||||
@ -85,7 +96,7 @@
|
|||||||
<%= render partial: 'dmsf_context_menus/watch', locals: { object: dmsf_folder } %>
|
<%= render partial: 'dmsf_context_menus/watch', locals: { object: dmsf_folder } %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_delete),
|
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||||
dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder, back_url: back_url) :
|
dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder, back_url: back_url) :
|
||||||
delete_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, parent_id: folder, back_url: back_url),
|
delete_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, parent_id: folder, back_url: back_url),
|
||||||
data: { confirm: "#{l(:text_are_you_sure)}\n#{l(:text_not_empty) unless dmsf_folder.empty?}",
|
data: { confirm: "#{l(:text_are_you_sure)}\n#{l(:text_not_empty) unless dmsf_folder.empty?}",
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:title_restore),
|
<%= context_menu_link sprite_icon('reload', l(:title_restore)),
|
||||||
dmsf_link ? restore_dmsf_link_path(id: dmsf_link) : restore_dmsf_path(id: project, folder_id: dmsf_folder),
|
dmsf_link ? restore_dmsf_link_path(id: dmsf_link) : restore_dmsf_path(id: project, folder_id: dmsf_folder),
|
||||||
class: 'icon icon-cancel', disabled: !allowed_restore %>
|
class: 'icon icon-cancel', disabled: !allowed_restore %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_delete),
|
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||||
dmsf_link ? dmsf_link_path(id: dmsf_link, commit: 'yes') : delete_dmsf_path(id: project, folder_id: dmsf_folder, commit: 'yes'),
|
dmsf_link ? dmsf_link_path(id: dmsf_link, commit: 'yes') : delete_dmsf_path(id: project, folder_id: dmsf_folder, commit: 'yes'),
|
||||||
data: { confirm: l(:text_are_you_sure) }, method: :delete, class: 'icon icon-del',
|
data: { confirm: l(:text_are_you_sure) }, method: :delete, class: 'icon icon-del',
|
||||||
id: 'dmsf-cm-delete', disabled: !allowed_delete %>
|
id: 'dmsf-cm-delete', disabled: !allowed_delete %>
|
||||||
|
|||||||
@ -20,13 +20,13 @@
|
|||||||
|
|
||||||
<% if folder_manipulation_allowed && !system_folder %>
|
<% if folder_manipulation_allowed && !system_folder %>
|
||||||
<% if folder.nil? %>
|
<% if folder.nil? %>
|
||||||
<%= link_to l(:button_edit),
|
<%= link_to sprite_icon('edit', l(:button_edit)),
|
||||||
edit_root_dmsf_path(id: project),
|
edit_root_dmsf_path(id: project),
|
||||||
title: l(:link_edit, title: l(:link_documents)),
|
title: l(:link_edit, title: l(:link_documents)),
|
||||||
class: 'icon icon-edit',
|
class: 'icon icon-edit',
|
||||||
data: { cy: 'button__edit--dmsf' } %>
|
data: { cy: 'button__edit--dmsf' } %>
|
||||||
<% elsif !locked_for_user %>
|
<% elsif !locked_for_user %>
|
||||||
<%= link_to l(:button_edit),
|
<%= link_to sprite_icon('edit', l(:button_edit)),
|
||||||
edit_dmsf_path(id: project, folder_id: folder, redirect_to_folder_id: folder.id),
|
edit_dmsf_path(id: project, folder_id: folder, redirect_to_folder_id: folder.id),
|
||||||
title: l(:link_edit, title: h(folder.title)),
|
title: l(:link_edit, title: h(folder.title)),
|
||||||
class: 'icon icon-edit',
|
class: 'icon icon-edit',
|
||||||
@ -35,13 +35,13 @@
|
|||||||
<% if folder && (!locked_for_user || User.current.allowed_to?(:force_file_unlock, project)) %>
|
<% if folder && (!locked_for_user || User.current.allowed_to?(:force_file_unlock, project)) %>
|
||||||
<% if folder.locked? %>
|
<% if folder.locked? %>
|
||||||
<%= link_to_if folder.unlockable?,
|
<%= link_to_if folder.unlockable?,
|
||||||
l(:button_unlock),
|
sprite_icon('unlock', l(:button_unlock)),
|
||||||
unlock_dmsf_path(id: project, folder_id: folder, current: request.url),
|
unlock_dmsf_path(id: project, folder_id: folder, current: request.url),
|
||||||
title: l(:title_unlock_folder),
|
title: l(:title_unlock_folder),
|
||||||
class: 'icon icon-unlock',
|
class: 'icon icon-unlock',
|
||||||
data: { cy: 'button__unlock--dmsf' } %>
|
data: { cy: 'button__unlock--dmsf' } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:button_lock),
|
<%= link_to sprite_icon('lock', l(:button_lock)),
|
||||||
lock_dmsf_path(id: project, folder_id: folder, current: request.url),
|
lock_dmsf_path(id: project, folder_id: folder, current: request.url),
|
||||||
title: l(:title_lock_folder), class: 'icon icon-lock',
|
title: l(:title_lock_folder), class: 'icon icon-lock',
|
||||||
data: { cy: 'button__lock--dmsf' } %>
|
data: { cy: 'button__lock--dmsf' } %>
|
||||||
@ -49,13 +49,13 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% if notifications %>
|
<% if notifications %>
|
||||||
<% if !locked_for_user && ((folder && folder.notification) || (!folder && project.dmsf_notification)) %>
|
<% if !locked_for_user && ((folder && folder.notification) || (!folder && project.dmsf_notification)) %>
|
||||||
<%= link_to l(:label_notifications_off),
|
<%= link_to sprite_icon('email', l(:label_notifications_off)),
|
||||||
notify_deactivate_dmsf_path(id: project, folder_id: folder),
|
notify_deactivate_dmsf_path(id: project, folder_id: folder),
|
||||||
title: l(:title_notifications_active_deactivate),
|
title: l(:title_notifications_active_deactivate),
|
||||||
class: 'icon icon-email',
|
class: 'icon icon-email',
|
||||||
data: { cy: 'button__notifications-off--dmsf' } %>
|
data: { cy: 'button__notifications-off--dmsf' } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:label_notifications_on),
|
<%= link_to sprite_icon('email-disabled', l(:label_notifications_on)),
|
||||||
notify_activate_dmsf_path(id: project, folder_id: folder),
|
notify_activate_dmsf_path(id: project, folder_id: folder),
|
||||||
title: l(:title_notifications_not_active_activate),
|
title: l(:title_notifications_not_active_activate),
|
||||||
class: 'icon icon-email-add',
|
class: 'icon icon-email-add',
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if file_manipulation_allowed && !locked_for_user %>
|
<% if file_manipulation_allowed && !locked_for_user %>
|
||||||
<%= link_to l(:label_link_from),
|
<%= link_to sprite_icon('link', l(:label_link_from)),
|
||||||
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: folder ? folder.id : folder,
|
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: folder ? folder.id : folder,
|
||||||
type: 'link_from'),
|
type: 'link_from'),
|
||||||
title: l(:title_create_link),
|
title: l(:title_create_link),
|
||||||
@ -73,19 +73,19 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<%= render partial: 'dmsf_context_menus/watch', locals: { object: folder ? folder : project } %>
|
<%= render partial: 'dmsf_context_menus/watch', locals: { object: folder ? folder : project } %>
|
||||||
<% if trash_enabled %>
|
<% if trash_enabled %>
|
||||||
<%= link_to l(:link_trash_bin),
|
<%= link_to sprite_icon('del', l(:link_trash_bin)),
|
||||||
trash_dmsf_path(project),
|
trash_dmsf_path(project),
|
||||||
title: l(:link_trash_bin),
|
title: l(:link_trash_bin),
|
||||||
class: 'icon icon-del',
|
class: 'icon icon-del',
|
||||||
data: { cy: 'button__trash--dmsf' } %>
|
data: { cy: 'button__trash--dmsf' } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon icon-del">
|
<span class="icon icon-del">
|
||||||
<%= l(:link_trash_bin) %>
|
<%= sprite_icon('del', l(:link_trash_bin)) %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% lang = current_language.to_s.downcase %>
|
<% lang = current_language.to_s.downcase %>
|
||||||
<% path = File.join(File.dirname(__FILE__), '..', '..', '..', 'assets', 'help', lang, 'dmsf_help.html') %>
|
<% path = File.join(File.dirname(__FILE__), '..', '..', '..', 'assets', 'help', lang, 'dmsf_help.html') %>
|
||||||
<% lang = 'en' unless File.exist?(path) %>
|
<% lang = 'en' unless File.exist?(path) %>
|
||||||
<% url = "/plugin_assets/redmine_dmsf/help/#{lang}/dmsf_help.html" %>
|
<% url = "/plugin_assets/redmine_dmsf/help/#{lang}/dmsf_help.html" %>
|
||||||
<%= link_to l(:label_help), 'dmsf_help.html', class: 'icon icon-help',
|
<%= link_to sprite_icon('help', l(:label_help)), 'dmsf_help.html', class: 'icon icon-help',
|
||||||
onclick: "window.open('#{url}','_blank', 'width=640,height=960'); return false;" %>
|
onclick: "window.open('#{url}','_blank', 'width=640,height=960'); return false;" %>
|
||||||
|
|||||||
@ -19,20 +19,26 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_download), entries_operations_dmsf_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('download', l(:button_download)),
|
||||||
ids: params[:ids], download_entries: true), method: :post, class: 'icon icon-download', disabled: project.nil? %>
|
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
|
||||||
|
download_entries: true),
|
||||||
|
method: :post, class: 'icon icon-download', disabled: project.nil? %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:field_mail), entries_operations_dmsf_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('email', l(:field_mail)),
|
||||||
ids: params[:ids], email_entries: true), method: :post, class: 'icon icon-email',
|
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
|
||||||
disabled: !email_allowed %>
|
email_entries: true),
|
||||||
|
method: :post, class: 'icon icon-email', disabled: !email_allowed %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copymove_entries_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('copy', "#{l(:button_copy)}/#{l(:button_move)}"),
|
||||||
ids: params[:ids], back_url: back_url), class: 'icon icon-copy', disabled: project.nil? %>
|
copymove_entries_path(id: project, folder_id: folder, ids: params[:ids], back_url: back_url),
|
||||||
|
class: 'icon icon-copy', disabled: project.nil? %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_delete), entries_operations_dmsf_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||||
ids: params[:ids], delete_entries: true), method: :post, class: 'icon icon-del',
|
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
|
||||||
data: { confirm: l(:text_are_you_sure) }, id: 'dmsf-cm-delete', disabled: !allowed %>
|
delete_entries: true),
|
||||||
|
method: :post, class: 'icon icon-del', data: { confirm: l(:text_are_you_sure) },
|
||||||
|
id: 'dmsf-cm-delete', disabled: !allowed %>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -19,11 +19,15 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:title_restore), entries_operations_dmsf_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('reload', l(:title_restore)),
|
||||||
ids: params[:ids], restore_entries: true), method: :post, class: 'icon icon-cancel', disabled: !allowed_restore %>
|
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
|
||||||
|
restore_entries: true),
|
||||||
|
method: :post, class: 'icon icon-cancel', disabled: !allowed_restore %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_delete), entries_operations_dmsf_path(id: project, folder_id: folder,
|
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||||
ids: params[:ids], destroy_entries: true), method: :post, class: 'icon icon-del',
|
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
|
||||||
data: { confirm: l(:text_are_you_sure) }, id: 'dmsf-cm-delete', disabled: !allowed_delete %>
|
destroy_entries: true),
|
||||||
|
method: :post, class: 'icon icon-del', data: { confirm: l(:text_are_you_sure) },
|
||||||
|
id: 'dmsf-cm-delete', disabled: !allowed_delete %>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -18,18 +18,19 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<%= link_to_function l(:title_download_entries),
|
<%= link_to_function sprite_icon('group', l(:title_download_entries)),
|
||||||
"$('#revision_access_#{revision.id}').toggle(); $('.drdn.expanded').removeClass('expanded');",
|
"$('#revision_access_#{revision.id}').toggle(); $('.drdn.expanded').removeClass('expanded');",
|
||||||
class: 'icon icon-group dmsf-revision-action-button' %>
|
class: 'icon icon-group dmsf-revision-action-button' %>
|
||||||
<% member = Member.find_by(user_id: User.current.id, project_id: revision.dmsf_file.project.id) %>
|
<% member = Member.find_by(user_id: User.current.id, project_id: revision.dmsf_file.project.id) %>
|
||||||
<% filename = revision.formatted_name(member) %>
|
<% filename = revision.formatted_name(member) %>
|
||||||
<%= link_to l(:button_download), static_dmsf_file_path(file, download: revision, filename: filename),
|
<%= link_to sprite_icon('download', l(:button_download)),
|
||||||
|
static_dmsf_file_path(file, download: revision, filename: filename),
|
||||||
class: 'icon icon-download', disabled: false %>
|
class: 'icon icon-download', disabled: false %>
|
||||||
<%= link_to l(:title_obsolete_revision),
|
<%= link_to sprite_icon('close', l(:title_obsolete_revision)),
|
||||||
obsolete_revision_path(revision),
|
obsolete_revision_path(revision),
|
||||||
data: { confirm: l(:text_are_you_sure) },
|
data: { confirm: l(:text_are_you_sure) },
|
||||||
class: 'icon icon-close dmsf-revision-action-button' if file_manipulation_allowed && (revision.workflow == DmsfWorkflow::STATE_APPROVED) %>
|
class: 'icon icon-close dmsf-revision-action-button' if file_manipulation_allowed && (revision.workflow == DmsfWorkflow::STATE_APPROVED) %>
|
||||||
<%= link_to l(:button_delete),
|
<%= link_to sprite_icon('del', l(:button_delete)),
|
||||||
delete_revision_path(revision),
|
delete_revision_path(revision),
|
||||||
data: { confirm: l(:text_are_you_sure) },
|
data: { confirm: l(:text_are_you_sure) },
|
||||||
title: l(:title_delete_revision),
|
title: l(:title_delete_revision),
|
||||||
|
|||||||
@ -20,28 +20,28 @@
|
|||||||
|
|
||||||
<% if notifications %>
|
<% if notifications %>
|
||||||
<% if file.notification %>
|
<% if file.notification %>
|
||||||
<%= link_to l(:label_notifications_off),
|
<%= link_to sprite_icon('email', l(:label_notifications_off)),
|
||||||
notify_deactivate_dmsf_files_path(id: file, back_url: back_url),
|
notify_deactivate_dmsf_files_path(id: file, back_url: back_url),
|
||||||
title: l(:title_notifications_active_deactivate),
|
title: l(:title_notifications_active_deactivate),
|
||||||
class: 'icon icon-email' %>
|
class: 'icon icon-email' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:label_notifications_on),
|
<%= link_to sprite_icon('email-disabled', l(:label_notifications_on)),
|
||||||
notify_activate_dmsf_files_path(id: file, back_url: back_url),
|
notify_activate_dmsf_files_path(id: file, back_url: back_url),
|
||||||
title: l(:title_notifications_not_active_activate),
|
title: l(:title_notifications_not_active_activate),
|
||||||
class: 'icon icon-email-add' %>
|
class: 'icon icon-email-add' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to l(:label_link_to),
|
<%= link_to sprite_icon('link', l(:label_link_to)),
|
||||||
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: file.dmsf_folder ? file.dmsf_folder.id : nil,
|
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: file.dmsf_folder ? file.dmsf_folder.id : nil,
|
||||||
dmsf_file_id: file.id, type: 'link_to', back_url: back_url),
|
dmsf_file_id: file.id, type: 'link_to', back_url: back_url),
|
||||||
title: l(:title_create_link),
|
title: l(:title_create_link), class: 'icon dmsf-icon-link' %>
|
||||||
class: 'icon dmsf-icon-link' %>
|
<%= context_menu_link sprite_icon('copy', "#{l(:button_copy)}/#{l(:button_move)}"),
|
||||||
<%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copymove_entries_path(id: project,
|
copymove_entries_path(id: project, folder_id: file.dmsf_folder, ids: ["file-#{file.id}"],
|
||||||
folder_id: file.dmsf_folder, ids: ["file-#{file.id}"], back_url: back_url), class: 'icon icon-copy' %>
|
back_url: back_url), class: 'icon icon-copy' %>
|
||||||
<% member = Member.find_by(user_id: User.current.id, project_id: file.project.id) %>
|
<% member = Member.find_by(user_id: User.current.id, project_id: file.project.id) %>
|
||||||
<% filename = file.last_revision&.formatted_name(member) %>
|
<% filename = file.last_revision&.formatted_name(member) %>
|
||||||
<%= link_to l(:button_download), static_dmsf_file_path(file, filename: filename), class: 'icon icon-download',
|
<%= link_to sprite_icon('download', l(:button_download)),
|
||||||
disabled: false %>
|
static_dmsf_file_path(file, filename: filename), class: 'icon icon-download', disabled: false %>
|
||||||
<%= render partial: 'dmsf_context_menus/watch', locals: { object: file } %>
|
<%= render partial: 'dmsf_context_menus/watch', locals: { object: file } %>
|
||||||
<%= delete_link(dmsf_file_path(id: file, details: true),
|
<%= delete_link(dmsf_file_path(id: file, details: true),
|
||||||
back_url: dmsf_folder_path(id: file.project, folder_id: file.dmsf_folder)) if file_delete_allowed %>
|
back_url: dmsf_folder_path(id: file.project, folder_id: file.dmsf_folder)) if file_delete_allowed %>
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_delete), dmsf_link_path(dmsf_link), method: :delete, class: 'icon icon-del',
|
<%= context_menu_link sprite_icon('del', l(:button_delete)), dmsf_link_path(dmsf_link), method: :delete,
|
||||||
data: { confirm: l(:text_are_you_sure) }, id: 'dmsf-cm-delete', disabled: !allowed %>
|
class: 'icon icon-del', data: { confirm: l(:text_are_you_sure) }, id: 'dmsf-cm-delete',
|
||||||
|
disabled: !allowed %>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<% watched = object.watched_by?(User.current) %>
|
<% watched = object.watched_by?(User.current) %>
|
||||||
<% css = [watcher_css([object]), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ') %>
|
<% css = [watcher_css([object]), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ') %>
|
||||||
<% text = watched ? l(:button_unwatch) : l(:button_watch) %>
|
<% text = sprite_icon('fav', watched ? l(:button_unwatch) : l(:button_watch)) %>
|
||||||
<% url = watch_path(object_type: object.class.to_s.underscore, object_id: object.id) %>
|
<% url = watch_path(object_type: object.class.to_s.underscore, object_id: object.id) %>
|
||||||
<% method = watched ? 'delete' : 'post' %>
|
<% method = watched ? 'delete' : 'post' %>
|
||||||
<%= context_menu_link text, url, method: method, class: css, disabled: !User.current.logged? %>
|
<%= context_menu_link text, url, method: method, class: css, disabled: !User.current.logged? %>
|
||||||
|
|||||||
@ -24,17 +24,18 @@
|
|||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<% if @file.locked_for_user? %>
|
<% if @file.locked_for_user? %>
|
||||||
<% if User.current.allowed_to?(:force_file_unlock, @project) %>
|
<% if User.current.allowed_to?(:force_file_unlock, @project) %>
|
||||||
<%= link_to_if @file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(id: @file,
|
<%= link_to_if @file.unlockable?, sprite_icon('unlock', l(:button_unlock)),
|
||||||
back_url: dmsf_file_path(id: @file)),
|
unlock_dmsf_files_path(id: @file, back_url: dmsf_file_path(id: @file)),
|
||||||
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @file.locked? %>
|
<% if @file.locked? %>
|
||||||
<%= link_to_if @file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(id: @file,
|
<%= link_to_if @file.unlockable?, sprite_icon('unlock', l(:button_unlock)),
|
||||||
back_url: dmsf_file_path(id: @file)),
|
unlock_dmsf_files_path(id: @file, back_url: dmsf_file_path(id: @file)),
|
||||||
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:button_lock), lock_dmsf_files_path(id: @file, back_url: dmsf_file_path(id: @file)),
|
<%= link_to sprite_icon('lock', l(:button_lock)),
|
||||||
|
lock_dmsf_files_path(id: @file, back_url: dmsf_file_path(id: @file)),
|
||||||
title: l(:title_lock_file), class: 'icon icon-lock' %>
|
title: l(:title_lock_file), class: 'icon icon-lock' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if defined?(EasyExtensions) %>
|
<% if defined?(EasyExtensions) %>
|
||||||
|
|||||||
@ -113,7 +113,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<% if defined?(container) && container %>
|
<% if defined?(container) && container %>
|
||||||
<span class="dmsf-add-link">
|
<span class="dmsf-add-link">
|
||||||
<%= link_to l(:label_link_from),
|
<%= link_to sprite_icon('add', l(:label_link_from)),
|
||||||
new_dmsf_link_path(project_id: project.id, type: 'link_from', container: container.class.name),
|
new_dmsf_link_path(project_id: project.id, type: 'link_from', container: container.class.name),
|
||||||
title: l(:title_create_link), class: 'icon icon-add file_selector', remote: true %>
|
title: l(:title_create_link), class: 'icon icon-add file_selector', remote: true %>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -32,7 +32,8 @@
|
|||||||
</p>
|
</p>
|
||||||
<% if (!remote) && User.current.allowed_to?(:manage_workflows, @project) %>
|
<% if (!remote) && User.current.allowed_to?(:manage_workflows, @project) %>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(project_id: @project.id), class: 'icon icon-add' %>
|
<%= link_to sprite_icon('add', l(:label_dmsf_workflow_new)), new_dmsf_workflow_path(project_id: @project.id),
|
||||||
|
class: 'icon icon-add' %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p class="buttons">
|
<p class="buttons">
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<% @workflows = DmsfWorkflow.status(@status).where(project_id: @project.id).sorted %>
|
<% @workflows = DmsfWorkflow.status(@status).where(project_id: @project.id).sorted %>
|
||||||
<% @path = settings_project_path(@project, tab: 'dmsf_workflow') %>
|
<% @path = settings_project_path(@project, tab: 'dmsf_workflow') %>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(project_id: @project&.id), class: 'icon icon-add',
|
<%= link_to sprite_icon('add', l(:label_dmsf_workflow_new)), new_dmsf_workflow_path(project_id: @project&.id),
|
||||||
data: { cy: "button__new--dmsf-workflow" } %>
|
class: 'icon icon-add', data: { cy: "button__new--dmsf-workflow" } %>
|
||||||
</p>
|
</p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(project_id: @project&.id), class: 'icon icon-add',
|
<%= link_to sprite_icon('add', l(:label_dmsf_workflow_new)), new_dmsf_workflow_path(project_id: @project&.id),
|
||||||
data: { cy: "button__new--dmsf-workflow" } %>
|
class: 'icon icon-add', data: { cy: "button__new--dmsf-workflow" } %>
|
||||||
</div>
|
</div>
|
||||||
<h2><%= l(:label_dmsf_workflow_plural) %></h2>
|
<h2><%= l(:label_dmsf_workflow_plural) %></h2>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -63,11 +63,13 @@
|
|||||||
<td class="buttons">
|
<td class="buttons">
|
||||||
<% url = { controller: 'dmsf_workflows', action: 'update', id: workflow.id } %>
|
<% url = { controller: 'dmsf_workflows', action: 'update', id: workflow.id } %>
|
||||||
<% if workflow.locked? %>
|
<% if workflow.locked? %>
|
||||||
<%= link_to l(:button_unlock), url.merge(dmsf_workflow: { status: DmsfWorkflow::STATUS_ACTIVE }),
|
<%= link_to sprite_icon('unlock', l(:button_unlock)),
|
||||||
method: :put, class: 'icon icon-unlock' %>
|
url.merge(dmsf_workflow: { status: DmsfWorkflow::STATUS_ACTIVE }), method: :put,
|
||||||
|
class: 'icon icon-unlock' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(:button_lock), url.merge(dmsf_workflow: { status: DmsfWorkflow::STATUS_LOCKED }),
|
<%= link_to sprite_icon('lock', l(:button_lock)),
|
||||||
method: :put, class: 'icon icon-lock' %>
|
url.merge(dmsf_workflow: { status: DmsfWorkflow::STATUS_LOCKED }), method: :put,
|
||||||
|
class: 'icon icon-lock' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= delete_link dmsf_workflow_path(workflow, back_url: @path) %>
|
<%= delete_link dmsf_workflow_path(workflow, back_url: @path) %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
<div id="tab-content-members">
|
<div id="tab-content-members">
|
||||||
<p>
|
<p>
|
||||||
<%= link_to l(:dmsf_new_step_or_approver), new_step_dmsf_workflow_path(@dmsf_workflow), remote: true,
|
<%= link_to sprite_icon('add', l(:dmsf_new_step_or_approver)), new_step_dmsf_workflow_path(@dmsf_workflow),
|
||||||
class: 'icon icon-add' %>
|
remote: true, class: 'icon icon-add' %>
|
||||||
</p>
|
</p>
|
||||||
<% steps = @dmsf_workflow.dmsf_workflow_steps.collect{|s| s.step}.uniq %>
|
<% steps = @dmsf_workflow.dmsf_workflow_steps.collect{|s| s.step}.uniq %>
|
||||||
<% if steps.any? %>
|
<% if steps.any? %>
|
||||||
@ -119,7 +119,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="buttons">
|
<td class="buttons">
|
||||||
<%= reorder_handle(@dmsf_workflow, url: url_for(action: 'edit', id: @dmsf_workflow, step: i) ) %>
|
<%= reorder_handle(@dmsf_workflow, url: url_for(action: 'edit', id: @dmsf_workflow, step: i) ) %>
|
||||||
<%= link_to_function l(:button_edit),
|
<%= link_to_function sprite_icon('edit', l(:button_edit)),
|
||||||
"$('#step-index-#{index}-name').hide(); $('#step-index-#{index}-approvers').hide(); $('#step-index-#{index}-name-form').show(); $('#step-index-#{index}-approvers-form').show();",
|
"$('#step-index-#{index}-name').hide(); $('#step-index-#{index}-approvers').hide(); $('#step-index-#{index}-name-form').show(); $('#step-index-#{index}-approvers-form').show();",
|
||||||
class: 'icon icon-edit' %>
|
class: 'icon icon-edit' %>
|
||||||
<%= delete_link edit_dmsf_workflow_path(@dmsf_workflow, step: i,
|
<%= delete_link edit_dmsf_workflow_path(@dmsf_workflow, step: i,
|
||||||
|
|||||||
@ -150,8 +150,7 @@ div[id*="revision_access_"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Command icons */
|
/* Command icons */
|
||||||
.dmsf-icon-link { background-image: url("../../../images/link.png"); }
|
.dmsf-icon-link:not(:has(svg)) { background-image: url("../../../images/link.png"); }
|
||||||
.icon-approvalworkflows { background-image: url("../../../images/ticket_go.png"); }
|
|
||||||
|
|
||||||
/* File types */
|
/* File types */
|
||||||
.dmsf-icon-file{
|
.dmsf-icon-file{
|
||||||
|
|||||||
@ -30,83 +30,83 @@ class DmsfWebdavHeadTest < RedmineDmsf::Test::IntegrationTest
|
|||||||
check_headers_dont_exist
|
check_headers_dont_exist
|
||||||
end
|
end
|
||||||
|
|
||||||
# def test_head_responds_with_authentication
|
def test_head_responds_with_authentication
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}", params: nil, headers: @admin
|
head "/dmsf/webdav/#{@project1.identifier}", params: nil, headers: @admin
|
||||||
# assert_response :success
|
assert_response :success
|
||||||
# check_headers_exist
|
check_headers_exist
|
||||||
# with_settings plugin_redmine_dmsf: { 'dmsf_webdav_use_project_names' => '1', 'dmsf_webdav' => '1' } do
|
with_settings plugin_redmine_dmsf: { 'dmsf_webdav_use_project_names' => '1', 'dmsf_webdav' => '1' } do
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}", params: nil, headers: @admin
|
head "/dmsf/webdav/#{@project1.identifier}", params: nil, headers: @admin
|
||||||
# assert_response :not_found
|
assert_response :not_found
|
||||||
# project1_name = RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1)
|
project1_name = RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1)
|
||||||
# project1_uri = Addressable::URI.escape(project1_name)
|
project1_uri = Addressable::URI.escape(project1_name)
|
||||||
# head "/dmsf/webdav/#{project1_uri}", params: nil, headers: @admin
|
head "/dmsf/webdav/#{project1_uri}", params: nil, headers: @admin
|
||||||
# assert_response :success
|
assert_response :success
|
||||||
# end
|
end
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# # NOTE: At present we use Rack to serve the file, this makes life easy however it removes the Etag
|
# NOTE: At present we use Rack to serve the file, this makes life easy however it removes the Etag
|
||||||
# # header and invalidates the test - where as a folder listing will always not include a last-modified
|
# header and invalidates the test - where as a folder listing will always not include a last-modified
|
||||||
# # (but may include an etag, so there is an allowance for a 1 in 2 failure rate on (optionally) required
|
# (but may include an etag, so there is an allowance for a 1 in 2 failure rate on (optionally) required
|
||||||
# # headers)
|
# headers)
|
||||||
# def test_head_responds_to_file
|
def test_head_responds_to_file
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}/test.txt", params: nil, headers: @admin
|
head "/dmsf/webdav/#{@project1.identifier}/test.txt", params: nil, headers: @admin
|
||||||
# assert_response :success
|
assert_response :success
|
||||||
# check_headers_exist
|
check_headers_exist
|
||||||
# with_settings plugin_redmine_dmsf: { 'dmsf_webdav_use_project_names' => '1', 'dmsf_webdav' => '1' } do
|
with_settings plugin_redmine_dmsf: { 'dmsf_webdav_use_project_names' => '1', 'dmsf_webdav' => '1' } do
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}/test.txt", params: nil, headers: @admin
|
head "/dmsf/webdav/#{@project1.identifier}/test.txt", params: nil, headers: @admin
|
||||||
# assert_response :conflict
|
assert_response :conflict
|
||||||
# project1_name = RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1)
|
project1_name = RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1)
|
||||||
# project1_uri = Addressable::URI.escape(project1_name)
|
project1_uri = Addressable::URI.escape(project1_name)
|
||||||
# head "/dmsf/webdav/#{project1_uri}/test.txt", params: nil, headers: @admin
|
head "/dmsf/webdav/#{project1_uri}/test.txt", params: nil, headers: @admin
|
||||||
# assert_response :success
|
assert_response :success
|
||||||
# end
|
end
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_responds_to_file_anonymous_other_user_agent
|
def test_head_responds_to_file_anonymous_other_user_agent
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}/test.txt", params: nil, headers: { HTTP_USER_AGENT: 'Other' }
|
head "/dmsf/webdav/#{@project1.identifier}/test.txt", params: nil, headers: { HTTP_USER_AGENT: 'Other' }
|
||||||
# assert_response :unauthorized
|
assert_response :unauthorized
|
||||||
# check_headers_dont_exist
|
check_headers_dont_exist
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_fails_when_file_not_found
|
def test_head_fails_when_file_not_found
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}/not_here.txt", params: nil, headers: @admin
|
head "/dmsf/webdav/#{@project1.identifier}/not_here.txt", params: nil, headers: @admin
|
||||||
# assert_response :not_found
|
assert_response :not_found
|
||||||
# check_headers_dont_exist
|
check_headers_dont_exist
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_fails_when_file_not_found_anonymous_other_user_agent
|
def test_head_fails_when_file_not_found_anonymous_other_user_agent
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}/not_here.txt", params: nil, headers: { HTTP_USER_AGENT: 'Other' }
|
head "/dmsf/webdav/#{@project1.identifier}/not_here.txt", params: nil, headers: { HTTP_USER_AGENT: 'Other' }
|
||||||
# assert_response :unauthorized
|
assert_response :unauthorized
|
||||||
# check_headers_dont_exist
|
check_headers_dont_exist
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_fails_when_folder_not_found
|
def test_head_fails_when_folder_not_found
|
||||||
# head '/dmsf/webdav/folder_not_here', params: nil, headers: @admin
|
head '/dmsf/webdav/folder_not_here', params: nil, headers: @admin
|
||||||
# assert_response :not_found
|
assert_response :not_found
|
||||||
# check_headers_dont_exist
|
check_headers_dont_exist
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_fails_when_folder_not_found_anonymous_other_user_agent
|
def test_head_fails_when_folder_not_found_anonymous_other_user_agent
|
||||||
# head '/dmsf/webdav/folder_not_here', params: nil, headers: { HTTP_USER_AGENT: 'Other' }
|
head '/dmsf/webdav/folder_not_here', params: nil, headers: { HTTP_USER_AGENT: 'Other' }
|
||||||
# assert_response :unauthorized
|
assert_response :unauthorized
|
||||||
# check_headers_dont_exist
|
check_headers_dont_exist
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_fails_when_project_is_not_enabled_for_dmsf
|
def test_head_fails_when_project_is_not_enabled_for_dmsf
|
||||||
# head "/dmsf/webdav/#{@project2.identifier}/test.txt", params: nil, headers: @jsmith
|
head "/dmsf/webdav/#{@project2.identifier}/test.txt", params: nil, headers: @jsmith
|
||||||
# assert_response :not_found
|
assert_response :not_found
|
||||||
# check_headers_dont_exist
|
check_headers_dont_exist
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_file_in_subproject
|
def test_head_file_in_subproject
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}/#{@project5.identifier}/#{@file12.name}", params: nil, headers: @admin
|
head "/dmsf/webdav/#{@project1.identifier}/#{@project5.identifier}/#{@file12.name}", params: nil, headers: @admin
|
||||||
# assert_response :success
|
assert_response :success
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# def test_head_folder_in_subproject
|
def test_head_folder_in_subproject
|
||||||
# head "/dmsf/webdav/#{@project1.identifier}/#{@project5.identifier}/#{@folder10.title}",
|
head "/dmsf/webdav/#{@project1.identifier}/#{@project5.identifier}/#{@folder10.title}",
|
||||||
# params: nil,
|
params: nil,
|
||||||
# headers: @admin
|
headers: @admin
|
||||||
# assert_response :success
|
assert_response :success
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user