DEV: Add plugin wrappers required to fix template overrides (#29825)

* DEV: Add plugin wrappers required to fix tempalte overrides

* updated search-result-entry file

* activity file unintended changes fixed
This commit is contained in:
Juan David Martínez Cubillos 2024-12-02 13:07:27 -05:00 committed by GitHub
parent cf2b4d9934
commit 31dadc8373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 117 additions and 100 deletions

View File

@ -1,11 +1,18 @@
<div class="author">
<a href={{this.post.userPath}} data-user-card={{this.post.username}}>
{{avatar this.post imageSize="large"}}
</a>
</div>
<PluginOutlet
@name="search-results-topic-avatar-wrapper"
@outletArgs={{hash post=this.post}}
>
<div class="author">
<a href={{this.post.userPath}} data-user-card={{this.post.username}}>
{{avatar this.post imageSize="large"}}
</a>
</div>
</PluginOutlet>
<div class="fps-topic" data-topic-id={{this.post.topic.id}}>
<div class="topic">
{{#if this.bulkSelectEnabled}}
<TrackSelected
@selectedList={{this.selected}}
@ -55,33 +62,43 @@
</div>
</div>
<div class="blurb container">
<span class="date">
{{format-date this.post.created_at format="tiny"}}
{{#if this.post.blurb}}
<span class="separator">-</span>
{{/if}}
</span>
{{#if this.post.blurb}}
{{#if this.siteSettings.use_pg_headlines_for_excerpt}}
{{html-safe this.post.blurb}}
{{else}}
<HighlightSearch @highlight={{this.highlightQuery}}>
{{html-safe this.post.blurb}}
</HighlightSearch>
{{/if}}
{{/if}}
</div>
{{#if this.showLikeCount}}
{{#if this.post.like_count}}
<span class="like-count">
<span class="value">{{this.post.like_count}}</span>
{{d-icon "heart"}}
<PluginOutlet
@name="search-result-entry-blurb-wrapper"
@outletArgs={{hash post=this.post logClick=this.logClick}}
>
<div class="blurb container">
<span class="date">
{{format-date this.post.created_at format="tiny"}}
{{#if this.post.blurb}}
<span class="separator">-</span>
{{/if}}
</span>
{{#if this.post.blurb}}
{{#if this.siteSettings.use_pg_headlines_for_excerpt}}
{{html-safe this.post.blurb}}
{{else}}
<HighlightSearch @highlight={{this.highlightQuery}}>
{{html-safe this.post.blurb}}
</HighlightSearch>
{{/if}}
{{/if}}
</div>
</PluginOutlet>
<PluginOutlet
@name="search-result-entry-stats-wrapper"
@outletArgs={{hash post=this.post}}
>
{{#if this.showLikeCount}}
{{#if this.post.like_count}}
<span class="like-count">
<span class="value">{{this.post.like_count}}</span>
{{d-icon "heart"}}
</span>
{{/if}}
{{/if}}
{{/if}}
</PluginOutlet>
</div>
<PluginOutlet @name="after-search-result-entry" />

View File

@ -1,95 +1,95 @@
{{body-class "user-activity-page"}}
<div class="user-navigation user-navigation-secondary">
<HorizontalOverflowNav @ariaLabel="User secondary - activity">
<DNavigationItem
@route="userActivity.index"
@ariaCurrentContext="subNav"
class="user-nav__activity-all"
>
{{d-icon "bars-staggered"}}
<span>{{i18n "user.filters.all"}}</span>
</DNavigationItem>
<DNavigationItem
@route="userActivity.topics"
@ariaCurrentContext="subNav"
class="user-nav__activity-topics"
>
{{d-icon "list-ul"}}
<span>{{i18n "user_action_groups.4"}}</span>
</DNavigationItem>
<DNavigationItem
@route="userActivity.replies"
@ariaCurrentContext="subNav"
class="user-nav__activity-replies"
>
{{d-icon "reply"}}
<span>{{i18n "user_action_groups.5"}}</span>
</DNavigationItem>
{{#if this.user.showRead}}
<PluginOutlet @name="user-activity-navigation-wrapper">
<div class="user-navigation user-navigation-secondary">
<HorizontalOverflowNav @ariaLabel="User secondary - activity">
<DNavigationItem
@route="userActivity.read"
@route="userActivity.index"
@ariaCurrentContext="subNav"
class="user-nav__activity-read"
title={{i18n "user.read_help"}}
class="user-nav__activity-all"
>
{{d-icon "clock-rotate-left"}}
<span>{{i18n "user.read"}}</span>
{{d-icon "bars-staggered"}}
<span>{{i18n "user.filters.all"}}</span>
</DNavigationItem>
{{/if}}
{{#if this.user.showDrafts}}
<DNavigationItem
@route="userActivity.drafts"
@route="userActivity.topics"
@ariaCurrentContext="subNav"
class="user-nav__activity-drafts"
class="user-nav__activity-topics"
>
{{d-icon "pencil"}}
<span>{{this.draftLabel}}</span>
{{d-icon "list-ul"}}
<span>{{i18n "user_action_groups.4"}}</span>
</DNavigationItem>
{{/if}}
{{#if (gt this.model.pending_posts_count 0)}}
<DNavigationItem
@route="userActivity.pending"
@route="userActivity.replies"
@ariaCurrentContext="subNav"
class="user-nav__activity-pending"
class="user-nav__activity-replies"
>
{{d-icon "clock"}}
<span>{{this.pendingLabel}}</span>
{{d-icon "reply"}}
<span>{{i18n "user_action_groups.5"}}</span>
</DNavigationItem>
{{/if}}
<DNavigationItem
@route="userActivity.likesGiven"
@ariaCurrentContext="subNav"
class="user-nav__activity-likes"
>
{{d-icon "heart"}}
<span>{{i18n "user_action_groups.1"}}</span>
</DNavigationItem>
{{#if this.user.showRead}}
<DNavigationItem
@route="userActivity.read"
@ariaCurrentContext="subNav"
class="user-nav__activity-read"
title={{i18n "user.read_help"}}
>
{{d-icon "clock-rotate-left"}}
<span>{{i18n "user.read"}}</span>
</DNavigationItem>
{{/if}}
{{#if this.user.showDrafts}}
<DNavigationItem
@route="userActivity.drafts"
@ariaCurrentContext="subNav"
class="user-nav__activity-drafts"
>
{{d-icon "pencil"}}
<span>{{this.draftLabel}}</span>
</DNavigationItem>
{{/if}}
{{#if (gt this.model.pending_posts_count 0)}}
<DNavigationItem
@route="userActivity.pending"
@ariaCurrentContext="subNav"
class="user-nav__activity-pending"
>
{{d-icon "clock"}}
<span>{{this.pendingLabel}}</span>
</DNavigationItem>
{{/if}}
{{#if this.user.showBookmarks}}
<DNavigationItem
@route="userActivity.bookmarks"
@route="userActivity.likesGiven"
@ariaCurrentContext="subNav"
class="user-nav__activity-bookmarks"
class="user-nav__activity-likes"
>
{{d-icon "bookmark"}}
<span>{{i18n "user_action_groups.3"}}</span>
{{d-icon "heart"}}
<span>{{i18n "user_action_groups.1"}}</span>
</DNavigationItem>
{{/if}}
<PluginOutlet
@name="user-activity-bottom"
@connectorTagName="li"
@outletArgs={{hash model=this.model}}
/>
</HorizontalOverflowNav>
</div>
{{#if this.user.showBookmarks}}
<DNavigationItem
@route="userActivity.bookmarks"
@ariaCurrentContext="subNav"
class="user-nav__activity-bookmarks"
>
{{d-icon "bookmark"}}
<span>{{i18n "user_action_groups.3"}}</span>
</DNavigationItem>
{{/if}}
<PluginOutlet
@name="user-activity-bottom"
@connectorTagName="li"
@outletArgs={{hash model=this.model}}
/>
</HorizontalOverflowNav>
</div>
</PluginOutlet>
<section class="user-content" id="user-content">
{{outlet}}
</section>