{# Copyright (C) 2020 CERN. Invenio RDM Records is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {% from "invenio_app_rdm/records/macros/stats_popup.html" import stats_popup %}
{% set all_versions = record.stats.all_versions %} {% set this_version = record.stats.this_version %}
{{ all_versions.unique_views|compact_number(max_value=1_000_000) }}
{{ _("Views") }}
{{ all_versions.unique_downloads|compact_number(max_value=1_000_000) }}
{{ _("Downloads") }}
{{ _('Show more details') }}
{%- set binary_sizes = not config.APP_RDM_DISPLAY_DECIMAL_FILE_SIZES %}
{{ _("All versions") }} {{ _("This version") }}
{{ _("Views") }} {{ stats_popup(all_versions.unique_views) }} {{ stats_popup(this_version.unique_views) }}
{{ _("Downloads") }} {{ stats_popup(all_versions.unique_downloads) }} {{ stats_popup(this_version.unique_downloads) }}
{{ _("Data volume") }} {{ all_versions.data_volume|filesizeformat(binary=binary_sizes) }} {{ this_version.data_volume|filesizeformat(binary=binary_sizes) }}

{{ _("More info on how stats are collected.") }}...