-
Notifications
You must be signed in to change notification settings - Fork 0
/
_recordset.html.erb
32 lines (32 loc) · 1.18 KB
/
_recordset.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<% if posts.any? %>
<table class="posts">
<col style="width: 28%;" />
<col style="width: 72%;" />
<tbody>
<% posts.each do |post| %>
<% content_tag(:tr, :id => dom_id(post)) do %>
<td>
<p class="spaced quiet timestamp created-at">
<strong><%= post.created_at < 1.day.ago ? post.created_at.to_s(:long) : "#{distance_of_time_in_words_to_now(post.created_at)} ago" %></strong>
</p>
<% column 2, :image do %>
<div style="width: 72px; height: 72px; padding-bottom: .75em">
<%= image_tag post.author.gravatar_url :size => 72 %>
</div>
<% end %>
<% column 4, :quieter do %>
<strong class="author quiet"><%= post.author.full_name %></strong>
<span class="post-info">
<%= "<strong>Administrator</strong><br/>" if post.author.has_privilege?(:admin) %>
<%= pluralize post.author.posts_count, 'post' %>
</span>
<% end %>
</td>
<td>
<%= textilize(post.body) %>
</td>
<% end %>
<% end %>
</tbody>
</table>
<% end %>