_post.rhtml 1.52 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('/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>