0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Added in the attribution column for activity page

refs https://github.com/TryGhost/Team/issues/1816
This commit is contained in:
James Morris 2022-08-22 17:50:52 +01:00
parent 3b13c03af2
commit 18186f9ba6
6 changed files with 59 additions and 11 deletions
ghost/admin/app
components
dashboard/charts
members-activity
styles
templates

View file

@ -107,7 +107,7 @@
{{else}}
{{parsedEvent.object}}
{{/if}}
{{parsedEvent.info}}
<span class="highlight">{{parsedEvent.info}}</span>
</span>
</span>
</div>

View file

@ -21,19 +21,32 @@
<div class="gh-members-activity-event">
<span class="gh-members-activity-description">
{{capitalize-first-letter event.action}}
{{#if event.url}}
<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>
{{else}}
{{event.object}}
{{/if}}
{{#if event.email}}
<GhEmailPreviewLink @data={{event.email}} />
{{/if}}
<span class="highlight">{{event.info}}</span>
<span class="{{if (feature "memberAttribution") 'hidden'}}">
{{#if event.url}}
<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>
{{else}}
{{event.object}}
{{/if}}
{{#if event.email}}
<GhEmailPreviewLink @data={{event.email}} />
{{/if}}
<span class="highlight">{{event.info}}</span>
</span>
</span>
</div>
</div>
</div>
{{#if (feature "memberAttribution")}}
<div class="gh-list-data gh-list-data-attribution">
{{#if event.url}}
<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>
{{else if event.email}}
<GhEmailPreviewLink @data={{event.email}} />
{{else}}
<span class="gh-list-nodata">&mdash;</span>
{{/if}}
</div>
{{/if}}
<div class="gh-list-data gh-list-data-date">{{moment-format event.timestamp "DD MMM YYYY HH:mm"}}</div>
</tr>
{{/let}}

View file

@ -5,6 +5,9 @@
<th>Member</th>
{{/unless}}
<th>Event</th>
{{#if (feature "memberAttribution")}}
<th>Attribution</th>
{{/if}}
<th>Time</th>
</tr>
</thead>

View file

@ -112,6 +112,17 @@ ul.nostyle li {
background: var(--whitegrey-l2);
}
.gh-list-data-attribution {
font-weight: 500;
font-size: 1.4rem;
color: var(--midgrey);
}
.gh-list-data-attribution > a {
font-weight: 600;
color: var(--darkgrey);
}
.gh-list-data-date {
font-weight: 500;
font-size: 1.3rem;

View file

@ -31,6 +31,11 @@
margin: 0 -4px;
}
.gh-member-details-activity .gh-list-data {
font-weight: 600;
color: var(--darkgrey);
}
.no-posts .gh-members-placeholder {
fill: var(--lightgrey);
width: 60px;
@ -92,6 +97,22 @@
width: 18%;
}
.gh-members-activity.feature-memberAttribution .gh-list-scrolling thead th:nth-child(1) {
width: 25%;
}
.gh-members-activity.feature-memberAttribution .gh-list-scrolling thead th:nth-child(2) {
width: 25%;
}
.gh-members-activity.feature-memberAttribution .gh-list-scrolling thead th:nth-child(3) {
width: 35%;
}
.gh-members-activity.feature-memberAttribution .gh-list-scrolling thead th:last-child {
width: 15%;
}
.gh-members-activity .gh-list-scrolling tbody .gh-list-data:last-child {
white-space: nowrap;
}

View file

@ -1,4 +1,4 @@
<section class="gh-canvas gh-members-activity {{if this.memberRecord "gh-members-activity-single"}}">
<section class="gh-canvas gh-members-activity {{if this.memberRecord "gh-members-activity-single"}} {{if (feature "memberAttribution") "feature-memberAttribution"}}">
<GhCanvasHeader class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}} data-test-link="members-activity-back">Activity</LinkTo>