.humpyard-dialog-title
  = I18n.t 'humpyard_cms.pages.edit.title'
.dialog-columns
  .left-dialog-column.with-toolbar.with-search
    .dialog-pane
      #hy-page-treeview
      = render :partial => 'tree', :locals => {:pages => @pages, :page => @page}
      #humpyard-page-types-menu.dialog-menu
        - Humpyard::config.page_types.each do |name, type|
          = link_to I18n.t('humpyard_cms.pages.edit.add', :page_type => type.model_name.human), new_humpyard_page_path(:type => name), :'data-dialog-link' => true
    .dialog-search
      Pages
    .dialog-buttons.humpyard-form-buttons
      %a{:'data-icon' => "ui-icon-circle-plus", :'data-dialog-menu' => '#humpyard-page-types-menu'} 
        = I18n.t('humpyard_cms.pages.edit.add', :page_type => Humpyard::Page.model_name.human)
  .right-dialog-column.with-toolbar.with-search
    - if @page
      = render :partial => 'edit', :locals => {:page => @page}
    - else
      .dialog-pane
        Nothing selected
.humpyard-dialog-buttons


.humpyard-dialog-title
  = I18n.t 'humpyard_cms.pages.edit.title'
.dialog-columns
  .left-dialog-column.with-toolbar.with-search
    .dialog-pane
      #hy-page-treeview
        = render :partial => 'tree', :locals => {:pages => @pages, :page => @page}
      #humpyard-page-types-menu.dialog-menu
        - Humpyard::config.page_types.each do |name, type|
          = link_to I18n.t('humpyard_cms.pages.edit.add', :page_type => type.model_name.human), new_humpyard_page_path(:type => name), :'data-dialog-link' => true
    .dialog-search
      Pages
    .dialog-buttons.humpyard-form-buttons
      %a{:'data-icon' => "ui-icon-circle-plus", :'data-dialog-menu' => '#humpyard-page-types-menu'} 
        = I18n.t('humpyard_cms.pages.edit.add', :page_type => Humpyard::Page.model_name.human)
  .right-dialog-column.with-toolbar.with-search
    - if @page
      = render :partial => 'edit', :locals => {:page => @page}
    - else
      .dialog-pane
        Nothing selected
.humpyard-dialog-buttons


Fix page dialog tree markup
Fix page dialog tree markup