Fix conflicts with hrm #36

This commit is contained in:
Alexander Meindl 2018-12-14 09:08:57 +01:00
commit 197dd2c4aa
4 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
module AdditionalsMenuHelper
def additionals_top_menu_setup
return if Additionals::REDMINE_HRM_SUPPORT
return unless User.current.try(:hrm_user_type_id).nil?
if Additionals.setting?(:remove_mypage)
Redmine::MenuManager.map(:top_menu).delete(:my_page) if Redmine::MenuManager.map(:top_menu).exists?(:my_page)

View File

@ -5,5 +5,5 @@
= javascript_include_tag('noreferrer', plugin: 'additionals')
= additionals_library_load(:font_awesome)
= stylesheet_link_tag 'additionals', plugin: 'additionals'
- unless Additionals::REDMINE_HRM_SUPPORT
- if User.current.try(:hrm_user_type_id).nil?
- render_custom_top_menu_item

View File

@ -3,7 +3,6 @@ module Additionals
SELECT2_INIT_ENTRIES = 20
LIST_SEPARATOR = ' » '.html_safe # rubocop:disable Rails/OutputSafety
REDMINE_HRM_SUPPORT = Redmine::Plugin.installed?('redmine_hrm') ? true : false
class << self
def setup

View File

@ -46,7 +46,9 @@ module Additionals
{ name: 'users', partial: 'additionals/settings/users', label: :label_user_plural },
{ name: 'web', partial: 'additionals/settings/web_apis', label: :label_web_apis }]
tabs << { name: 'menu', partial: 'additionals/settings/menu', label: :label_settings_menu } unless Additionals::REDMINE_HRM_SUPPORT
if User.current.try(:hrm_user_type_id).nil?
tabs << { name: 'menu', partial: 'additionals/settings/menu', label: :label_settings_menu }
end
tabs
end