1{# Popover that displays the reverse dependences and sizes of a package 'data' used in the Packages table #}
2{% load projecttags %}
3
4{% with package_deps=data.package_dependencies_target|for_target:extra.target_name %}
5{% with count_package=package_deps.packages|length %}
6
7{% if count_package > 0 %}
8  <a data-content='<ul class="list-unstyled">
9  {% for dep in package_deps.packages|dictsort:"package.name" %}
10     <li>
11      {% if extra.add_links %}
12      <a href="{% url 'package_included_detail' extra.build.pk extra.target_id dep.package.pk %}">
13      {{dep.package.name}}</a>
14      {% else %}
15      {{dep.package.name}}
16      {% endif %}
17      {% if dep.package.size > 0 %}
18        ({{dep.package.size|filtered_filesizeformat}})
19      {% endif %}
20     </li>
21   {% endfor %}
22   </ul>' class="btn btn-default" title='
23   <strong>
24     {% if extra.add_links %}
25      <a href="{% url 'package_included_reverse_dependencies' extra.build.pk extra.target_id data.pk %}">
26      {{data.name}}</a>
27      {% else %}
28      {{data.name}}
29      {% endif %}
30      </strong>
31      dependencies -
32      <strong>{{package_deps.size|filtered_filesizeformat}}</strong>'>
33      {{count_package}}
34  </a>
35{% endif %}
36
37{% endwith %}
38{% endwith %}
39