Don’t allow comments on questions for unverified users and when the phase is closed
This commit is contained in:
@@ -13,14 +13,25 @@
|
||||
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
|
||||
|
||||
<% if user_signed_in? %>
|
||||
<%= render 'comments/form', {commentable: commentable, parent_id: nil, toggeable: false} %>
|
||||
<% if comments_closed_for_commentable?(commentable) %>
|
||||
<br>
|
||||
<div data-alert class="callout primary">
|
||||
<%= comments_closed_text(commentable) %>
|
||||
</div>
|
||||
<% elsif require_verified_resident_for_commentable?(commentable, current_user) %>
|
||||
<br>
|
||||
<div data-alert class="callout primary">
|
||||
<%= t("comments.verified_only", verify_account: link_to(t("comments.verify_account"), verification_path )).html_safe %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render 'comments/form', {commentable: commentable, parent_id: nil, toggeable: false} %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<br>
|
||||
|
||||
<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 %>
|
||||
<br>
|
||||
<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 %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user