Pony.fm/public/templates/directives/comments.html
2016-08-07 15:22:49 +01:00

21 lines
988 B
HTML

<div class="comments">
<h2>All Comments ({{resource.comments.length}})</h2>
<form class="pfm-form" ng-submit="addComment()" ng-show="::auth.isLogged">
<div class="form-row">
<input type="text" ng-model="content" placeholder="Write a comment&hellip;" />
</div>
</form>
<md-list>
<li ng-show="resource.comments.length == 0" class="empty">
There are no comments yet!
</li>
<md-list-item ng-repeat="comment in resource.comments track by comment.id" class="md-3-line">
<img pfm-src-loader="::comment.user.avatars.thumbnail" class="md-avatar" alt="::comment.user.name" pfm-src-size="thumbnail" />
<div class="md-list-item-text">
<a ng-href="{{::comment.user.url}}">{{::comment.user.name}}</a>
<h4>{{::comment.content}}</h4>
<p>{{::comment.created_at.date | momentFromNow}}</p>
</div>
</md-list-item>
</md-list>
</div>