Added logic to display target post titles

refs https://github.com/TryGhost/Team/issues/2481
This commit is contained in:
Djordje Vlaisavljevic 2023-02-03 11:17:56 +00:00
parent 5f1bdd6d87
commit 3f7b717c0f
2 changed files with 6 additions and 3 deletions

View File

@ -157,7 +157,11 @@
</div>
<div class="gh-dashboard-list-item-sub">
<span class="gh-dashboard-list-subtext gh-dashboard-recent-mentioned">
{{mention.target}}
{{#if mention.resource}}
{{mention.resource.name}}
{{else}}
{{mention.target}}
{{/if}}
</span>
</div>
<div class="gh-dashboard-list-item-sub gh-dashboard-list gh-dashboard-list-item-date">

View File

@ -9,9 +9,8 @@
{{#if this.mentionsList}}
{{#each this.mentionsList as |mention|}}
<div class="gh-mention-card">
{{!-- TODO: show the title of your post instead of a link --}}
{{!-- TODO: link to the post analytics page of your post --}}
<p class="gh-mention-your-post">Your post <a href={{mention.target}} class="gh-mention-your-post-link">{{mention.target}}</a> was mentioned in:</p>
<p class="gh-mention-your-post">Your {{if (eq mention.resource.type "post") "post" "page"}} <a href={{mention.target}} class="gh-mention-your-post-link">{{if mention.resource mention.resource.name mention.target}}</a> was mentioned in:</p>
<a href="{{mention.source}}" class="gh-mention-container" rel="noreferrer noopener" target="_blank">
<div class="gh-mention-content">
<h3 class="gh-mention-title">{{if mention.sourceTitle mention.sourceTitle mention.target}}</h3>