<div class="btn-toolbar pull-right">
  <div class="btn-group">
	<% if (attr.admin) { %> 
		<a class="btn <%= (attr.like) ? 'disabled' : '' %> like-post" title="Polub"><i class="icon-thumbs-up"></i> <span class="hidden-phone">Polub</span></a> 
		<a class="btn <%= (attr.watch) ? 'disabled' : '' %> watch-post"  title="Obserwuj"><i class="icon-eye-open"></i> <span class="hidden-phone">Obserwuj</span></a>
		
	<% 	}
	else {
	%> 

	<%
	} %>
	<% if (attr.own || attr.admin) {
		%> <a class="btn btn-info edit-post" title="Edycja"><i class="icon-edit"></i> <span class="hidden-phone">Edycja</span></a> <%
	}
	else {
	%> 
	<a class="btn <%= (attr.like) ? 'disabled' : '' %> like-post" title="Polub"><i class="icon-thumbs-up"></i> <span class="hidden-phone">Lubię to!</span></a> 
	<a class="btn <%= (attr.watch) ? 'disabled' : '' %> watch-post"  title="Obserwuj"><i class="icon-eye-open"></i> <span class="hidden-phone">Obserwuj</span></a>
	<%
	} %>
	<% if (attr.own || attr.admin) {
		%> <a class="btn btn-danger remove" title="Usuń"><i class="icon-remove"></i> <span class="hidden-phone">Usuń</span></a> <%
	}
	else {
	}
	%>    
	<a class="btn" href="/#posts/<%= attr._id %>" title="Komentarz"><i class="icon-comment"></i> <span class="hidden-phone">Dodaj komentarz</span></a> 
  </div>
</div>

<h3><a href="<%= (attr.url) ? attr.url : '/#posts/'+attr._id %>" <%=(attr.url) ? ' target="_blank" ':''%> > <%= attr.title %></a><small><%= (attr.url)? ' ('+attr.url+')': '' %> </small></h3>
<p><small>autor <a href="/#people/<%= attr.author.id %>"><%= attr.author.name %></a> 
	<%= (attr.likes && attr.likes.length>0) ? '| Polubienia: '+attr.likes.length :'' %>
	<%= (attr.comments && attr.comments.length>0) ? '| Comments: '+attr.comments.length :'' %>
	<%= (attr.watches && attr.watches.length>0) ? '| Watches: '+attr.watches.length :'' %>
</small></p>
<!-- <p><%= (attr.url) ? '' : attr.text %></p> -->

<div class="edit-box">
</div>