cirandas.net

ref: master

app/views/blocks/blog_archives.html.erb


<% if block.blog %>
  <%= block_title(block.title, block.subtitle) %>

  
    <% block.blog.total_number_of_posts(:by_year).each do |year, count| %> <%= content_tag('li', content_tag('strong', "#{year.to_i} (#{count})")) %>
      <% block.blog.total_number_of_posts(:by_month, year).each do |month, count| %> <%= content_tag('li', link_to("#{month_name(month.to_i)} (#{count})", url_for(block.blog.url.merge(year: year.to_i, month: month.to_i)).html_safe)) %> <% end %>
    <% end %>
<%= content_tag('div', link_to(_('Subscribe RSS Feed'), block.blog.feed.url), :class => 'subscribe-feed') if block.blog.feed %> <% end %>