{% extends 'silent_mammoth_whistle/base.html' %} {% load static whistle_helpers %} {% block extra_styles %} {% endblock %} {% block title %}Activity overview{% endblock %} {% block content %}
{% comment %} Next and previous buttons for changing daily sessions uses hx-boost. We use hx-preserve here to stop the monthly data (mostly the chart) being recreated. {% endcomment %}
{% comment %} This if statement hides daily stats as well as they're not relevant if the month doesn't even show {% endcomment %} {% if not month_has_whistles %}
No whistles for this month
{% else %}
Sessions per day
{% include "silent_mammoth_whistle/_chart_javascript.html" %}
Users (logged in)
{% if not users %}
No new users this month
{% else %} {% for user in users %} {% endfor %}
User Sessions
{{ user.user_id }} {% if user.is_new %} New {% endif %} {{ user.sessions }}
{% endif %}
{% if top_useragents or top_viewport_dimensions %}
{% if top_useragents %}
Top platforms
{% for item in top_useragents %} {% endfor %}
Platform % of sessions
{{ item.useragent|ua_parse }} {% percentage item.sessions total_useragents %}  {{ item.sessions }}
{% endif %} {% if top_viewport_dimensions %}
Top screen sizes
{% for item in top_viewport_dimensions %} {% endfor %}
Dimensions % of sessions
{{ item.viewport_dimensions }} {% percentage item.sessions total_viewport_dimensions %}  {{ item.sessions }}
{% endif %}
{% endif %}
{% endif %}
{% comment %} Many projects won't have django-invitations installed so this html is only used when they do {% endcomment %} {% if invitations %}
Active invitations
{% if invitations|length == 0 %}
No active invitations
{% else %} {% for invitation in invitations %} {% endfor %}
Recipient Datetime sent
{{ invitation.email }} {{ invitation.sent|date:"j M h:i" }}
{% endif %}
{% endif %}
{% comment %} Start of the selected day's sessions (RHS column) {% endcomment %} {% block daily_stats %}
{% if month_has_whistles %}

{{ day_str }}

Sessions
{% if authed_whistles_per_user|length == 0 and unauthed_whistles_per_user|length == 0 %}
No whistles
{% else %}
{% if authed_whistles_per_user|length > 0 %} {% include "silent_mammoth_whistle/_whistles_per_user_table.html" with is_authenticated=True whistles_per_user=authed_whistles_per_user %} {% endif %} {% if unauthed_whistles_per_user|length > 0 %} {% include "silent_mammoth_whistle/_whistles_per_user_table.html" with is_authenticated=False whistles_per_user=unauthed_whistles_per_user %} {% endif %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}