Work on coding standards
This commit is contained in:
parent
2468bf8ab7
commit
0d95e1e336
@ -3,7 +3,7 @@ Changelog
|
||||
|
||||
0.5.9-dev
|
||||
+++++++++
|
||||
|
||||
- user group support for issue auto assign
|
||||
- optimize deface overwrite path
|
||||
|
||||
0.5.8
|
||||
|
@ -61,8 +61,8 @@ module RedmineTweaks
|
||||
title: Setting.plugin_redmine_tweaks[menu_name + '_title'],
|
||||
roles: Setting.plugin_redmine_tweaks[menu_name + '_roles']
|
||||
}
|
||||
return if item[:name].blank? || item[:url].blank? || item[:roles].nil?
|
||||
|
||||
unless item[:name].blank? || item[:url].blank? || item[:roles].nil?
|
||||
show_entry = false
|
||||
item[:roles].each do |role|
|
||||
if user_roles.empty? && role.to_i == Role::BUILTIN_ANONYMOUS
|
||||
@ -85,14 +85,13 @@ module RedmineTweaks
|
||||
end
|
||||
handle_top_menu_item(menu_name, item, show_entry)
|
||||
end
|
||||
end
|
||||
|
||||
def handle_top_menu_item(menu_name, item, show_entry = false)
|
||||
if Redmine::MenuManager.map(:top_menu).exists?(menu_name.to_sym)
|
||||
Redmine::MenuManager.map(:top_menu).delete(menu_name.to_sym)
|
||||
end
|
||||
return unless show_entry
|
||||
|
||||
if show_entry
|
||||
html_options = {}
|
||||
html_options[:class] = 'external' if item[:url].include? '://'
|
||||
html_options[:title] = item[:title] unless item[:title].blank?
|
||||
@ -102,7 +101,6 @@ module RedmineTweaks
|
||||
html: html_options,
|
||||
before: :help
|
||||
end
|
||||
end
|
||||
|
||||
def bootstrap_datepicker_locale
|
||||
s = ''
|
||||
|
Loading…
Reference in New Issue
Block a user