Sha256: dc66df10c605c8a577c5476bfe8ee66e4a529c8c9685fd08fb2964a4a8dc0e99

Contents?: true

Size: 1.31 KB

Versions: 25

Compression:

Stored size: 1.31 KB

Contents

<% 
  cms_page    ||= index_branch 
  has_children  = cms_page.children.present?
  has_siblings  = cms_page.siblings.present?
  branch_open   = (session[:cms_page_tree] || []).member?(cms_page.id.to_s) || cms_page.root?
%>

<li id='<%= dom_id(cms_page) %>'>
  <div class='item'>
    <div class='toggle <%= 'open' if branch_open %>'>
      <%= 
        if has_children && !cms_page.root?
          link_to span_tag('toggle'), toggle_branch_cms_admin_page_path(cms_page), :remote => true
        end
      %>
    </div>
    <div class='icon'>
      <% if has_siblings %>
        <div class='dragger'><span>drag</span></div>
      <% end %>
    </div>
    <div class='action_links'>
      <%= link_to 'Add Child Page', new_cms_admin_page_path(:parent_id => cms_page.id) %>
      <%= link_to 'Edit', edit_cms_admin_page_path(cms_page) %>
      <%= link_to 'Delete', cms_admin_page_path(cms_page), :method => :delete, :confirm => 'Are you sure?' %>
    </div>
    <div class='label'>
      <%= link_to cms_page.label, edit_cms_admin_page_path(cms_page) %>
      <div class='sublabel'>
        <%= link_to cms_page.url, cms_page.full_path, :target => '_blank' %>
      </div>
    </div>
  </div>
  <% if has_children && branch_open %>
    <ul>
      <%= render :partial => 'index_branch', :collection => cms_page.children %>
    </ul>
  <% end %>
</li>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.2.8 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.7 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.6 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.5 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.4 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.3 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.2 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.1 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.2.0 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.1.2 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.1.1 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.51 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.50 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.49 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.48 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.47 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.46 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.45 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.44 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.0.43 app/views/cms_admin/pages/_index_branch.html.erb