mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Updated attribution counts linking to editor if zero
refs https://github.com/TryGhost/Team/issues/1843 - Also fixes that attribution counts are hidden for contributors
This commit is contained in:
parent
913ea4e54f
commit
2bc79cd94f
@ -101,18 +101,32 @@
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{#if this.feature.memberAttribution}}
|
||||
<LinkTo @route="members" @query={{hash filterParam=(concat "signup:[" @post.id "]") }} class="permalink gh-list-data gh-post-list-signups">
|
||||
<span class="midlightgrey {{if (not (eq @post.count.signups 0)) 'darkgrey'}} fw5 gh-content-attribution-stats">{{@post.count.signups}}</span>
|
||||
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile">{{gh-pluralize @post.count.signups "signup"}}</span>
|
||||
</LinkTo>
|
||||
{{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }}
|
||||
{{#if @post.count.signups}}
|
||||
<LinkTo @route="members" @query={{hash filterParam=(concat "signup:[" @post.id "]") }} class="permalink gh-list-data gh-post-list-signups active">
|
||||
<span class="midlightgrey {{if (not (eq @post.count.signups 0)) 'darkgrey'}} fw5 gh-content-attribution-stats">{{@post.count.signups}}</span>
|
||||
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile">{{gh-pluralize @post.count.signups "signup"}}</span>
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-signups">
|
||||
<span class="midlightgrey {{if (not (eq @post.count.signups 0)) 'darkgrey'}} fw5 gh-content-attribution-stats">{{@post.count.signups}}</span>
|
||||
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile">{{gh-pluralize @post.count.signups "signup"}}</span>
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if this.feature.memberAttribution}}
|
||||
<LinkTo @route="members" @query={{hash filterParam=(concat "conversion:[" @post.id "]") }} class="permalink gh-list-data gh-post-list-conversions">
|
||||
<span class="midlightgrey {{if (not (eq @post.count.conversions 0)) 'darkgrey'}} fw5 gh-content-attribution-stats">{{@post.count.conversions}}</span>
|
||||
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile">{{gh-pluralize @post.count.conversions "conversion"}}</span>
|
||||
</LinkTo>
|
||||
{{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }}
|
||||
{{#if @post.count.conversions}}
|
||||
<LinkTo @route="members" @query={{hash filterParam=(concat "conversion:[" @post.id "]") }} class="permalink gh-list-data gh-post-list-conversions active">
|
||||
<span class="midlightgrey {{if (not (eq @post.count.conversions 0)) 'darkgrey'}} fw5 gh-content-attribution-stats">{{@post.count.conversions}}</span>
|
||||
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile">{{gh-pluralize @post.count.conversions "conversion"}}</span>
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-conversions">
|
||||
<span class="midlightgrey {{if (not (eq @post.count.conversions 0)) 'darkgrey'}} fw5 gh-content-attribution-stats">{{@post.count.conversions}}</span>
|
||||
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile">{{gh-pluralize @post.count.conversions "conversion"}}</span>
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (and (not-eq this.settings.membersSignupAccess "none") (not-eq this.settings.editorDefaultEmailRecipients "disabled") (not this.session.user.isContributor))}}
|
||||
|
@ -239,7 +239,7 @@
|
||||
}
|
||||
|
||||
/** TODO: improve this hover style */
|
||||
a.gh-post-list-signups:hover > span, a.gh-post-list-conversions:hover > span {
|
||||
a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:hover > span {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
|
@ -32,8 +32,9 @@
|
||||
{{#if this.postsInfinityModel}}
|
||||
<li class="gh-list-row header">
|
||||
<div class="gh-list-header gh-posts-title-header">Title</div>
|
||||
{{#if this.feature.memberAttribution}}
|
||||
<div class="gh-list-header gh-posts-status-header"></div>
|
||||
|
||||
{{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }}
|
||||
<div class="gh-list-header gh-posts-status-header"></div>
|
||||
<div class="gh-list-header gh-posts-signups-header">Signups</div>
|
||||
<div class="gh-list-header gh-posts-conversions-header">Paid</div>
|
||||
{{/if}}
|
||||
@ -41,9 +42,9 @@
|
||||
<div class="gh-list-header gh-posts-sends-header">Sends</div>
|
||||
<div class="gh-list-header gh-posts-opens-header">Opens</div>
|
||||
{{/if}}
|
||||
{{#unless this.feature.memberAttribution}}
|
||||
{{#if (or (not this.feature.memberAttribution) this.session.user.isContributor) }}
|
||||
<div class="gh-list-header gh-posts-status-header">Status</div>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user