diff --git a/app/controllers/ai_tags_controller.rb b/app/controllers/ai_tags_controller.rb index 15e4c7b68..b02616ba0 100644 --- a/app/controllers/ai_tags_controller.rb +++ b/app/controllers/ai_tags_controller.rb @@ -7,6 +7,7 @@ class AITagsController < ApplicationController limit = params[:limit].presence || CurrentUser.user.per_page @mode = params.fetch(:mode, "gallery") @preview_size = params[:size].presence || cookies[:post_preview_size].presence || MediaAssetGalleryComponent::DEFAULT_SIZE + params[:search][:is_posted] ||= "true" if request.format.html? @ai_tags = authorize AITag.visible(CurrentUser.user).paginated_search(params, limit: limit, count_pages: false) @ai_tags = @ai_tags.includes(:media_asset, :tag, :post) if request.format.html? diff --git a/app/views/ai_tags/index.html.erb b/app/views/ai_tags/index.html.erb index 3e7be795f..7c775f11c 100644 --- a/app/views/ai_tags/index.html.erb +++ b/app/views/ai_tags/index.html.erb @@ -14,7 +14,6 @@ <% end %>
- <%= link_to "All", current_page_path(search: search_params.to_h.without("is_posted")), class: ["inline-block p-1 pb-2", (search_params[:is_posted].nil? ? "border-current border-b-2 -mb-px" : "inactive-link")] %> <%= link_to "Posted", current_page_path(search: search_params.merge(is_posted: true)), class: ["inline-block p-1 pb-2", (search_params[:is_posted].to_s.truthy? ? "border-current border-b-2 -mb-px" : "inactive-link")] %> <%= link_to "Unposted", current_page_path(search: search_params.merge(is_posted: false)), class: ["inline-block p-1 pb-2", (search_params[:is_posted].to_s.falsy? ? "border-current border-b-2 -mb-px" : "inactive-link")] %>