refactor comments, select language
This commit is contained in:
@@ -2,12 +2,16 @@
|
||||
<%= render "entries/comment", comment: @comment %>
|
||||
<% end %>
|
||||
|
||||
<% if @comment.language_code.present? %>
|
||||
<%= turbo_stream.replace "comment-details-#{@comment.language_code}" do %>
|
||||
<%= render "entries/language_comment_details", entry: @commentable, language_code: @comment.language_code %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream.replace "comment_tabs" do %>
|
||||
<%= render "entries/comment_tabs", entry: @commentable %>
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream.update "comment_form_modal" do %>
|
||||
<%= render "entries/comment_modal_content", entry: @commentable %>
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream.append "comment_form_modal", target: "comment_form_modal" do %>
|
||||
<script>
|
||||
document.getElementById('comment_form_modal').classList.add('hidden');
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user