Revision 82e47ae0
Added by Amos Benari about 12 years ago
- ID 82e47ae0f86994702c3a084cc6150250a81034ee
app/helpers/home_helper.rb | ||
---|---|---|
|
||
def setting_options
|
||
choices = [
|
||
['Bookmarks', :bookmarks],
|
||
['Environments', :environments],
|
||
['Settings', :settings],
|
||
['Global Parameters', :common_parameters],
|
||
['Host Groups', :hostgroups],
|
||
['Puppet Classes', :puppetclasses],
|
||
... | ... | |
]
|
||
|
||
choices += [
|
||
['Architectures', :architectures],
|
||
[:divider],
|
||
['Compute Resources', :compute_resources],
|
||
['Hypervisors', :hypervisors]
|
||
] if SETTINGS[:libvirt]
|
||
|
||
choices += [
|
||
[:divider],
|
||
['Architectures', :architectures],
|
||
['Domains', :domains],
|
||
['Hardware Models', :models],
|
||
['Installation Media', :media],
|
||
... | ... | |
] if SETTINGS[:unattended]
|
||
|
||
choices += [
|
||
[:divider],
|
||
['LDAP Authentication', :auth_source_ldaps],
|
||
['Users', :users],
|
||
['User Groups', :usergroups],
|
||
['LDAP Authentication', :auth_source_ldaps]
|
||
] if SETTINGS[:login]
|
||
|
||
choices += [
|
||
['Roles', :roles]
|
||
] if SETTINGS[:login] and User.current.admin?
|
||
choices += [['Hypervisors', :hypervisors]] if SETTINGS[:libvirt]
|
||
|
||
choices.sort
|
||
choices += [
|
||
[:divider],
|
||
['Bookmarks', :bookmarks],
|
||
['Settings', :settings]
|
||
]
|
||
|
||
choices
|
||
end
|
||
|
||
|
||
... | ... | |
link_to_if_authorized(tab.capitalize, path, :class => b.empty? ? "" : "narrow-right")
|
||
end
|
||
out += content_tag :li, :class => "dropdown " + class_for_current_page(tab) do
|
||
link_to("", "#", :class => "dropdown-toggle narrow-left") + menu_dropdown(b)
|
||
link_to(content_tag(:span,'', :'data-toggle'=> 'dropdown', :class=>'caret'), "#", :class => "dropdown-toggle narrow-left") + menu_dropdown(b)
|
||
end unless b.empty?
|
||
out
|
||
end
|
Also available in: Unified diff
updates UI to bootstrap v2