diff --git a/borgweb/borg/templates/borg/index.html b/borgweb/borg/templates/borg/index.html index 64012ed..92561c4 100644 --- a/borgweb/borg/templates/borg/index.html +++ b/borgweb/borg/templates/borg/index.html @@ -62,7 +62,24 @@ {% else %} -

No repos found.

+
+
+

No repositories found

+
+
+ {% endif %} + {% if location_list %} +
+

Paths

+ {% for location in location_list %} +
+
{{ location.label }}
+
{{ location.short_description }}
+
+ {% endfor %} +
+ {% else %} + {% endif %} {% endblock %} diff --git a/borgweb/borg/views.py b/borgweb/borg/views.py index 0c12115..0f0da84 100644 --- a/borgweb/borg/views.py +++ b/borgweb/borg/views.py @@ -11,12 +11,14 @@ from datetime import datetime, timedelta def index(request): repo_list = Repo.objects.all() + location_list = Location.objects.all() repo_dict = repo_daily_dict(repo_list, 24) context = { 'repo_list': repo_list, - 'hour_list': repo_dict + 'hour_list': repo_dict, + 'location_list': location_list, } return render(request, 'borg/index.html', context)