<section data-ng-controller="PostsController" data-ng-init="find()">
	<div class="page-header">
		<h1 class="small-h1">Posts</h1>
	</div>
	<div class="list-group">
		<a data-ng-repeat="post in posts" data-ng-href="#!/posts/{{post._id}}" class="list-group-item">
			<h4 class="list-group-item-heading" data-ng-bind="post.name"></h4>
		
			<h4>
				{{ post.track.name }}
				<br>
				<small>
					{{ post.track.artist }}
				</small>
			</h4>
			<small class="list-group-item-text">
				Posted on
				<span data-ng-bind="post.created | date:'medium'"></span>
				by
				<span data-ng-bind="post.user.displayName"></span>
			</small>
		</a>  
    </div>
	<div class="alert alert-warning text-center" data-ng-hide="!posts.$resolved || posts.length">
		No Posts yet, why don't you <a href="/#!/posts/create">create one</a>?
	</div>
</section>