diaspora/app/views/templates/comment_stream.jst
2012-01-26 19:58:00 -08:00

28 lines
1.2 KiB
Text

<% if(typeof(all_comments_loaded) == 'undefined' || !all_comments_loaded) { %>
<ul class="show_comments <%= comments_count <= 3 ? 'hidden' : '' %>">
<li>
<a href="/posts/<%= id %>/comments" class="toggle_post_comments">
<%= Diaspora.I18n.t('stream.more_comments', {count : comments_count - 3}) %>
</a>
</li>
</ul>
<% } %>
<ul class="comments"> </ul>
<% if(current_user) { %>
<div class="new_comment_form_wrapper <%= comments_count > 0 ? '' : 'hidden' %>">
<form accept-charset="UTF-8" action="/posts/<%= id %>/comments" class="new_comment" id="new_comment_on_<%= id %>" method="post">
<a href="/people/<%= current_user.guid %>">
<img src="<%= current_user.avatar.small %>" class="avatar" data-person-id="<%= current_user.id %>"/>
</a>
<p>
<textarea class="comment_box" id="comment_text_on_<%= id %>" name="text" rows="2" placeholder="<%= Diaspora.I18n.t('stream.comment') %>"/>
</p>
<div class="submit_button">
<input class="button creation" id="comment_submit_<%= id %>" name="commit" type="submit" value="<%= Diaspora.I18n.t('stream.comment') %>" />
</div>
</form>
</div>
<% } %>