0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36: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> </section>
</div> </div>
{{#if (feature 'makingItRain')}} <div class="gh-main-section">
<div class="gh-main-section"> <h4 class="gh-main-section-header small bn">Posts</h4>
<h4 class="gh-main-section-header small bn">Posts</h4> <section class="gh-expandable">
<section class="gh-expandable"> <div class="gh-expandable-block">
<div class="gh-expandable-block"> <div class="gh-expandable-header">
<div class="gh-expandable-header"> <div>
<div> <h4 class="gh-expandable-title">Export post analytics</h4>
<h4 class="gh-expandable-title">Export post analytics</h4> <p class="gh-expandable-description">
<p class="gh-expandable-description"> Download a single, glorious CSV file with all your post analytics
Download a single, glorious CSV file with all your post analytics </p>
</p>
</div>
<button type="button" class="gh-btn" {{on "click" this.exportData}}>
<span>Export</span>
</button>
</div> </div>
<button type="button" class="gh-btn" {{on "click" this.exportData}}>
<span>Export</span>
</button>
</div> </div>
</section> </div>
</div> </section>
{{/if}} </div>

View file

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