summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
diff options
context:
space:
mode:
Diffstat (limited to 'lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html')
-rw-r--r--lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html b/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
new file mode 100644
index 000000000..453a9d013
--- /dev/null
+++ b/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
@@ -0,0 +1,14 @@
+{# Popover that displays the reverse dependencies and sizes of a package 'data' used in the Packages table #}
+{% with data.package_dependencies_target.all_depends.count as dep_count %}
+{% load projecttags %}
+{% if dep_count %}
+ <a data-content="<ul class='unstyled'>
+ {% for dep in data.package_dependencies_target.all_depends|dictsort:'package.name' %}
+ <li>{{dep.package.name}} {% if dep.package.size > 0 %}({{dep.package.size|filtered_filesizeformat}}){% endif %}</li>
+ {% endfor %}
+ </ul>" title="" class="btn" data-original-title="
+ <strong>{{data.name}}</strong> reverse dependencies - <strong>{{data.package_dependencies_target.get_total_revdeps_size.package_id__size__sum|filtered_filesizeformat}}</strong>">
+ {{dep_count}}
+</a>
+{% endif %}
+{% endwith %}