From a4cca8b020320e5afaf787144ccc2b89ab402932 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 5 Oct 2022 01:39:21 -0500 Subject: [PATCH] posts: fixup for b4a67331c. --- app/views/posts/index.html.erb | 112 +++++++++++++++++---------------- 1 file changed, 58 insertions(+), 54 deletions(-) diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb index 1adc37818..a58b56b18 100644 --- a/app/views/posts/index.html.erb +++ b/app/views/posts/index.html.erb @@ -1,60 +1,62 @@ <% content_for(:sidebar) do %> <%= render "posts/partials/common/search", :path => posts_path, :tags => params[:tags], :tags_dom_id => "tags" %> - <% if policy(Post).can_use_mode_menu? %> -
-

Mode

-
- -
- + <% unless @post_set.artist.present? && @post_set.artist.is_banned? && !CurrentUser.user.is_approver? %> + <% if policy(Post).can_use_mode_menu? %> +
+

Mode

+
+ +
+ +
+ <% end %> + + <%= render "posts/partials/index/blacklist" %> + +
+

Tags

+ <%= render_search_tag_list(@post_set.related_tags, current_query: params[:tags], show_extra_links: policy(Post).show_extra_links?, search_params: { show_votes: params[:show_votes], size: params[:size] }) %> +
+ +
+

Options

+
    + <% if policy(SavedSearch).create? %> +
  • <%= button_tag(bookmark_icon + " Save search", id: "save-search", class: "ui-button ui-widget ui-corner-all sub") %>
  • + <% end %> +
+
+ + <% end %> - - <%= render "posts/partials/index/blacklist" %> - -
-

Tags

- <%= render_search_tag_list(@post_set.related_tags, current_query: params[:tags], show_extra_links: policy(Post).show_extra_links?, search_params: { show_votes: params[:show_votes], size: params[:size] }) %> -
- -
-

Options

-
    - <% if policy(SavedSearch).create? %> -
  • <%= button_tag(bookmark_icon + " Save search", id: "save-search", class: "ui-button ui-widget ui-corner-all sub") %>
  • - <% end %> -
-
- - <% end %> <% content_for(:content) do %> @@ -62,7 +64,9 @@
  • Posts - <% if @post_set.artist.present? %> + <% if @post_set.artist.present? && @post_set.artist.is_banned? && !CurrentUser.user.is_approver? %> + <%# no-op %> + <% elsif @post_set.artist.present? %> <%= link_to "Artist", artist_path(@post_set.artist), id: "show-excerpt-link", class: "artist-excerpt-link" %> <% elsif @post_set.tag&.artist? %> <%= link_to "Artist", new_artist_path(artist: { name: @post_set.tag.name }), id: "show-excerpt-link", class: "artist-excerpt-link", rel: "nofollow" %> @@ -173,7 +177,7 @@ <% if @post_set.hidden_posts.present? %>
    <% if @post_set.banned_posts.size == @post_set.posts.size %> - This page was removed from this page at the artist's request (<%= link_to_wiki "learn more", "banned_artist" %>).
    + This page was removed at the artist's request (<%= link_to_wiki "learn more", "banned_artist" %>).
    <% end %> <% if @post_set.censored_posts.present? %>