From 2bc79cd94f6898efd53a9c59b15f72f49e732ebb Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Thu, 25 Aug 2022 17:01:12 +0200 Subject: [PATCH] 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 --- .../app/components/gh-posts-list-item.hbs | 34 +++++++++++++------ ghost/admin/app/styles/layouts/content.css | 2 +- ghost/admin/app/templates/posts.hbs | 11 +++--- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/ghost/admin/app/components/gh-posts-list-item.hbs b/ghost/admin/app/components/gh-posts-list-item.hbs index 154cb96751..1cb82b1a66 100644 --- a/ghost/admin/app/components/gh-posts-list-item.hbs +++ b/ghost/admin/app/components/gh-posts-list-item.hbs @@ -101,18 +101,32 @@ {{/unless}} {{/if}} - {{#if this.feature.memberAttribution}} - - {{@post.count.signups}} - {{gh-pluralize @post.count.signups "signup"}} - + {{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }} + {{#if @post.count.signups}} + + {{@post.count.signups}} + {{gh-pluralize @post.count.signups "signup"}} + + {{else}} + + {{@post.count.signups}} + {{gh-pluralize @post.count.signups "signup"}} + + {{/if}} {{/if}} - {{#if this.feature.memberAttribution}} - - {{@post.count.conversions}} - {{gh-pluralize @post.count.conversions "conversion"}} - + {{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }} + {{#if @post.count.conversions}} + + {{@post.count.conversions}} + {{gh-pluralize @post.count.conversions "conversion"}} + + {{else}} + + {{@post.count.conversions}} + {{gh-pluralize @post.count.conversions "conversion"}} + + {{/if}} {{/if}} {{#if (and (not-eq this.settings.membersSignupAccess "none") (not-eq this.settings.editorDefaultEmailRecipients "disabled") (not this.session.user.isContributor))}} diff --git a/ghost/admin/app/styles/layouts/content.css b/ghost/admin/app/styles/layouts/content.css index cddb6a6760..39d182c96d 100644 --- a/ghost/admin/app/styles/layouts/content.css +++ b/ghost/admin/app/styles/layouts/content.css @@ -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; } diff --git a/ghost/admin/app/templates/posts.hbs b/ghost/admin/app/templates/posts.hbs index 25a21390c9..68d8412b8e 100644 --- a/ghost/admin/app/templates/posts.hbs +++ b/ghost/admin/app/templates/posts.hbs @@ -32,8 +32,9 @@ {{#if this.postsInfinityModel}}
  • Title
    - {{#if this.feature.memberAttribution}} -
    + + {{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }} +
    Signups
    Paid
    {{/if}} @@ -41,9 +42,9 @@
    Sends
    Opens
    {{/if}} - {{#unless this.feature.memberAttribution}} + {{#if (or (not this.feature.memberAttribution) this.session.user.isContributor) }}
    Status
    - {{/unless}} + {{/if}}
  • {{/if}} @@ -79,4 +80,4 @@ {{outlet}} - \ No newline at end of file +