Sha256: 46184986114e4e3b450c399adad46a633752405fb2787c48383e37236d7bb118
Contents?: true
Size: 1.1 KB
Versions: 16
Compression:
Stored size: 1.1 KB
Contents
module DmCms::CmsPagesHelper #------------------------------------------------------------------------------ def nested_tree(tree) tree.map do |item, sub_items| render(:partial => 'tree', :locals => {:item => item, :sub_items => sub_items}) end.join.html_safe end #------------------------------------------------------------------------------ def nested_tree_sidebar(tree) tree.map do |item, sub_items| render(:partial => 'tree_sidebar', :locals => {:item => item, :sub_items => sub_items}) end.join.html_safe end # Return a list of templates defined in the theme.yml and it's parent theme. # The child templates should override any parent templates #------------------------------------------------------------------------------ def template_menu_list theme = current_account.theme_data unless theme.empty? templates = (current_account.theme_data(parent: true)['templates'] || {}).merge(theme['templates'] || {}) [['Inherit from parent', '']] + templates.collect {|key, value| [value['name'], key] } else nil end end end
Version data entries
16 entries across 16 versions & 1 rubygems