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

Ajax

开发平台:

Others

  1. <div class="post">
  2.   <h2><%= @author.name %></h2>
  3.   <ul>
  4.     <%= display_profile_item @author.url, @author.show_url, _("Web site:") %>
  5.     <%= display_profile_item @author.msn, @author.show_msn, _("MSN:") %>
  6.     <%= display_profile_item @author.yahoo, @author.show_yahoo, _("Yahoo:") %>
  7.     <%= display_profile_item @author.jabber, @author.show_jabber, _("Jabber:") %>
  8.     <%= display_profile_item @author.aim, @author.show_aim, _("AIM:") %>
  9.     <%= display_profile_item @author.twitter, @author.show_twitter, _("Twitter:") %>
  10.   </ul>
  11.   <h3><%= _("About %s", @author.name)%></h3>
  12.   <%= @author.description%>
  13. </div>
  14. <% if @author.articles.to_a.empty? -%>
  15. <div class="post">
  16. <p><%= _("This author has not published any article yet")%>...</p>
  17. </div>
  18. <% else
  19.      currentmonth = 0
  20.      currentyear = 0
  21.      for article in @author.articles
  22.        if (article.published_at.month != currentmonth || article.published_at.year != currentyear)
  23.          currentmonth = article.published_at.month
  24.          currentyear = article.published_at.year -%>
  25.           <h3 class="archivemonth"><%= _(Date::MONTHNAMES[article.published_at.month]) %> <%= article.published_at.year %></h3>
  26.            <% end -%>
  27.   <div class="archivepost">
  28.   <%= article.published_at.mday %> -
  29.   <%= link_to_permalink(article,h(article.title)) %>
  30.   <% if !article.categories.empty? %> <%= _("posted in") %>
  31.   <%= article.categories.collect {|c| link_to_permalink c,c.name }.join(", ") -%>
  32.   <% end -%>
  33.  </div>
  34. <% end
  35.   end -%>