_post.rhtml
1.52 KB
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
33
34
35
36
37
38
39
<% extend CommunityHubPlugin::HubHelper %>
<li id="<%= post.id %>" class="post">
<ul>
<li class="time"><%= post_time(post.created_at) %></li>
<li class="avatar">
<% if post.title == 'hub-message-twitter' %>
<%= image_tag('/designs/themes/default/images/logo_twitter_bird_blue_50x50.png', :alt => "Twitter") %>
<% elsif post.title == 'hub-message-facebook' %>
<%= image_tag('/designs/themes/default/images/logo-facebook-50x50.png', :alt => "Facebook") %>
<% else %>
<%= image_tag(profile_icon(post.author, :minor)) if post.author %>
<% end %>
</li>
<li class="message"><span class="author"><%= post.author_name %>:</span> <%= post.body %></li>
<% if mediator?(hub) && post.title != 'hub-message-twitter' && post.title != 'hub-message-facebook' %>
<li class="mediation-bar">
<ul>
<li class="promote">
<img class="<%= !promoted?(hub, post.author.id) ? "promoted" : "not-promoted" if post.author %>" src="/designs/icons/default/outras/16x16/actions/spread.png" />
</li>
<li class="pin">
<% if !pinned_message?(hub, post.id) %>
<a id="<%= post.id %>" href="#" onclick="pin_message(<%= post.id %>); return false;">
<img class="pinned" src="/designs/icons/default/outras/16x16/apps/tags.gif" />
</a>
<% else %>
<img class="not-pinned" src="/designs/icons/default/outras/16x16/apps/tags.gif" />
<% end %>
</li>
</ul>
</li>
<% end %>
</ul>
</li>