_article.html.erb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:2k
- <div class="atomentry" id="article-<%= article.id %>">
- <div class="title">
- <h2 class="title"><%= (controller.action_name.include? 'permalink') ? article.title : link_to_permalink(article,article.title) %></h2>
- <div class="meta">
- <%= _("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>
- </div>
- </div>
- <div class="content">
- <% unless controller.action_name == 'redirect' %>
- <% if article.excerpt? %>
- <%= article.excerpt %>
- <% else %>
- <%= article.html(:body) %>
- <% if article.extended? %>
- <div class="extended">
- <p><%= link_to_permalink article,"Continue reading..." %></p>
- </div>
- <% end %>
- <% end %>
- <% else %>
- <%= article.html(:body) %>
- <div class="extended">
- <%= article.html(:extended) %>
- </div>
- <% end %>
- </div>
- <% if controller.controller_name == "articles" and controller.action_name == "redirect" %>
- <div class="meta">
- <p class="infos"><small>
- <%= _("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})) %>
- <%= _("and %s", category_links(@article)) unless @article.categories.empty? %>.
- <%= _("You can follow any any response to this entry through the %s", link_to(_("Atom feed"), @auto_discovery_url_atom)) %>.
- <%= _("You can leave a %s", link_to_permalink(article, _('comment'), 'comments')) unless @article.comments_closed? %>
- <%= _("or a %s from your own site", link_to_permalink(@article, _('trackback'), 'trackbacks')) if @article.allow_pings? %>.
- </small></p>
- <p class="tags">
- <%= tag_links(@article) unless @article.tags.empty? %>
- </p>
- </div>
- <% else %>
- <p class="links">
- <%= link_to_permalink(article, _("Read full article"), nil, 'more') if controller.action_name != 'permalink' %>
- <%= link_to_permalink(article,pluralize(article.published_comments.size, _('no comments') , _('1 comment'), __('%d comments')),'comments', 'comments') %>
- </p>
- <% end %>
- <br style="clear: left;" />
- </div>