Check whether expected plugins have been installed

This commit is contained in:
Karel Picman 2018-03-13 10:34:02 +01:00
parent 33b1fc4087
commit 9011acc7a6
3 changed files with 14 additions and 9 deletions

View File

@ -71,7 +71,9 @@ module RedmineDmsf
end
def view_issues_show_thumbnails(context={})
show_thumbnails(context[:container], context[:controller])
unless context[:options][:only_mails].present?
show_thumbnails(context[:container], context[:controller])
end
end
def view_issues_dms_thumbnails(context={})

View File

@ -178,9 +178,10 @@ module RedmineDmsf
end
end
# Apply patch
Rails.configuration.to_prepare do
unless EasyCrmCase.included_modules.include?(RedmineDmsf::Patches::EasyCrmCasePatch)
EasyCrmCase.send(:include, RedmineDmsf::Patches::EasyCrmCasePatch)
if Redmine::Plugin.installed?(:easy_crm)
Rails.configuration.to_prepare do
unless EasyCrmCase.included_modules.include?(RedmineDmsf::Patches::EasyCrmCasePatch)
EasyCrmCase.send(:include, RedmineDmsf::Patches::EasyCrmCasePatch)
end
end
end
end

View File

@ -95,8 +95,10 @@ module RedmineDmsf
end
end
Rails.configuration.to_prepare do
unless EasyCrmCasesController.included_modules.include?(RedmineDmsf::EasyCrmCasesControllerPatch)
EasyCrmCasesController.send(:include, RedmineDmsf::EasyCrmCasesControllerPatch)
if Redmine::Plugin.installed?(:easy_crm)
Rails.configuration.to_prepare do
unless EasyCrmCasesController.included_modules.include?(RedmineDmsf::EasyCrmCasesControllerPatch)
EasyCrmCasesController.send(:include, RedmineDmsf::EasyCrmCasesControllerPatch)
end
end
end