posts/index: update pending BUR notice criteria.
* Only show pending BUR notice on first page. * Show pending BUR notice for all searches that include a single tag.
This commit is contained in:
@@ -132,8 +132,8 @@ module PostSets
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pending_bulk_update_requests
|
def pending_bulk_update_requests
|
||||||
return BulkUpdateRequest.none unless query.is_simple_tag?
|
return BulkUpdateRequest.none unless tag.present?
|
||||||
@pending_bulk_update_requests ||= BulkUpdateRequest.pending.where_array_includes_any(:tags, query.tags.first.name)
|
@pending_bulk_update_requests ||= BulkUpdateRequest.pending.where_array_includes_any(:tags, tag.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if CurrentUser.user.is_member? && post_set.query.is_simple_tag? %>
|
<% if CurrentUser.user.is_member? && post_set.tag.present? && post_set.current_page == 1 %>
|
||||||
<% cache("tag-change-notice:#{post_set.query.normalize_query}", expires_in: 4.hours) do %>
|
<% cache("tag-change-notice:#{post_set.query.normalize_query}", expires_in: 4.hours) do %>
|
||||||
<% if post_set.pending_bulk_update_requests.present? %>
|
<% if post_set.pending_bulk_update_requests.present? %>
|
||||||
<div class="fineprint tag-change-notice">
|
<div class="fineprint tag-change-notice">
|
||||||
|
|||||||
Reference in New Issue
Block a user