{# Copyright (C) 2014 The Debsources developers . See the AUTHORS file at the top-level directory of this distribution and at https://salsa.debian.org/qa/debsources/blob/master/AUTHORS License: GNU Affero General Public License, version 3 or above. #} {# copied from templates/infobox.inc.html #} {% macro render_infobox(package, version, pkg_infos, position="fixed") -%} {% if position == "fixed" %}
{% else %}
{% endif %} {% if position == "fixed" %} package info (click to toggle) {% endif %}
{% if position == "fixed" %} {{ package }} {{ version }} {% endif %}
  • links: PTS{% if pkg_infos['vcs_browser'] %}, VCS {% endif %}
  • area: {{ pkg_infos['area'] }}
  • in suites: {{ pkg_infos['suites']|join(', ') }}
  • {% if pkg_infos['metric']['size'] %}
  • size: {{ pkg_infos['metric']['size'] | format_big_num }} kB
  • {% endif %} {% if pkg_infos['ctags_count'] %}
  • ctags: {{ pkg_infos['ctags_count'] | format_big_num }}
  • {% endif %} {% if pkg_infos['sloc'] %}
  • sloc: {% if position == "fixed" %} {% for x in pkg_infos['sloc'] %} {{ x[0] + ": " + x[1] | format_big_num }}{% if not loop.last %}; {% endif %} {% endfor %} {% else %}
      {% for x in pkg_infos['sloc'] %}
    • {{ x[0] + ": " + x[1] | format_big_num }}
    • {% endfor %}
    {% endif %}
  • {% endif %}
{%- endmacro %}