<% content_for :page_title, "Pages" %> <% content_for :page_description do %> All pages / <%= link_to("Deleted pages", deleted_admin_pages_path(@locale)) %> <% end %> <% content_for :page_description_links do %> <%= locale_links { |l| admin_pages_path(l) } %> <% end %> <%= render(partial: "admin/pages/search_bar", locals: { query: search_query }) %>
<% cache Page.visible.roots.to_a + [current_user, @locale] do %> <%= react_component( "PageTree", { pages: @pages.map { |p| page_json(p) }, locale: @locale, dir: locale_direction(@locale), permissions: [(:create if policy(Page).create?)] } ) %> <% end %>