Complete create comment details
This commit is contained in:
@@ -8,16 +8,24 @@
|
||||
|
||||
<div class="comments-wrapper">
|
||||
<div class="comment-input">
|
||||
<%= form_for Legislation::Annotation.new, url: legislation_process_draft_version_annotations_path(@process, @draft_version), remote: true do |f| %>
|
||||
<%= f.text_area :text %>
|
||||
<% if user_signed_in? %>
|
||||
<%= form_for Legislation::Annotation.new, url: legislation_process_draft_version_annotations_path(@process, @draft_version), remote: true do |f| %>
|
||||
<%= f.text_area :text %>
|
||||
|
||||
<div class="comment-actions">
|
||||
<a class="cancel-comment" href="#" data-cancel-annotation><%= t('legislation.annotations.comments.cancel') %></a>
|
||||
<%= f.submit t('legislation.annotations.comments.publish_comment'), class: 'button strong publish-comment' %>
|
||||
</div>
|
||||
<div class="comment-actions">
|
||||
<a class="cancel-comment" href="#" data-cancel-annotation><%= t('legislation.annotations.comments.cancel') %></a>
|
||||
<%= f.submit t('legislation.annotations.comments.publish_comment'), class: 'button strong publish-comment' %>
|
||||
</div>
|
||||
|
||||
<%= f.hidden_field :quote %>
|
||||
<%= f.hidden_field :ranges %>
|
||||
<%= f.hidden_field :quote %>
|
||||
<%= f.hidden_field :ranges %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div data-alert class="callout primary">
|
||||
<%= t("debates.show.login_to_comment",
|
||||
signin: link_to(t("votes.signin"), new_user_session_path),
|
||||
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
$("#comments-box").html("<%= j render('comments_box', annotation: @annotation) %>");
|
||||
$("#comments-box").html("<%= j render('comments_box', annotation: @annotation) %>").show();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user