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

Ajax

开发平台:

Others

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