summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-31 01:48:19 -0500
committerDan McGee <dan@archlinux.org>2011-04-05 01:12:23 -0500
commit0504fbeb92e83e92e1f1bc6e003bdb3f93c4318f (patch)
tree0d4adc5f48adecb7aefbb0bb5f5219532111e475 /templates
parentf793c413ade9635522e536ed50e32a6c62117b35 (diff)
Collapse all split and similar packages in recent updates listrelease_2011-04-05
I was getting sick of seeing the *-i18n packages completely blow away anything else useful out of the recent updates sidebar. Revamp the logic here again to do something about it. As we did before, grab packages from the database and attempt to group them, but this time do it by only repo and pkgbase. From there, if we have packages in the group with a pkgname matching pkgbase, we will link just those. If not, we will create some stub objects that link to our relatively new virtual package overview screen. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/public/index.html8
1 files changed, 3 insertions, 5 deletions
diff --git a/templates/public/index.html b/templates/public/index.html
index 1f4b2ce5..132412f6 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -80,15 +80,13 @@
<table>
{% for update in pkg_updates %}
- {% with update|first as fpkg %}
<tr>
- <td class="pkg-name"><span class="{{ fpkg.repo|lower }}">{{ fpkg.pkgname }} {{ fpkg.full_version }}</span></td>
- <td class="pkg-arch">
- {% for pkg in update %}<a href="{{ pkg.get_absolute_url }}"
+ <td class="pkg-name"><span class="{{ update.repo|lower }}">{{ update.pkgbase }} {{ update.version }}</span></td>
+ <td class="pkg-arch">
+ {% for pkg in update.package_links %}<a href="{{ pkg.get_absolute_url }}"
title="Details for {{ pkg.pkgname }} [{{ pkg.repo|lower }}]">{{ pkg.arch }}</a>{% if not forloop.last %}/{% endif %}{% endfor %}
</td>
</tr>
- {% endwith %}
{% endfor %}
</table>
</div>