From 1d3eb584c7d38956c22b1f1e47ba4469d6fdcc99 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Mon, 5 Nov 2018 15:11:27 -0800 Subject: [PATCH] fix new postpresenter styles --- app/views/comments/_index_by_comment.html.erb | 4 ++-- app/views/comments/_index_by_post.html.erb | 4 ++-- app/views/comments/show.html.erb | 4 ++-- app/views/moderator/post/queues/_post.html.erb | 4 ++-- app/views/posts/show.html.erb | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/comments/_index_by_comment.html.erb b/app/views/comments/_index_by_comment.html.erb index 01ebabe3f..236f21143 100644 --- a/app/views/comments/_index_by_comment.html.erb +++ b/app/views/comments/_index_by_comment.html.erb @@ -2,7 +2,7 @@
<% @comments.each do |comment| %> <% if CurrentUser.is_moderator? || (params[:search] && params[:search][:is_deleted] =~ /t/) || !comment.is_deleted? %> -
> + <%= content_tag(:div, { id: "post_#{comment.post.id}", class: ["post", *PostPresenter.preview_class(comment.post)].join(" ") }.merge(PostPresenter.data_attributes(comment.post))) do %>
<% if comment.post.visible? %> <%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %> @@ -10,7 +10,7 @@
<%= render :partial => "comments/partials/show/comment", :collection => [comment] %>
-
+ <% end %> <% end %> <% end %>
diff --git a/app/views/comments/_index_by_post.html.erb b/app/views/comments/_index_by_post.html.erb index a8966259a..640d3ef23 100644 --- a/app/views/comments/_index_by_post.html.erb +++ b/app/views/comments/_index_by_post.html.erb @@ -11,7 +11,7 @@ <% @posts.select {|x| x.visible?}.each do |post| %> <% if CurrentUser.is_moderator? || post.comments.undeleted.exists? %> -
> + <%= content_tag(:div, { id: "post_#{post.id}", class: ["post", *PostPresenter.preview_class(post)].join(" ") }.merge(PostPresenter.data_attributes(post))) do %>
<% if post.visible? %> <%= link_to(image_tag(post.preview_file_url), post_path(post)) %> @@ -19,7 +19,7 @@
<%= render "comments/partials/index/list", :post => post, :comments => post.comments.visible(CurrentUser.user).recent.reverse, :show_header => true %>
-
+ <% end %> <% end %> <% end %> diff --git a/app/views/comments/show.html.erb b/app/views/comments/show.html.erb index 79ddc57a6..f07f52ef5 100644 --- a/app/views/comments/show.html.erb +++ b/app/views/comments/show.html.erb @@ -2,7 +2,7 @@
-
> + <%= content_tag(:div, { id: "post_#{@comment.post_id}", class: ["post", *PostPresenter.preview_class(@comment.post)].join(" ") }.merge(PostPresenter.data_attributes(@comment.post))) do %>
<% if @comment.post.visible? %> <%= link_to(image_tag(@comment.post.preview_file_url), post_path(@comment.post)) %> @@ -10,7 +10,7 @@
<%= render :partial => "comments/partials/show/comment", :collection => [@comment] %>
-
+ <% end %>
diff --git a/app/views/moderator/post/queues/_post.html.erb b/app/views/moderator/post/queues/_post.html.erb index 6ddbbf60b..0ad9f5c1a 100644 --- a/app/views/moderator/post/queues/_post.html.erb +++ b/app/views/moderator/post/queues/_post.html.erb @@ -1,4 +1,4 @@ -
> +<%= content_tag(:div, { id: "post-#{post.id}", class: ["post", "mod-queue-preview", *PostPresenter.preview_class(post)].join(" ") }.join(PostPresenter.data_attributes(post))) do %> @@ -34,4 +34,4 @@
  • Tags: <%= post.presenter.inline_tag_list_html %>
  • -
    +<% end %> diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index 012e08e2c..2cd3b94d6 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -47,7 +47,7 @@ <%= render "posts/partials/show/notices", :post => @post %> - <%= content_tag(:section, PostPresenter.data_attributes(@post).merge(id: "image-container")) do -%> + <%= content_tag(:section, { id: "image-container" }.merge(PostPresenter.data_attributes(@post))) do -%>
    <%= render "posts/partials/show/embedded", post: @post %>