{# Copyright (C) 2014 Matthieu Caneill License: GNU Affero General Public License, version 3 or above. #} {% 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['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 %}