Module: PuppetclassesHelper

Includes:
LookupKeysHelper, PuppetclassesAndEnvironmentsHelper
Defined in:
app/helpers/puppetclasses_helper.rb

Instance Method Summary collapse

Methods included from LookupKeysHelper

#add_child_link, #can_edit_params?, #delete_child_link, #diagnostic_popover, #hidden_lookup_value_fields, #hidden_toggle, #lookup_key_description, #lookup_key_warnings, #lookup_key_with_diagnostic, #lookup_keys_breadcrumbs, #lookup_value, #lookup_value_name_prefix, #omit_check_box, #overridable_lookup_keys, #override_toggle, #parameters_receiver, #remove_child_link, #show_puppet_class, #validator_type_selector, #value_matcher

Methods included from PuppetclassesAndEnvironmentsHelper

#class_update_text, #import_proxy_links, #import_proxy_select

Instance Method Details

#overridden?(puppetclass) ⇒ Boolean

Returns:

  • (Boolean)

5
6
7
# File 'app/helpers/puppetclasses_helper.rb', line 5

def overridden?(puppetclass)
  puppetclass.class_params.present? && puppetclass.class_params.map(&:override).all?
end

#puppetclass_group_with_icon(list, selected) ⇒ Object


9
10
11
12
13
14
15
16
17
# File 'app/helpers/puppetclasses_helper.rb', line 9

def puppetclass_group_with_icon(list, selected)
  css_options = if (list.last - selected).empty?
                  { :class => 'hide' }
                else
                  {}
                end
  link_to_function(icon_text('plus', list.first, css_options),
    "tfm.classEditor.expandClassList($(this), '#pc_#{list.first}')")
end