Sha256: 95ff011bb206a93736baf3d5d6d64bf5b2ce08e1cbca3e31c2c2c59106bc2570

Contents?: true

Size: 1.25 KB

Versions: 5

Compression:

Stored size: 1.25 KB

Contents

<%= render(partial: "admin/pages/search_bar",
           locals: { query: search_query }) %>

<% if policy(Page).new? %>
  <h2>New article</h2>
  <p>
    <%= form_tag new_admin_page_path, method: :get do %>
      In
      <%= select_tag("parent", news_page_options(news_pages)) %>
      <button type="submit">
        Go
      </button>
    <% end %>
  </p>
<% end %>

<div class="archive-index">
  <% archive_finder.years_with_count.reverse.each do |year, year_count| %>
    <h2>
      <%= link_to_unless_current(
        year,
        admin_news_index_path(locale, year: year)
      ) %>
      <span class="count">
        (<%= year_count %>)
      </span>
    </h2>
    <ul>
      <% archive_finder.months_in_year_with_count(year).reverse.each do |month, page_count| %>
        <li>
          <% if year == @year && month == @month %>
            <strong>
              <%= month_name(month) %>
            </strong>
            (<%= page_count %>)
          <% else %>
            <%= link_to(
              month_name(month),
              admin_news_index_path(locale, year: year, month: month)
            ) %>
            <span class="count">
              (<%= page_count %>)
            </span>
          <% end %>
        </li>
      <% end %>
    </ul>
  <% end %>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pages_core-3.15.5 app/views/admin/news/_sidebar.html.erb
pages_core-3.15.4 app/views/admin/news/_sidebar.html.erb
pages_core-3.15.3 app/views/admin/news/_sidebar.html.erb
pages_core-3.15.2 app/views/admin/news/_sidebar.html.erb
pages_core-3.15.1 app/views/admin/news/_sidebar.html.erb