ensl.org/app/views/widgets/_posts.html.erb

24 lines
603 B
Text
Raw Normal View History

2014-04-06 14:14:03 +00:00
<div class="widget posts">
<h4><%= t('widget.posts') %></h4>
<div class="widget-content-wrapper">
<div class="separator">Latest forum posts</div>
<ol>
2015-08-20 15:20:50 +00:00
<% Topic.recent_topics.each do |topic| %>
<li>
<%= link_to shorten(topic, 28), lastpost(topic) %>
</li>
<% end %>
</ol>
<div class="separator">Latest comments</div>
<ol>
<% Comment.recent.filtered.each do |comment| %>
<li>
<%= namelink comment.commentable, 15 %>
by <%= namelink comment.user, 10 %>
</li>
<% end %>
</ol>
2014-04-06 14:14:03 +00:00
</div>
</div>