{# Copyright (C) 2026 Front Matter. invenio-pidbox is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. Metrics for a set of records, the same cards invenio-pidbox shows for one person or organization: absolute counts in the first row, shares of all works in the second, and a column beside them that the instance chooses: the share with an open license in a ring (license_donut.html), or cards of its own, one per row (see invenio_pidbox.ext.metrics_column). Each card links to the search it counts. The numbers come from a records API in the browser, so the page renders without waiting for them, and the cards stay hidden while there are no records. Included with four variables: metrics_id the id of the container, unique on the page metrics_api the records API to count with, e.g. /api/records metrics_search the search page the cards link to, e.g. /search metrics_column the first column, as pidbox_metrics_column returns it #} {%- set pidbox_labels = pidbox_metrics_labels() %} {%- macro metrics_card(id, label, icon_label, style="") %}
{{ label }}
{%- endmacro %} {#- As on the person and organization pages: the first column four wide, and the cards, two rows of three, in a twelve wide one beside it, in line with the results of a search. A card of the first column has a row of its own, so that it lines up with the cards beside it. #} {%- set column = metrics_column if metrics_column is defined else pidbox_metrics_column(["license"]) %}