app/presenters/tree_builder_catalog_items.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)
    @resolve ||= {}
    st = ServiceTemplate.find_by(:id => object[:id])
    items = st.custom_button_sets + st.custom_buttons
    objects = []
    if st.options && st.options[:button_order]
      st.options[:button_order].each do |item_id|
        items.each do |g|
          rec_id = "#{g.kind_of?(CustomButton) ? 'cb' : 'cbg'}-#{g.id}"
          objects.push(g) if item_id == rec_id
        end
      end
    end
    count_only_or_objects(count_only, objects)
  end
def x_get_tree_custom_kids ( object , count_only , _options ) @resolve ||= { } st = ServiceTemplate . find_by ( :id => object [ :id ] ) items = st . custom_button_sets + st . custom_buttons objects = [ ] if st . options && st . options [ :button_order ] st . options [ :button_order ] . each do | item_id | items . each do | g | rec_id = "#{g.kind_of?(CustomButton) ? 'cb' : 'cbg'}-#{g.id}" objects . push ( g ) if item_id == rec_id end end end count_only_or_objects ( count_only , objects ) end
Handle custom tree nodes (object is a Hash)
Handle custom tree nodes ( object is a Hash )
# build node showing any button groups or buttons under selected CatalogItem
object
<not_specific>
count_only
<not_specific>
_options
<not_specific>