Extract partial to show "login to comment" message
This commit is contained in:
@@ -34,11 +34,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<br>
|
<br>
|
||||||
<div data-alert class="callout primary">
|
<%= render "shared/login_to_comment" %>
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% comment_tree.root_comments.each do |comment| %>
|
<% comment_tree.root_comments.each do |comment| %>
|
||||||
|
|||||||
@@ -17,13 +17,8 @@
|
|||||||
toggeable: false,
|
toggeable: false,
|
||||||
valuation: valuation } %>
|
valuation: valuation } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<br>
|
<br>
|
||||||
|
<%= render "shared/login_to_comment" %>
|
||||||
<div data-alert class="callout primary">
|
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% @comment_tree.root_comments.each do |comment| %>
|
<% @comment_tree.root_comments.each do |comment| %>
|
||||||
|
|||||||
@@ -11,13 +11,8 @@
|
|||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
<%= render "comments/form", { commentable: @debate, parent_id: nil, toggeable: false } %>
|
<%= render "comments/form", { commentable: @debate, parent_id: nil, toggeable: false } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<br>
|
<br>
|
||||||
|
<%= render "shared/login_to_comment" %>
|
||||||
<div data-alert class="callout primary">
|
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% @comment_tree.root_comments.each do |comment| %>
|
<% @comment_tree.root_comments.each do |comment| %>
|
||||||
|
|||||||
@@ -23,11 +23,7 @@
|
|||||||
<%= f.hidden_field :ranges %>
|
<%= f.hidden_field :ranges %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div data-alert class="callout primary">
|
<%= render "shared/login_to_comment" %>
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,13 +6,8 @@
|
|||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
<%= render "comments/form", { commentable: @proposal, parent_id: nil, toggeable: false } %>
|
<%= render "comments/form", { commentable: @proposal, parent_id: nil, toggeable: false } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<br>
|
<br>
|
||||||
|
<%= render "shared/login_to_comment" %>
|
||||||
<div data-alert class="callout primary">
|
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% @comment_tree.root_comments.each do |comment| %>
|
<% @comment_tree.root_comments.each do |comment| %>
|
||||||
|
|||||||
@@ -6,13 +6,8 @@
|
|||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
<%= render "comments/form", { commentable: @poll, parent_id: nil, toggeable: false } %>
|
<%= render "comments/form", { commentable: @poll, parent_id: nil, toggeable: false } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<br>
|
<br>
|
||||||
|
<%= render "shared/login_to_comment" %>
|
||||||
<div data-alert class="callout primary">
|
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% @comment_tree.root_comments.each do |comment| %>
|
<% @comment_tree.root_comments.each do |comment| %>
|
||||||
|
|||||||
@@ -6,13 +6,8 @@
|
|||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
<%= render "comments/form", { commentable: @proposal, parent_id: nil, toggeable: false } %>
|
<%= render "comments/form", { commentable: @proposal, parent_id: nil, toggeable: false } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<br>
|
<br>
|
||||||
|
<%= render "shared/login_to_comment" %>
|
||||||
<div data-alert class="callout primary">
|
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% @comment_tree.root_comments.each do |comment| %>
|
<% @comment_tree.root_comments.each do |comment| %>
|
||||||
|
|||||||
6
app/views/shared/_login_to_comment.html.erb
Normal file
6
app/views/shared/_login_to_comment.html.erb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<div data-alert class="callout primary">
|
||||||
|
<%= t("users.login_to_comment",
|
||||||
|
signin: link_to(t("users.signin"), new_user_session_path),
|
||||||
|
signup: link_to(t("users.signup"), new_user_registration_path)
|
||||||
|
).html_safe %>
|
||||||
|
</div>
|
||||||
@@ -13,14 +13,8 @@
|
|||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
<%= render "comments/form", { commentable: @topic, parent_id: nil, toggeable: false } %>
|
<%= render "comments/form", { commentable: @topic, parent_id: nil, toggeable: false } %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<%= render "shared/login_to_comment" %>
|
||||||
<div data-alert class="callout primary">
|
|
||||||
<%= t("users.login_to_comment",
|
|
||||||
signin: link_to(t("users.signin"), new_user_session_path),
|
|
||||||
signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user