Skip to content

Commit

Permalink
Only check for folding status if the page has children.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorrizza committed Jan 26, 2016
1 parent 2029e8f commit 8e840af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/alchemy/admin/pages/_pages.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<%- end -%>
</div>
</div>
<%- if @sorting || (!page.folded?(current_alchemy_user) && page_has_children) -%>
<%- if @sorting || (page_has_children && !page.folded?(current_alchemy_user)) -%>
<ul id="page_<%= page.id %>_children" class="level_<%= level %>_children">
<%- elsif !tree[i + 1] || tree[i + 1][1] < level -%>
<%- (level - (tree[i + 1] ? tree[i + 1][1] : 1)).times do -%></li></ul><%- end -%>
Expand Down

1 comment on commit 8e840af

@tvdeyen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So simple, so powerful 👌🏻

Please sign in to comment.