<%= link_to new_node_path(:parent_id => node.id),
"aria-label" => t(".create_child"), title: t(".create_child") do %>
<%= create_icon %>
<% end %>
<%= link_to node_path(node), "aria-label" => t("admin.common.show"),
title: t("admin.common.show") do %>
<%= show_icon %>
<% end %>
<% end %>
<% next_level = @sitemap[index + 1]&.last %>
<% if next_level && next_level > level %>
<% if level.zero? %>
<%# Root's children are the top level: a tree does not hide its own
first rank behind a toggle. A plain div keeps the closing-tag
bookkeeping symmetric with the details branches. %>
<% else %>
<%= t(".descendants", :count => @sitemap_descendant_counts[node.id]) %>
<% end %>
<% open_details.push(level) %>
<% end %>
<% end %>
<% while open_details.any? %>
<% closing = open_details.pop %>
<% if closing.zero? %>