Rubocop #1601
This commit is contained in:
parent
44b21d06d1
commit
5aa7fa7326
@ -216,7 +216,7 @@ class DmsfWorkflowsController < ApplicationController
|
|||||||
revision = DmsfFileRevision.find_by(id: params[:dmsf_file_revision_id])
|
revision = DmsfFileRevision.find_by(id: params[:dmsf_file_revision_id])
|
||||||
begin
|
begin
|
||||||
if revision
|
if revision
|
||||||
@project = revision.dmsf_file.project unless @project
|
@project ||= revision.dmsf_file.project
|
||||||
revision.set_workflow(params[:dmsf_workflow_id], params[:action])
|
revision.set_workflow(params[:dmsf_workflow_id], params[:action])
|
||||||
revision.assign_workflow(params[:dmsf_workflow_id])
|
revision.assign_workflow(params[:dmsf_workflow_id])
|
||||||
if request.post?
|
if request.post?
|
||||||
|
|||||||
@ -66,9 +66,7 @@ module RedmineDmsf
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Upload form
|
# Upload form
|
||||||
if allowed_to_attach_documents(container)
|
html << attach_documents_form(context, label: false) if allowed_to_attach_documents(container)
|
||||||
html << attach_documents_form(context, label: false)
|
|
||||||
end
|
|
||||||
unless allowed_to_attach_attachments(container)
|
unless allowed_to_attach_attachments(container)
|
||||||
html << context[:hook_caller].late_javascript_tag("$('.attachments-container:not(.dmsf-uploader)').hide();")
|
html << context[:hook_caller].late_javascript_tag("$('.attachments-container:not(.dmsf-uploader)').hide();")
|
||||||
end
|
end
|
||||||
@ -122,7 +120,7 @@ module RedmineDmsf
|
|||||||
end
|
end
|
||||||
|
|
||||||
def allowed_to_attach_attachments(container)
|
def allowed_to_attach_attachments(container)
|
||||||
return true unless (defined?(EasyExtensions) && container&.project)
|
return true unless defined?(EasyExtensions) && container&.project
|
||||||
|
|
||||||
!(allowed_to_attach_documents(container) && !container.project.module_enabled?(:documents))
|
!(allowed_to_attach_documents(container) && !container.project.module_enabled?(:documents))
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user