_post.rhtml
1.37 KB
<% 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('/plugins/community_hub/icons/logo_twitter_bird_white_50x50.png', :alt => "Twitter") %>
<% elsif post.title == 'hub-message-facebook' %>
<%= image_tag('/plugins/community_hub/icons/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="pin">
<% if !pinned_message?(hub, post.id) %>
<a id="<%= post.id %>" href="#" onclick="pin_message(<%= post.id %>); return false;">
<img class="not-pinned" src="/plugins/community_hub/icons/hub-pinned-icon.png" title="<%= _("Pin message")%>" />
</a>
<% else %>
<img class="pinned" src="/plugins/community_hub/icons/hub-not-pinned-icon.png" title="<%= _("Message pinned")%>" />
<% end %>
</li>
</ul>
</li>
<% end %>
</ul>
</li>