mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 19:02:29 +03:00
b1b3c72642
refs https://github.com/TryGhost/Team/issues/1941 - sorts attribution table and chart on signups or paid conversions
83 lines
3.8 KiB
Handlebars
83 lines
3.8 KiB
Handlebars
<div ...attributes>
|
|
<div class="gh-dashboard-list-header">
|
|
<div class="gh-dashboard-list-title gh-dashboard-list-title-sources">Sources</div>
|
|
<div
|
|
class="gh-dashboard-list-title {{if (eq @sortColumn "signups") "sorted-by"}}"
|
|
role="button" aria-label="Sort by free signups"
|
|
{{on "click" (fn @setSortColumn "signups")}}
|
|
>
|
|
Signups {{svg-jar "arrow-down-small"}}
|
|
</div>
|
|
{{#if this.membersUtils.paidMembersEnabled}}
|
|
<div
|
|
role="button" aria-label="Sort by paid signups"
|
|
class="gh-dashboard-list-title {{if (eq @sortColumn "paid") "sorted-by"}}"
|
|
{{on "click" (fn @setSortColumn "paid")}}
|
|
>
|
|
<span class="hide-when-small">Paid </span>Conversions {{svg-jar "arrow-down-small"}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
<div class="gh-dashboard-list-body">
|
|
{{#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">
|
|
<div class="gh-dashboard-list-item-sub gh-dashboard-list-item-sub-source gh-dashboard-list-item-other-source">
|
|
<div class="gh-dashboard-list-text">Other <span role="button" aria-label="Show sources"
|
|
{{on "click" this.openAllSources}}>(<span>see all</span>)</span></div>
|
|
</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>
|