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

Ajax

开发平台:

Others

  1. <div class="atomentry" id="article-<%= article.id %>">
  2.   <div class="title">
  3.     <h2 class="title"><%= (controller.action_name.include? 'permalink') ? article.title : link_to_permalink(article,article.title) %></h2>
  4.     <div class="meta">
  5.       <%= _("Posted by") %> <cite><%= author_link(article) %></cite> <abbr class="published" title="<%= article.published_at.xmlschema %>"><%= js_distance_of_time_in_words_to_now article.published_at %></abbr>
  6.     </div>
  7.   </div>
  8.   <div class="content">
  9.     <%= article.html(:body) %>
  10.     <% if article.extended? -%>
  11.       <div class="extended">
  12.         <% if controller.action_name == 'index' -%>
  13.           <p><%= link_to_permalink article,_("Continue reading...") %></p>
  14.         <% else -%>
  15.           <%= article.html(:extended) %>
  16.         <% end -%>
  17.       </div>
  18.     <% end -%>  
  19.   </div>
  20.   <% if controller.controller_name == "articles" and controller.action_name == "show" %>
  21.   <div class="meta">
  22.     <p class="infos"><small>
  23.       <%= _("This entry was posted on %s", content_tag(:abbr, js_distance_of_time_in_words_to_now (@article.published_at), {:class => 'published', :title => @article.published_at.xmlschema})) %>
  24.       <%= _("and %s", category_links(@article)) unless @article.categories.empty? %>. 
  25.       <%= _("You can follow any any response to this entry through the %s", link_to(_("Atom feed"), @auto_discovery_url_atom)) %>. 
  26.       <%= _("You can leave a %s", link_to_permalink(article, _('comment'), 'comments')) if @article.allow_comments? %> 
  27.       <%= _("or a %s from your own site", link_to_permalink(@article, _('trackback'), 'trackbacks')) if @article.allow_pings? %>.
  28.     </small></p>
  29.     <p class="tags">
  30.       <%= tag_links(@article) unless @article.tags.empty? %>
  31.     </p>
  32.   </div>    
  33.   <% else %>
  34. <p class="links">
  35. <%= link_to_permalink(article, _("Read full article"), nil, 'more') if controller.action_name != 'permalink' %>
  36. <%= link_to_permalink(article,pluralize(article.published_comments.size, _('no comments') , _('1 comment'), __('%d comments') ),'comments', 'comments') %>
  37. </p>    
  38.   <% end %>
  39.   <br style="clear:both;" />
  40. </div>