This commit is contained in:
Karel Pičman 2025-07-04 08:02:42 +02:00
parent 7a9c8a0e55
commit 9d1aa70ad7
6 changed files with 9 additions and 16 deletions

View File

@ -110,8 +110,8 @@ Rails/SkipsModelValidations:
Exclude:
- app/helpers/dmsf_upload_helper.rb # touch is Okay
- app/models/dmsf_workflow.rb # update doesn't work here
- patches/user_patch.rb
- patches/role_patch.rb
- lib/redmine_dmsf/patches/user_patch.rb
- lib/redmine_dmsf/patches/role_patch.rb
- db/migrate/20170526144701_dmsf_attachable.rb
- db/migrate/20170421101901_dmsf_file_container_rollback.rb
- db/migrate/20170118142001_dmsf_file_container.rb

View File

@ -28,6 +28,7 @@ module RedmineDmsf
)
return
end
context[:controller].send :render_to_string, { partial: 'hooks/redmine_dmsf/view_layouts_base_html_head' }
end
end

View File

@ -93,8 +93,8 @@ module RedmineDmsf
end
def view_issues_edit_notes_bottom_style(context = {})
if ((User.current.pref.dmsf_attachments_upload_choice == 'Attachments') ||
!allowed_to_attach_documents(context[:container]))
if User.current.pref.dmsf_attachments_upload_choice == 'Attachments' ||
!allowed_to_attach_documents(context[:container])
''
else
'display: none'
@ -150,9 +150,7 @@ module RedmineDmsf
return unless allowed_to_attach_documents(container)
html = +'<p'
if User.current.pref.dmsf_attachments_upload_choice == 'Attachments'
html << ' style="display: none;"'
end
html << ' style="display: none;"' if User.current.pref.dmsf_attachments_upload_choice == 'Attachments'
html << '>'
if label
html << "<label>#{l(:label_document_plural)}</label>"

View File

@ -42,6 +42,4 @@ module RedmineDmsf
end
# Apply the patch
unless RedmineDmsf::Plugin.an_obsolete_plugin_present?
Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch
end
Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch unless RedmineDmsf::Plugin.an_obsolete_plugin_present?

View File

@ -46,6 +46,4 @@ module RedmineDmsf
end
# Apply the patch
if RedmineDmsf::Plugin.an_obsolete_plugin_present?
Redmine::Notifiable.include RedmineDmsf::Patches::NotifiableRuPatch
end
Redmine::Notifiable.include RedmineDmsf::Patches::NotifiableRuPatch if RedmineDmsf::Plugin.an_obsolete_plugin_present?

View File

@ -39,6 +39,4 @@ module RedmineDmsf
end
# Apply the patch
if RedmineDmsf::Plugin.lib_available?('puma/const')
Puma::Const.include RedmineDmsf::Patches::PumaPatch
end
Puma::Const.include RedmineDmsf::Patches::PumaPatch if RedmineDmsf::Plugin.lib_available?('puma/const')