DEV: Add PluginOutlet on full page search container and filter

This commit is contained in:
rngus2344 2024-12-23 13:19:41 -06:00
parent 5936f54521
commit 5112525865
No known key found for this signature in database
GPG Key ID: 4E5F7A35021FBFA6
3 changed files with 31 additions and 19 deletions

View File

@ -5,6 +5,17 @@
{{body-class "search-page"}}
<section class="search-container">
<PluginOutlet
@name="full-page-search-above-search-header"
@connectorTagName="div"
@outletArgs={{hash
search=this.searchTerm
type=this.search_type
model=this.model
addSearchResults=this.addSearchResults
sortOrder=this.sortOrder
}}
/>
<div class="search-header" role="search">
<h1 class="search-page-heading">
{{#if this.hasResults}}
@ -56,13 +67,26 @@
{{/if}}
<div class="search-filters">
<SearchAdvancedOptions
@searchTerm={{readonly this.searchTerm}}
@onChangeSearchTerm={{fn (mut this.searchTerm)}}
@search={{action "search" (hash collapseFilters=true)}}
@searchButtonDisabled={{this.searchButtonDisabled}}
@expandFilters={{this.expandFilters}}
/>
<PluginOutlet @name="full-page-search-search-filters"
@outletArgs={{hash
searchTerm=(readonly this.searchTerm)
onChangeSearchTerm=(fn (mut this.searchTerm))
search=(action "search" (hash collapseFilters=true))
searchButtonDisabled=this.searchButtonDisabled
expandFilters=this.expandFilters
sortOrder=this.sortOrder
sortOrderOptions=this.sortOrders
setSortOrder=this.setSortOrder
}}
>
<SearchAdvancedOptions
@searchTerm={{readonly this.searchTerm}}
@onChangeSearchTerm={{fn (mut this.searchTerm)}}
@search={{action "search" (hash collapseFilters=true)}}
@searchButtonDisabled={{this.searchButtonDisabled}}
@expandFilters={{this.expandFilters}}
/>
</PluginOutlet>
</div>
{{/if}}

View File

@ -36,7 +36,6 @@ class WebHookEventType < ActiveRecord::Base
user_promoted: 13,
voting: 14,
chat: 15,
custom: 16,
},
scopes: false
@ -87,8 +86,6 @@ class WebHookEventType < ActiveRecord::Base
chat_message_edited: 1802,
chat_message_trashed: 1803,
chat_message_restored: 1804,
category_experts_approved: 1901,
category_experts_unapproved: 1902,
}
has_and_belongs_to_many :web_hooks
@ -120,11 +117,6 @@ class WebHookEventType < ActiveRecord::Base
],
)
end
unless defined?(SiteSetting.enable_category_experts) && SiteSetting.enable_category_experts
ids_to_exclude.concat(
[TYPES[:category_experts_approved], TYPES[:category_experts_unapproved]],
)
end
self.where.not(id: ids_to_exclude)
end
end

View File

@ -33,10 +33,6 @@ en:
chat_messages_count: "Chat messages"
chat_channels_count: "Chat channels"
chat_users_count: "Chat users"
activities:
chat_messages:
one: "%{formatted_number} chat message"
other: "%{formatted_number} chat messages"
chat:
text_copied: Text copied to clipboard