mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
190031f38c
refs https://github.com/TryGhost/Team/issues/1941 - limits the source attribution list to top 5 on dashboard, and shows all sources on clicking on `Other` link Fixed lint
74 lines
3.5 KiB
Handlebars
74 lines
3.5 KiB
Handlebars
<div ...attributes>
|
|
<div class="gh-dashboard-list-header">
|
|
<div class="gh-dashboard-list-title">Sources</div>
|
|
<div class="gh-dashboard-list-title">Signups</div>
|
|
{{#if this.membersUtils.paidMembersEnabled}}
|
|
<div class="gh-dashboard-list-title"><span class="hide-when-small">Paid </span>Conversions</div>
|
|
{{/if}}
|
|
</div>
|
|
<div class="gh-dashboard-list-body" style="max-height: 230px; overflow-y: clip; justify-content: flex-start;">
|
|
<div class="gh-dashboard-attribution-list-scrollable">
|
|
{{#each this.sources as |sourceData|}}
|
|
<div class="gh-dashboard-list-item">
|
|
<div class="gh-dashboard-list-item-sub gh-dashboard-list-item-sub-source">
|
|
<span class="gh-dashboard-list-text">{{sourceData.source}}</span>
|
|
</div>
|
|
<div class="gh-dashboard-list-item-sub">
|
|
<span class="gh-dashboard-metric-minivalue">
|
|
{{#if sourceData.signups}}
|
|
{{format-number sourceData.signups}}
|
|
{{else}}
|
|
—
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
{{#if this.membersUtils.paidMembersEnabled}}
|
|
<div class="gh-dashboard-list-item-sub">
|
|
<span class="gh-dashboard-metric-minivalue">
|
|
{{#if sourceData.paidConversions}}
|
|
{{format-number sourceData.paidConversions}}
|
|
{{else}}
|
|
—
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{else}}
|
|
<div class="gh-dashboard-list-empty">
|
|
<p>No sources.</p>
|
|
</div>
|
|
{{/each}}
|
|
{{#if this.others}}
|
|
<div class="gh-dashboard-list-item" role="button" aria-label="Show sources"
|
|
{{on "click" this.openAllSources}}
|
|
>
|
|
<div class="gh-dashboard-list-item-sub gh-dashboard-list-item-sub-source gh-dsahboard-list-item-other-source">
|
|
<span class="gh-dashboard-list-text">Other</span>
|
|
</div>
|
|
<div class="gh-dashboard-list-item-sub">
|
|
<span class="gh-dashboard-metric-minivalue">
|
|
{{#if this.others.signups}}
|
|
{{format-number this.others.signups}}
|
|
{{else}}
|
|
—
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
{{#if this.membersUtils.paidMembersEnabled}}
|
|
<div class="gh-dashboard-list-item-sub">
|
|
<span class="gh-dashboard-metric-minivalue">
|
|
{{#if this.others.paidConversions}}
|
|
{{format-number this.others.paidConversions}}
|
|
{{else}}
|
|
—
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|