mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:32:45 +08:00
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:
parent
cf2b4d9934
commit
31dadc8373
|
@ -1,11 +1,18 @@
|
||||||
<div class="author">
|
<PluginOutlet
|
||||||
<a href={{this.post.userPath}} data-user-card={{this.post.username}}>
|
@name="search-results-topic-avatar-wrapper"
|
||||||
{{avatar this.post imageSize="large"}}
|
@outletArgs={{hash post=this.post}}
|
||||||
</a>
|
>
|
||||||
</div>
|
<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="fps-topic" data-topic-id={{this.post.topic.id}}>
|
||||||
<div class="topic">
|
<div class="topic">
|
||||||
|
|
||||||
{{#if this.bulkSelectEnabled}}
|
{{#if this.bulkSelectEnabled}}
|
||||||
<TrackSelected
|
<TrackSelected
|
||||||
@selectedList={{this.selected}}
|
@selectedList={{this.selected}}
|
||||||
|
@ -55,33 +62,43 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="blurb container">
|
<PluginOutlet
|
||||||
<span class="date">
|
@name="search-result-entry-blurb-wrapper"
|
||||||
{{format-date this.post.created_at format="tiny"}}
|
@outletArgs={{hash post=this.post logClick=this.logClick}}
|
||||||
{{#if this.post.blurb}}
|
>
|
||||||
<span class="separator">-</span>
|
<div class="blurb container">
|
||||||
{{/if}}
|
<span class="date">
|
||||||
</span>
|
{{format-date this.post.created_at format="tiny"}}
|
||||||
|
{{#if this.post.blurb}}
|
||||||
{{#if this.post.blurb}}
|
<span class="separator">-</span>
|
||||||
{{#if this.siteSettings.use_pg_headlines_for_excerpt}}
|
{{/if}}
|
||||||
{{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"}}
|
|
||||||
</span>
|
</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}}
|
||||||
{{/if}}
|
</PluginOutlet>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<PluginOutlet @name="after-search-result-entry" />
|
<PluginOutlet @name="after-search-result-entry" />
|
|
@ -1,95 +1,95 @@
|
||||||
{{body-class "user-activity-page"}}
|
{{body-class "user-activity-page"}}
|
||||||
|
<PluginOutlet @name="user-activity-navigation-wrapper">
|
||||||
<div class="user-navigation user-navigation-secondary">
|
<div class="user-navigation user-navigation-secondary">
|
||||||
<HorizontalOverflowNav @ariaLabel="User secondary - activity">
|
<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}}
|
|
||||||
<DNavigationItem
|
<DNavigationItem
|
||||||
@route="userActivity.read"
|
@route="userActivity.index"
|
||||||
@ariaCurrentContext="subNav"
|
@ariaCurrentContext="subNav"
|
||||||
class="user-nav__activity-read"
|
class="user-nav__activity-all"
|
||||||
title={{i18n "user.read_help"}}
|
|
||||||
>
|
>
|
||||||
{{d-icon "clock-rotate-left"}}
|
{{d-icon "bars-staggered"}}
|
||||||
<span>{{i18n "user.read"}}</span>
|
<span>{{i18n "user.filters.all"}}</span>
|
||||||
</DNavigationItem>
|
</DNavigationItem>
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if this.user.showDrafts}}
|
|
||||||
<DNavigationItem
|
<DNavigationItem
|
||||||
@route="userActivity.drafts"
|
@route="userActivity.topics"
|
||||||
@ariaCurrentContext="subNav"
|
@ariaCurrentContext="subNav"
|
||||||
class="user-nav__activity-drafts"
|
class="user-nav__activity-topics"
|
||||||
>
|
>
|
||||||
{{d-icon "pencil"}}
|
{{d-icon "list-ul"}}
|
||||||
<span>{{this.draftLabel}}</span>
|
<span>{{i18n "user_action_groups.4"}}</span>
|
||||||
</DNavigationItem>
|
</DNavigationItem>
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if (gt this.model.pending_posts_count 0)}}
|
|
||||||
<DNavigationItem
|
<DNavigationItem
|
||||||
@route="userActivity.pending"
|
@route="userActivity.replies"
|
||||||
@ariaCurrentContext="subNav"
|
@ariaCurrentContext="subNav"
|
||||||
class="user-nav__activity-pending"
|
class="user-nav__activity-replies"
|
||||||
>
|
>
|
||||||
{{d-icon "clock"}}
|
{{d-icon "reply"}}
|
||||||
<span>{{this.pendingLabel}}</span>
|
<span>{{i18n "user_action_groups.5"}}</span>
|
||||||
</DNavigationItem>
|
</DNavigationItem>
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<DNavigationItem
|
{{#if this.user.showRead}}
|
||||||
@route="userActivity.likesGiven"
|
<DNavigationItem
|
||||||
@ariaCurrentContext="subNav"
|
@route="userActivity.read"
|
||||||
class="user-nav__activity-likes"
|
@ariaCurrentContext="subNav"
|
||||||
>
|
class="user-nav__activity-read"
|
||||||
{{d-icon "heart"}}
|
title={{i18n "user.read_help"}}
|
||||||
<span>{{i18n "user_action_groups.1"}}</span>
|
>
|
||||||
</DNavigationItem>
|
{{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
|
<DNavigationItem
|
||||||
@route="userActivity.bookmarks"
|
@route="userActivity.likesGiven"
|
||||||
@ariaCurrentContext="subNav"
|
@ariaCurrentContext="subNav"
|
||||||
class="user-nav__activity-bookmarks"
|
class="user-nav__activity-likes"
|
||||||
>
|
>
|
||||||
{{d-icon "bookmark"}}
|
{{d-icon "heart"}}
|
||||||
<span>{{i18n "user_action_groups.3"}}</span>
|
<span>{{i18n "user_action_groups.1"}}</span>
|
||||||
</DNavigationItem>
|
</DNavigationItem>
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<PluginOutlet
|
{{#if this.user.showBookmarks}}
|
||||||
@name="user-activity-bottom"
|
<DNavigationItem
|
||||||
@connectorTagName="li"
|
@route="userActivity.bookmarks"
|
||||||
@outletArgs={{hash model=this.model}}
|
@ariaCurrentContext="subNav"
|
||||||
/>
|
class="user-nav__activity-bookmarks"
|
||||||
</HorizontalOverflowNav>
|
>
|
||||||
</div>
|
{{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">
|
<section class="user-content" id="user-content">
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
</section>
|
</section>
|
Loading…
Reference in New Issue
Block a user