fix new postpresenter styles

This commit is contained in:
Albert Yi
2018-11-05 15:11:27 -08:00
parent 9ddb9cd434
commit 1d3eb584c7
5 changed files with 9 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
<div class="list-of-comments">
<% @comments.each do |comment| %>
<% if CurrentUser.is_moderator? || (params[:search] && params[:search][:is_deleted] =~ /t/) || !comment.is_deleted? %>
<div id="post_<%= comment.post.id %>" class="post <%= PostPresenter.preview_class(comment.post) %>" <%= PostPresenter.data_attributes(comment.post) %>>
<%= content_tag(:div, { id: "post_#{comment.post.id}", class: ["post", *PostPresenter.preview_class(comment.post)].join(" ") }.merge(PostPresenter.data_attributes(comment.post))) do %>
<div class="preview">
<% if comment.post.visible? %>
<%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %>
@@ -10,7 +10,7 @@
</div>
<%= render :partial => "comments/partials/show/comment", :collection => [comment] %>
<div class="clearfix"></div>
</div>
<% end %>
<% end %>
<% end %>
</div>

View File

@@ -11,7 +11,7 @@
<% @posts.select {|x| x.visible?}.each do |post| %>
<% if CurrentUser.is_moderator? || post.comments.undeleted.exists? %>
<div id="post_<%= post.id %>" class="post <%= PostPresenter.preview_class(post) %>" <%= PostPresenter.data_attributes(post) %>>
<%= content_tag(:div, { id: "post_#{post.id}", class: ["post", *PostPresenter.preview_class(post)].join(" ") }.merge(PostPresenter.data_attributes(post))) do %>
<div class="preview">
<% if post.visible? %>
<%= link_to(image_tag(post.preview_file_url), post_path(post)) %>
@@ -19,7 +19,7 @@
</div>
<%= render "comments/partials/index/list", :post => post, :comments => post.comments.visible(CurrentUser.user).recent.reverse, :show_header => true %>
<div class="clearfix"></div>
</div>
<% end %>
<% end %>
<% end %>
</div>

View File

@@ -2,7 +2,7 @@
<div id="a-show">
<div class="comments-for-post">
<div class="list-of-comments">
<div id="post_<%= @comment.post.id %>" class="post <%= PostPresenter.preview_class(@comment.post) %>" <%= PostPresenter.data_attributes(@comment.post) %>>
<%= content_tag(:div, { id: "post_#{@comment.post_id}", class: ["post", *PostPresenter.preview_class(@comment.post)].join(" ") }.merge(PostPresenter.data_attributes(@comment.post))) do %>
<div class="preview">
<% if @comment.post.visible? %>
<%= link_to(image_tag(@comment.post.preview_file_url), post_path(@comment.post)) %>
@@ -10,7 +10,7 @@
</div>
<%= render :partial => "comments/partials/show/comment", :collection => [@comment] %>
<div class="clearfix"></div>
</div>
<% end %>
</div>
</div>
</div>