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])
|
||||
begin
|
||||
if revision
|
||||
@project = revision.dmsf_file.project unless @project
|
||||
@project ||= revision.dmsf_file.project
|
||||
revision.set_workflow(params[:dmsf_workflow_id], params[:action])
|
||||
revision.assign_workflow(params[:dmsf_workflow_id])
|
||||
if request.post?
|
||||
|
||||
@ -66,9 +66,7 @@ module RedmineDmsf
|
||||
end
|
||||
end
|
||||
# Upload form
|
||||
if allowed_to_attach_documents(container)
|
||||
html << attach_documents_form(context, label: false)
|
||||
end
|
||||
html << attach_documents_form(context, label: false) if allowed_to_attach_documents(container)
|
||||
unless allowed_to_attach_attachments(container)
|
||||
html << context[:hook_caller].late_javascript_tag("$('.attachments-container:not(.dmsf-uploader)').hide();")
|
||||
end
|
||||
@ -122,7 +120,7 @@ module RedmineDmsf
|
||||
end
|
||||
|
||||
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))
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user