diff --git a/CHANGELOG.md b/CHANGELOG.md index 158d3352..5d7b996c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Changelog for Redmine DMSF ========================== +3.0.13 ????-??-?? +------------------ + 3.0.12 2023-03-15 ------------------ diff --git a/README.md b/README.md index 11e3988d..14627c38 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Redmine DMSF Plugin 3.0.12 -========================== +Redmine DMSF Plugin 3.0.13 devel +================================ -[![GitHub CI](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=master)](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml) +[![GitHub CI](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=devel)](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml) [![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine) Redmine DMSF is Document Management System Features plugin for Redmine issue tracking system; It is aimed to replace current Redmine's Documents module. diff --git a/after_init.rb b/after_init.rb index 4239ed11..83b063b5 100644 --- a/after_init.rb +++ b/after_init.rb @@ -36,10 +36,12 @@ def dmsf_init menu.push :dmsf, { controller: 'dmsf', action: 'show' }, caption: :menu_dmsf, before: :documents, param: :id, html: { class: 'icon icon-dmsf' } # New menu extension - menu.push :dmsf_file, { controller: 'dmsf_upload', action: 'multi_upload'}, - caption: :label_dmsf_new_top_level_document, parent: :new_object - menu.push :dmsf_folder, { controller: 'dmsf', action: 'new'}, caption: :label_dmsf_new_top_level_folder, - parent: :new_object + unless Redmine::Plugin.installed?(:easy_extensions) + menu.push :dmsf_file, { controller: 'dmsf_upload', action: 'multi_upload'}, + caption: :label_dmsf_new_top_level_document, parent: :new_object + menu.push :dmsf_folder, { controller: 'dmsf', action: 'new'}, caption: :label_dmsf_new_top_level_folder, + parent: :new_object + end end # Main menu extension unless(ActiveRecord::Base.connection.data_source_exists?('settings') && @@ -118,8 +120,8 @@ if Redmine::Plugin.installed?(:easy_extensions) require File.expand_path('../app/models/easy_page_modules/easy_dms/epm_dmsf_locked_documents', __FILE__) require File.expand_path('../app/models/easy_page_modules/easy_dms/epm_dmsf_open_approvals', __FILE__) - EpmDmsfLockedDocuments.register_to_scope(:user, plugin: :redmine_dmsf) - EpmDmsfOpenApprovals.register_to_scope(:user, plugin: :redmine_dmsf) + EasyPageModules::EasyDms::EpmDmsfLockedDocuments.register_to_scope(:user, plugin: :redmine_dmsf) + EasyPageModules::EasyDms::EpmDmsfOpenApprovals.register_to_scope(:user, plugin: :redmine_dmsf) end else dmsf_init diff --git a/init.rb b/init.rb index d6ac08f4..0835e325 100644 --- a/init.rb +++ b/init.rb @@ -27,7 +27,7 @@ Redmine::Plugin.register :redmine_dmsf do author_url 'https://github.com/danmunn/redmine_dmsf/graphs/contributors' author 'Vít Jonáš / Daniel Munn / Karel Pičman' description 'Document Management System Features' - version '3.0.12' + version '3.0.13 devel' requires_redmine version_or_higher: '5.0.0' diff --git a/lib/redmine_dmsf.rb b/lib/redmine_dmsf.rb index 447ba9d1..eb1cd854 100644 --- a/lib/redmine_dmsf.rb +++ b/lib/redmine_dmsf.rb @@ -42,7 +42,7 @@ require File.dirname(__FILE__) + '/redmine_dmsf/patches/queries_controller_patch require File.dirname(__FILE__) + '/redmine_dmsf/patches/pdf_patch' # A workaround for obsolete 'alias_method' usage in RedmineUp's plugins -if RedmineDmsf::Plugin.an_osolete_plugin_present? && !Redmine::Plugin.installed?(:easy_extensions) +if RedmineDmsf::Plugin.an_osolete_plugin_present? require File.dirname(__FILE__) + '/redmine_dmsf/patches/notifiable_ru_patch' else require File.dirname(__FILE__) + '/redmine_dmsf/patches/notifiable_patch' diff --git a/lib/redmine_dmsf/patches/notifiable_patch.rb b/lib/redmine_dmsf/patches/notifiable_patch.rb index 766522c2..5a48e1b3 100644 --- a/lib/redmine_dmsf/patches/notifiable_patch.rb +++ b/lib/redmine_dmsf/patches/notifiable_patch.rb @@ -52,9 +52,6 @@ module RedmineDmsf end # Apply the patch -if Redmine::Plugin.installed?(:easy_extensions) - RedmineExtensions::PatchManager.register_patch_to_be_first 'Redmine::Notifiable', - 'RedmineDmsf::Patches::NotifiablePatch', prepend: true, first: true -elsif !RedmineDmsf::Plugin.an_osolete_plugin_present? +unless !RedmineDmsf::Plugin.an_osolete_plugin_present? Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch end diff --git a/lib/redmine_dmsf/patches/notifiable_ru_patch.rb b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb index fb4bdb43..c6523d73 100644 --- a/lib/redmine_dmsf/patches/notifiable_ru_patch.rb +++ b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb @@ -54,6 +54,6 @@ module RedmineDmsf end # Apply the patch -if RedmineDmsf::Plugin.an_osolete_plugin_present? && !Redmine::Plugin.installed?(:easy_extensions) +if RedmineDmsf::Plugin.an_osolete_plugin_present? Redmine::Notifiable.send :include, RedmineDmsf::Patches::NotifiableRuPatch end diff --git a/lib/redmine_dmsf/patches/user_patch.rb b/lib/redmine_dmsf/patches/user_patch.rb index 25e8b494..d95890a5 100644 --- a/lib/redmine_dmsf/patches/user_patch.rb +++ b/lib/redmine_dmsf/patches/user_patch.rb @@ -63,7 +63,7 @@ end # Apply the patch if Redmine::Plugin.installed?(:easy_extensions) - RedmineExtensions::PatchManager.register_model_patch 'UserPatch', 'RedmineDmsf::Patches::UserPatch' + RedmineExtensions::PatchManager.register_model_patch 'User', 'RedmineDmsf::Patches::UserPatch' else User.prepend RedmineDmsf::Patches::UserPatch end \ No newline at end of file