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

Added post analytics export

fixes https://github.com/TryGhost/Team/issues/2678

- Includes a new filename for the export (post-analytics instead of posts)

Co-authored-by: Fabien 'egg' O'Carroll <fabien@allou.is>
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
This commit is contained in:
Simon Backx 2023-04-03 14:39:11 +02:00
parent aee909b054
commit 136bf80168
2 changed files with 17 additions and 19 deletions

View file

@ -99,23 +99,21 @@
</section>
</div>
{{#if (feature 'makingItRain')}}
<div class="gh-main-section">
<h4 class="gh-main-section-header small bn">Posts</h4>
<section class="gh-expandable">
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Export post analytics</h4>
<p class="gh-expandable-description">
Download a single, glorious CSV file with all your post analytics
</p>
</div>
<button type="button" class="gh-btn" {{on "click" this.exportData}}>
<span>Export</span>
</button>
<div class="gh-main-section">
<h4 class="gh-main-section-header small bn">Posts</h4>
<section class="gh-expandable">
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Export post analytics</h4>
<p class="gh-expandable-description">
Download a single, glorious CSV file with all your post analytics
</p>
</div>
<button type="button" class="gh-btn" {{on "click" this.exportData}}>
<span>Export</span>
</button>
</div>
</section>
</div>
{{/if}}
</div>
</section>
</div>

View file

@ -68,7 +68,7 @@ module.exports = {
type: 'csv',
value() {
const datetime = (new Date()).toJSON().substring(0, 10);
return `posts.${datetime}.csv`;
return `post-analytics.${datetime}.csv`;
}
}
},