Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
self.id,
)
- return list(repos)
+ distros = {}
+
+ # Group by distro
+ for repo in repos:
+ try:
+ distros[repo.distro].append(repo)
+ except KeyError:
+ distros[repo.distro] = [repo]
+
+ return distros
def get_repo(self, distro, slug):
return self.backend.repos._get_repository("""
<h4>{{ _("Repositories") }}</h4>
{% if user.repos %}
- {% module ReposList(user.repos) %}
+ {% for distro in sorted(user.repos) %}
+ <h5>{{ distro }}</h5>
+
+ {% module ReposList(user.repos[distro]) %}
+ {% end %}
{% end %}
<a class="success expanded button" href="/users/{{ user.name }}/repos/create">