beast rev 2066
[beast-modified.git] / app / views / posts / monitored.html.erb
blob11a51acb9d9123399130d2c337d5856bef69c4e8
1 <% @page_title = "Posts that {user} is monitoring"[:posts_user_is_monitoring, h(@user.display_name)] -%>
3 <% content_for :right do %>
5 <h4><%= "{name}'s Monitored Topics"[:users_monitored_topics, link_to(h(@user.display_name), user_path(@user))] %></h4>
6 <ul class="flat">
7 <% @user.monitored_topics.find(:all, :limit => 25).each do |topic| %>
8   <li><%= link_to topic.title, topic_path(topic.forum_id, topic) %></li>
9 <% end %>
10 </ul>
12 <% end -%>
14 <h1><%= @page_title %></h1>
15 <p class="subtitle">
16   <%= feed_icon_tag @page_title, formatted_monitored_posts_path(:user_id => @user, :format => 'rss') %>
17   <%= '{count} post(s) found'[(count=@posts.total_entries)==1 ? :post_count_found : :posts_count_found, number_with_delimiter(count)] %>
18 </p>
20 <%= pagination @posts %>
22 <table border="0" cellspacing="0" cellpadding="0" class="posts wide">
23 <% for post in @posts do %>
24 <% unless post == @posts.first %>
25 <tr class="spacer">
26   <td colspan="2">&nbsp;</td>
27 </tr>
28 <% end %>
29 <tr class="post hentry" id="<%= dom_id post %>">
30   <td class="author vcard">
31     <div class="date">
32       <abbr class="updated" title="<%= post.created_at.xmlschema %>">
33       <% if post.created_at > Time.now.utc-24.hours%>
34       <%= time_ago_in_words(post.created_at).sub(/about /, '') %>
35       <% else %>
36       <%= post.created_at.strftime("%b %e, %Y"[:date_format])%>
37       <% end %>
38       </abbr>
39     </div>
41     <%= avatar_for post.user %>
42     <span class="fn"><%= link_to truncate(h(post.user.display_name), 15), user_path(post.user), :class => (post.user == @posts.first.user ? "admin" : nil) %></span>
43     <span class="posts"><%= '{count} post(s)'[(count=post.user.posts.size)==1 ? :post_count : :posts_count, number_with_delimiter(count)] %></span>
44   </td>
45   <td class="body entry-content">
46     <p class="topic"><%= 'Topic'[:topic_title] %>: <%= link_to h(post.topic_title), topic_path(post.forum_id, post.topic_id) %></p>
47     
48     <%= post.body_html %>
49   </td>
50 </tr>
52 <% end %>
53 </table>
55 <%= next_page @posts %>
56 <%= pagination @posts %>