<% content_for :page_title, "Pages" %> <% content_for :page_description do %> All pages / <%= link_to("Deleted pages", deleted_admin_pages_path(content_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, content_locale] do %> <%= react_component( "PageTree", { pages: @pages.map { |p| ::Admin::PageTreeResource.new(p, params: { user: current_user }) }, locale: content_locale, dir: locale_direction(content_locale), permissions: [(:create if policy(Page).create?)] } ) %> <% end %>