app/views/talkie/comments/_comment.html.erb in talkie-0.2.0 vs app/views/talkie/comments/_comment.html.erb in talkie-0.3.0
- old
+ new
@@ -1,6 +1,6 @@
-<div class="talkie-comment-holder">
+<div class="talkie-comment-holder" id="talkie-comment-<%= comment.id %>">
<% if display_user_avatar? %>
<div class="talkie-comment-creator-avatar">
<%= avatar_image_tag comment.creator %>
</div>
<% end %>
@@ -30,15 +30,19 @@
<% if deletable_and_allowed? comment %>
<%= link_to_delete_comment comment %>
<% end %>
</div>
<div class="talkie-comments-reply-form-container" style="display:none">
- <%= form_for [talkie, Talkie::Comment.new] do |f| %>
+ <%= form_for [talkie, Talkie::Comment.new], html: { class: "talkie-comments-form" } do |f| %>
<%= f.hidden_field :commentable_id, value: commentable.id %>
<%= f.hidden_field :commentable_type, value: commentable.class.name %>
<%= hidden_field_tag :parent_comment_id, comment.id %>
- <%= f.text_area :body, placeholder: t("talkie.comment.form.body_placeholder") %>
+ <%= f.text_area :body, placeholder: t("talkie.comment.form.body_placeholder"), class: "talkie-comment-body-textarea", required: "required" %>
+ <% if Talkie.mentions_enabled? %>
+ <p class="talkie-hint"><%= t("talkie.comments.form.hint_html") %></p>
+ <%= f.hidden_field :mention_tokens, class: "comment-mentions" %>
+ <% end %>
<%= submit_tag t("talkie.comment.form.reply"), class: 'talkie-comments-form-submit' %>
<% end %>
</div>
<%= render comment.children %>
<% end %>