add a page updates this week tracker

This commit is contained in:
Andrew Brown 2020-03-13 15:41:01 -05:00
parent 1592e6ec4e
commit b748e61656

View File

@ -16,6 +16,18 @@
Your Notebook.ai usage
</h4>
<div class="row">
<div class="col s12">
<div class="hoverable card-panel">
<h5 class="grey-text">Page updates this week</h5>
<%= area_chart current_user.content_change_events.where('updated_at > ?', DateTime.now - 7.days).group_by_day(:created_at).map { |date, count| [date.split(' ').first, count] }, download: true %>
<span class="grey-text">
Every field you edit on a page counts as one update. For example, editing a character's age and birthday counts as two updates, even if done at the same time.
</span>
</div>
</div>
</div>
<div class="row">
<div class="col s12">
<div class="hoverable card-panel">