_post.rhtml 1.17 KB
<% extend CommunityHubPlugin::HubHelper %>

<li id="<%= post.id %>" class="<%=post_css_classes(post.id, latest_post, oldest_post)%>"> 
  <ul>
    <li class="time"><%= post_time(post.created_at) %></li>
    <li class="avatar"><%= image_tag(profile_icon(post.author, :minor)) %></li>
    <li class="message"><span class="author"><%= post.author_name %>:</span> <%= post.body %></li>

    <% if mediator?(hub) %>
    <li class="mediation-bar">

      <ul>
       
        <li class="promote">
      	  <img class="<%= !promoted?(hub, post.author.id) ? "promoted" : "not-promoted" %>" src="/designs/icons/default/outras/16x16/actions/spread.png" />
        </li>
        <% end %>
       
        <% if mediator?(hub) %>
        <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>