archives.html.erb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:1k
源码类别:

Ajax

开发平台:

Others

  1. <% if @articles.to_a.empty? -%>
  2. <div class="post">
  3. <p><%= _("No articles found")%>...</p>
  4. </div>
  5. <% else
  6.      currentmonth = 0
  7.      currentyear = 0
  8.      for article in @articles
  9.        if (article.published_at.month != currentmonth || article.published_at.year != currentyear)
  10.          currentmonth = article.published_at.month
  11.          currentyear = article.published_at.year -%>
  12.           <h3 class="archivemonth"><%= _(Date::MONTHNAMES[article.published_at.month]) %> <%= article.published_at.year %></h3>
  13.            <% end -%>
  14.   <div class="archivepost">
  15.   <%= article.published_at.mday %> -
  16.   <%= link_to_permalink(article,h(article.title)) %>
  17.   <% if !article.categories.empty? %> <%= _("posted in") %>
  18.   <%= article.categories.collect {|c| link_to_permalink c,c.name }.join(", ") -%>
  19.   <% end -%>
  20.  </div>
  21. <% end
  22.   end -%>