<% month_names = %w{January February March April May June July August September October November December} self.page_title = "News" self.page_description = "#{month_names[@month - 1]} #{@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 %>

New article

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

<% @archive_finder.years.reverse.each do |year| %>

<%= year %><%= ": #{@category.name}" if @category %>

<% end %> <% end %> <% if @pages.any? %> <% @pages.each do |page| %><% end %>
Name Published Author Section
<%= link_to_if(policy(page).edit?, page_name(page), edit_admin_page_url(@locale, page), class: 'name_link') %> <% if page.autopublish? %>
This page will be published <%= publish_time(page.published_at) %> <% end %>
<% if page.published? %> <%= l(page.published_at, format: :short) %> <% else %> <% if page.status_label == 'Published' %> Not published <% else %> <%= page.status_label %> <% end %> <% end %> <%= link_to page.author.name, admin_user_path(page.author) %> <%= link_to_if(policy(page.parent).edit?, page_name(page.parent, include_parents: true), news_admin_pages_path(section: page.parent.id)) %>
<% else %>

No news items have been posted yet.

<% end %>