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"> <div class="list-of-comments">
<% @comments.each do |comment| %> <% @comments.each do |comment| %>
<% if CurrentUser.is_moderator? || (params[:search] && params[:search][:is_deleted] =~ /t/) || !comment.is_deleted? %> <% 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"> <div class="preview">
<% if comment.post.visible? %> <% if comment.post.visible? %>
<%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %> <%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %>
@@ -10,7 +10,7 @@
</div> </div>
<%= render :partial => "comments/partials/show/comment", :collection => [comment] %> <%= render :partial => "comments/partials/show/comment", :collection => [comment] %>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> <% end %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@@ -11,7 +11,7 @@
<% @posts.select {|x| x.visible?}.each do |post| %> <% @posts.select {|x| x.visible?}.each do |post| %>
<% if CurrentUser.is_moderator? || post.comments.undeleted.exists? %> <% 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"> <div class="preview">
<% if post.visible? %> <% if post.visible? %>
<%= link_to(image_tag(post.preview_file_url), post_path(post)) %> <%= link_to(image_tag(post.preview_file_url), post_path(post)) %>
@@ -19,7 +19,7 @@
</div> </div>
<%= render "comments/partials/index/list", :post => post, :comments => post.comments.visible(CurrentUser.user).recent.reverse, :show_header => true %> <%= render "comments/partials/index/list", :post => post, :comments => post.comments.visible(CurrentUser.user).recent.reverse, :show_header => true %>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> <% end %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div id="a-show"> <div id="a-show">
<div class="comments-for-post"> <div class="comments-for-post">
<div class="list-of-comments"> <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"> <div class="preview">
<% if @comment.post.visible? %> <% if @comment.post.visible? %>
<%= link_to(image_tag(@comment.post.preview_file_url), post_path(@comment.post)) %> <%= link_to(image_tag(@comment.post.preview_file_url), post_path(@comment.post)) %>
@@ -10,7 +10,7 @@
</div> </div>
<%= render :partial => "comments/partials/show/comment", :collection => [@comment] %> <%= render :partial => "comments/partials/show/comment", :collection => [@comment] %>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> <% end %>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div id="post-<%= post.id %>" class="post mod-queue-preview <%= PostPresenter.preview_class(post) %>" <%= PostPresenter.data_attributes(post) %>> <%= content_tag(:div, { id: "post-#{post.id}", class: ["post", "mod-queue-preview", *PostPresenter.preview_class(post)].join(" ") }.join(PostPresenter.data_attributes(post))) do %>
<aside> <aside>
<%= link_to(image_tag(post.preview_file_url), post_path(post), :target => "_blank") %> <%= link_to(image_tag(post.preview_file_url), post_path(post), :target => "_blank") %>
</aside> </aside>
@@ -34,4 +34,4 @@
<li><strong>Tags</strong>: <%= post.presenter.inline_tag_list_html %></li> <li><strong>Tags</strong>: <%= post.presenter.inline_tag_list_html %></li>
</ul> </ul>
</section> </section>
</div> <% end %>

View File

@@ -47,7 +47,7 @@
<%= render "posts/partials/show/notices", :post => @post %> <%= 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 -%>
<div id="note-container"></div> <div id="note-container"></div>
<div id="note-preview"></div> <div id="note-preview"></div>
<%= render "posts/partials/show/embedded", post: @post %> <%= render "posts/partials/show/embedded", post: @post %>