<% month_names = %w{January February March April May June July August September October November December} page_title "News" page_description "News: #{month_names[@month - 1] if @month} #{@year}" if PagesCore.config.localizations? self.page_description_links = 'In ' + PagesCore.config.locales.map{ |l, n| link_to_unless_current n, news_admin_pages_path(l) }.join(link_separator) end %> <% content_for :sidebar do %> <% if policy(Page).new_news? %>

New article

<%= form_tag new_news_admin_pages_path, method: :get do %> In <%= select_tag('parent', options_for_select(@news_pages.map{|p| [news_section_name(p, @news_pages).gsub("»", "ยป"), p.id] })) %> <%= submit_tag "Go", name: nil %> <% end %>

<% end %>
<% @archive_finder.years_with_count.reverse.each do |year, year_count| %>

<%= link_to_unless_current(year, news_admin_pages_path( @locale, year: year, category: @category&.slug) ) %> <%= ": #{@category.name}" if @category %> (<%= year_count %>)

<% end %>
<% end %> <% if @pages.any? %> <% @pages.each do |page| %> <%= render(partial: "list_item", locals: { page: page, author: true, section: true }) %> <% end %>
Name Published Author Section
<%= will_paginate @pages, renderer: PagesCore::LinkRenderer %> <% else %>

No news items have been posted yet.

<% end %>