%= render(partial: "admin/pages/search_bar",
locals: { query: search_query }) %>
<% if policy(Page).new? %>
New entry
<%= form_tag new_admin_page_path, method: :get do %>
In
<%= select_tag("parent", calendar_page_options(locale)) %>
<% end %>
<% end %>
<% calendar_years_with_count.each do |year, year_count| %>
<%= link_to_unless_current(
year,
admin_calendar_path(locale, year: year)
) %>
(<%= year_count %>)
<% calendar_months_count(year).each do |month, month_count| %>
-
<% if year == @year && month == @month %>
<%= month_name(month) %>
<% else %>
<%= link_to_unless_current(
month_name(month),
admin_calendar_path(locale, month: month, year: year)
) %>
<% end %>
(<%= month_count %>)
<% end %>
<% end %>