0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Added subscription count to member's product list

no refs.

- added subscription count to the product list in member details screen if there are multiple subscriptions for the given product. This is to make it clear and avoid confusion around the edge case when members have multiple subscriptions for the same product.
This commit is contained in:
Peter Zimon 2021-05-05 15:39:42 +02:00
parent 7aebb410bc
commit 18696a6ee4
2 changed files with 15 additions and 2 deletions

View file

@ -122,6 +122,9 @@
<div class="gh-cp-memberproduct"> <div class="gh-cp-memberproduct">
<h3 class="gh-memberproduct-name"> <h3 class="gh-memberproduct-name">
{{product.name}} {{product.name}}
{{#unless (eq product.subscriptions.length 1 )}}
<span class="gh-memberproduct-subcount">({{product.subscriptions.length}} subscriptions)</span>
{{/unless}}
</h3> </h3>
{{#each product.subscriptions as |sub|}} {{#each product.subscriptions as |sub|}}
<div class="gh-memberproduct-subscription"> <div class="gh-memberproduct-subscription">
@ -138,7 +141,7 @@
<span class="gh-badge active">Active</span> <span class="gh-badge active">Active</span>
{{/if}} {{/if}}
</div> </div>
<div>Created on {{sub.startDate}}</div> <div class="gh-memberproduct-created">Created on {{sub.startDate}}</div>
<span class="action-menu"> <span class="action-menu">
<GhDropdownButton @dropdownName="subscription-menu-{{sub.id}}" @classNames="gh-btn gh-btn-outline gh-btn-icon only-has-icon" @title="User Actions"> <GhDropdownButton @dropdownName="subscription-menu-{{sub.id}}" @classNames="gh-btn gh-btn-outline gh-btn-icon only-has-icon" @title="User Actions">

View file

@ -1616,6 +1616,10 @@ p.gh-members-import-errordetail:first-of-type {
border-top: 1px solid var(--whitegrey); border-top: 1px solid var(--whitegrey);
} }
.gh-memberproduct-created {
margin-top: 1px;
}
.gh-memberproduct-archived .gh-memberproduct-name { .gh-memberproduct-archived .gh-memberproduct-name {
opacity: 0.5; opacity: 0.5;
} }
@ -1688,3 +1692,9 @@ p.gh-members-import-errordetail:first-of-type {
.gh-memberproduct-subscription .action-menu > .gh-btn svg { .gh-memberproduct-subscription .action-menu > .gh-btn svg {
margin: 0; margin: 0;
} }
.gh-memberproduct-subcount {
font-size: 1.4rem;
font-weight: 400;
color: var(--midgrey);
}