From ca86b8d339ff3b8e74ac6d2ccf8a14458a690cf5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 5 Jul 2012 17:36:22 -0500 Subject: Collapse the dependencies and required by lists when they are long For now, this happens when the lists are over 20 items. Using JS, hide the 21st and following packages listed in the list and replace them with a 'Show More...' link that users can click to get the full list. For a package such as glibc with 444 'Required By' entries, this can make quite a visual difference. Signed-off-by: Dan McGee --- templates/packages/details.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index 358ab52..201e307 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -186,7 +186,7 @@

Dependencies ({{deps|length}})

- {% if deps %}
    + {% if deps %}
      {% for depend in deps %}{% include "packages/details_depend.html" %}{% endfor %}
    {% endif %}
@@ -196,7 +196,7 @@

Required By ({{rqdby|length}})

- {% if rqdby %}
    + {% if rqdby %}
      {% for req in rqdby %}{% include "packages/details_requiredby.html" %}{% endfor %}
    {% endif %}
@@ -219,6 +219,10 @@ {% load cdn %}{% jquery %} {% endblock %} -- cgit v1.2.3-24-g4f1b