feeds: add all arches for repo feed

If you wanted to see all updates regardless of architecture for
[testing] before, there wasn't really a way to do so. Add one.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-07-31 00:16:36 -05:00
parent 0cc369e985
commit c03b9c5f10
3 changed files with 8 additions and 1 deletions

View File

@ -71,8 +71,10 @@ def get_object(self, request, arch='', repo=''):
def title(self, obj):
s = 'Arch Linux: Recent package updates'
if 'repo' in obj:
if 'repo' in obj and 'arch' in obj:
s += ' (%s [%s])' % (obj['arch'].name, obj['repo'].name.lower())
elif 'repo' in obj:
s += ' [%s]' % (obj['repo'].name.lower())
elif 'arch' in obj:
s += ' (%s)' % (obj['arch'].name)
return s

View File

@ -36,6 +36,7 @@ <h3>Package Feeds</h3>
<thead>
<tr>
<th></th>
<th>All Arches</th>
{% for arch in arches %}
<th>{{ arch }}</th>
{% endfor %}
@ -44,6 +45,7 @@ <h3>Package Feeds</h3>
<tbody>
<tr>
<td><strong>All Repos</strong></td>
<td><a href="/feeds/packages/" class="rss">Feed</a></td>
{% for arch in arches %}
<td><a href="/feeds/packages/{{ arch }}/" class="rss">Feed</a></td>
{% endfor %}
@ -51,6 +53,7 @@ <h3>Package Feeds</h3>
{% for repo in repos %}
<tr>
<td><strong>{{ repo }}</strong></td>
<td><a href="/feeds/packages/all/{{ repo|lower }}/" class="rss">Feed</a></td>
{% for arch in arches %}
<td><a href="/feeds/packages/{{ arch }}/{{ repo|lower }}/" class="rss">Feed</a></td>
{% endfor %}

View File

@ -27,6 +27,8 @@
(r'^packages/$', cache_page(300)(PackageFeed())),
(r'^packages/(?P<arch>[A-z0-9]+)/$',
cache_page(300)(PackageFeed())),
(r'^packages/all/(?P<repo>[A-z0-9\-]+)/$',
cache_page(300)(PackageFeed())),
(r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
cache_page(300)(PackageFeed())),
)