Pony.fm/public/templates/directives/comments.html

21 lines
764 B
HTML
Raw Normal View History

2013-08-01 10:57:08 +02:00
<div class="comments">
<div class="alert alert-info" ng-show="resource.comments.count == 0">
There are no comments yet!
</div>
<ul ng-show="resource.comments.count > 0">
<li ng-repeat="comment in resource.comments.list">
<div class="meta">
<a href="{{comment.user.url}}">{{comment.user.name}}</a> posted
{{comment.created_at.date | momentFromNow}}
</div>
<img ng-src="{{comment.user.avatars.thumbnail}}" />
<div class="content">{{comment.content}}</div>
</li>
</ul>
<form class="pfm-form" ng-submit="addComment()" ng-show="auth.isLogged">
<div class="form-row">
<textarea ng-model="content"></textarea>
</div>
<button type="submit" class="btn" ng-class="{disabled: content.length == 0}">Post Comment</button>
</form>
</div>