Sha256: b9fd8a05c6f96a72c9011e0f053d988cafcb3033f9737846f2de43731e29824f

Contents?: true

Size: 1.54 KB

Versions: 45

Compression:

Stored size: 1.54 KB

Contents

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

<li id='<%= dom_id(page) %>'>
  <div class='item'>
    <div class='toggle <%= 'open' if branch_open %>'>
      <%= 
        if !category_view && has_children && !page.root?
          link_to span_tag(t('.toggle')), toggle_branch_cms_admin_site_page_path(@site, page), :remote => true
        end
      %>
    </div>
    <div class='icon'>
      <% if !category_view && has_siblings %>
        <div class='dragger'><span><%= t('cms.views.pages.drag') %></span></div>
      <% end %>
    </div>
    <div class='action_links'>
      <%= link_to t('.add_child_page'), new_cms_admin_site_page_path(@site, :parent_id => page.id) %>
      <%= link_to t('.edit'), edit_cms_admin_site_page_path(@site, page) %>
      <%= link_to t('.delete'), cms_admin_site_page_path(@site, page), :method => :delete, :confirm => t('.are_you_sure') %>
    </div>
    <div class='label'>
      <%= link_to page.label, edit_cms_admin_site_page_path(@site, page) %>
      <%= render :partial => '/cms_admin/categories/categories', :object => page %>
      <div class='sublabel'>
        <%= link_to page.url, page.full_path, :target => '_blank' %>
      </div>
    </div>
  </div>
  <% if !category_view && has_children && branch_open %>
    <ul>
      <%= render :partial => 'index_branch', :collection => page.children %>
    </ul>
  <% end %>
</li>

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.6.9 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.8 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.7 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.6 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.5 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.4 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.3 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.2 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.1 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.6.0 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.11 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.10 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.9 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.8 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.7 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.6 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.5 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.4 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.3 app/views/cms_admin/pages/_index_branch.html.erb
comfortable_mexican_sofa-1.5.2 app/views/cms_admin/pages/_index_branch.html.erb