app/presenters/tree_builder_pxe_customization_templates.rb
# Handle custom tree nodes (object is a Hash)
Handle custom tree nodes (object is a Hash)
Handle custom tree nodes ( object is a Hash )
def x_get_tree_custom_kids(object, count_only, _options)
    nodes = object[:full_id] ? object[:full_id].split('-') : object[:id].split('-')
    if nodes[1] == "system" || nodes[2] == "system"
      objects = CustomizationTemplate.where(:pxe_image_type_id => nil)
    else
      id =  nodes.length >= 3 ? nodes[2] : nodes[1]
      pxe_img = PxeImageType.find_by_id(from_cid(id))
      objects = CustomizationTemplate.where(:pxe_image_type_id => pxe_img.id)
    end
    count_only_or_objects(count_only, objects, "name")
  end
def x_get_tree_custom_kids ( object , count_only , _options ) nodes = object [ :full_id ] ? object [ :full_id ] . split ( '-' ) : object [ :id ] . split ( '-' ) if nodes [ 1 ] == "system" || nodes [ 2 ] == "system" objects = CustomizationTemplate . where ( :pxe_image_type_id => nil ) else id = nodes . length >= 3 ? nodes [ 2 ] : nodes [ 1 ] pxe_img = PxeImageType . find_by_id ( from_cid ( id ) ) objects = CustomizationTemplate . where ( :pxe_image_type_id => pxe_img . id ) end count_only_or_objects ( count_only , objects , "name" ) end
Handle custom tree nodes (object is a Hash)
Handle custom tree nodes ( object is a Hash )
# root node was clicked or if folder node was clicked # System templates # root node was clicked or if folder node was clicked
object
<not_specific>
count_only
<not_specific>
_options
<not_specific>