summaryrefslogtreecommitdiffstats
path: root/templates/packages/details.html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-10-01 01:18:19 +0200
committerDan McGee <dan@archlinux.org>2012-10-01 01:18:19 +0200
commitfebf5e92233738198107a69f66c9f3443b4306c7 (patch)
tree0c8e069360e26314d498251e15cf672743f8a03b /templates/packages/details.html
parent58ecb90c3f0254cdfab290234d309cad14a17723 (diff)
downloadarchweb-febf5e92233738198107a69f66c9f3443b4306c7.tar.gz
archweb-febf5e92233738198107a69f66c9f3443b4306c7.tar.xz
Collapse long lists of related packages
Just like we did with the rows of depends and required by, collapse down conflicts, provides, etc. comma-separated lists if they grow too large. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages/details.html')
-rw-r--r--templates/packages/details.html13
1 files changed, 7 insertions, 6 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 5a93ce2..aa07355 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -97,7 +97,7 @@
{% with pkg.split_packages as splits %}{% if splits %}
<tr>
<th>Split Packages:</th>
- <td class="wrap">{% for s in splits %}{% pkg_details_link s %}{% if not forloop.last %}, {% endif %}{% endfor %}</td>
+ <td class="wrap relatedto">{% for s in splits %}<span class="related">{% pkg_details_link s %}{% if not forloop.last %}, {% endif %}</span>{% endfor %}</td>
</tr>
{% endif %}{% endwith %}
{% else %}
@@ -134,26 +134,26 @@
{% with pkg.provides.all as all_related %}{% if all_related %}
<tr>
<th>Provides:</th>
- <td class="wrap">{% include "packages/details_relatedto.html" %}</td>
+ <td class="wrap relatedto">{% include "packages/details_relatedto.html" %}</td>
</tr>
{% endif %}{% endwith %}
{% with pkg.replaces.all as all_related %}{% if all_related %}
<tr>
<th>Replaces:</th>
- <td class="wrap">{% include "packages/details_relatedto.html" %}</td>
+ <td class="wrap relatedto">{% include "packages/details_relatedto.html" %}</td>
</tr>
{% endif %}{% endwith %}
{% with pkg.conflicts.all as all_related %}{% if all_related %}
<tr>
<th>Conflicts:</th>
- <td class="wrap">{% include "packages/details_relatedto.html" %}</td>
+ <td class="wrap relatedto">{% include "packages/details_relatedto.html" %}</td>
</tr>
{% endif %}{% endwith %}
{% with pkg.reverse_conflicts as rev_conflicts %}{% if rev_conflicts %}
<tr>
<th>Reverse Conflicts:</th>
- <td class="wrap">{% for conflict in rev_conflicts %}
- {% pkg_details_link conflict %}{% if not forloop.last %}, {% endif %}{% endfor %}</td>
+ <td class="wrap relatedto">{% for conflict in rev_conflicts %}
+ <span class="related">{% pkg_details_link conflict %}{% if not forloop.last %}, {% endif %}</span>{% endfor %}</td>
</tr>
{% endif %}{% endwith %}
<tr>
@@ -237,6 +237,7 @@ $(document).ready(function() {
ajaxifyFiles();
collapseDependsList("#pkgdepslist");
collapseDependsList("#pkgreqslist");
+ collapseRelatedTo(".relatedto");
});
</script>
{% endblock %}