Sha256: 83d787364a09c1e2f4441447310965b10b73896f0175e5b3d835f58b34f3875c

Contents?: true

Size: 1.09 KB

Versions: 13

Compression:

Stored size: 1.09 KB

Contents

<% open_or_closed = sub_items.blank? ? '' : (cookies["page_tree_#{item.id}"] ? 'tree_open' : 'tree_closed') %>
<li data-item_id="<%= item.id %>" class="<%= 'root' if item.is_root? %> <%= open_or_closed %>" >
  <dl>
    <dt>
      <% if !item.is_root? %>
        <a href="#" class="tree_expand"></a>
      <% end %>
      <% if item.divider? %>
        <% item_title = "&mdash; #{item.menutitle} &mdash;".html_safe %>
        <%= can?(:manage_content, item) ? link_to(item_title, :action => :show, :id => item) : item_title %>
      <% else %>
        <% item_title = (item.title.blank? ? item.slug : item.title) %>
        <%= can?(:manage_content, item) ? link_to(item_title, :action => :show, :id => item) : item_title %>
      <% end %>
    </dt>
    <dd><%= present(item).label_published %></dd>
    <dd>
      <%= link_to "New Child", new_page_admin_cms_page_path(item) if can? :manage_content, :all %>
    </dd>
  </dl>
  <%= (sub_items.blank? ? '' : content_tag(:ul, nested_tree(sub_items), :class => 'sub_tree', :style => ((item.is_root? || open_or_closed == 'tree_open') ? '' : 'display:none'))) %>
</li>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
dm_cms-4.2.3.10 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.9 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.8 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.7 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.6 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.5 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.4 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.3 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.2 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3.1 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.3 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.2.3 app/views/dm_cms/admin/cms_pages/_tree.html.erb
dm_cms-4.2.2.2 app/views/dm_cms/admin/cms_pages/_tree.html.erb