From d006c2a8b844d9ca32673b9d2c525070edc0b928 Mon Sep 17 00:00:00 2001 From: zPlus Date: Fri, 29 Jul 2022 14:12:33 +0200 Subject: [PATCH] Fix some UI display issues. This is only a small patch for fixing some minor issues with how repositories names are shown on the UI. --- templates/about.html | 3 ++- templates/mailing_list/emails.html | 2 +- templates/mailing_list/mailing_list.html | 4 ++-- web.py | 10 ++++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/templates/about.html b/templates/about.html index 3be41ba..845559d 100644 --- a/templates/about.html +++ b/templates/about.html @@ -8,6 +8,8 @@ Welcome! You have reached a public instance of the CLI Forge.

+
+

This is a place for collaborative software development. It offers hosting for Git repositories and mailing lists, while aiming at being entirely usable from @@ -20,7 +22,6 @@ Documentation about using CLIF is available for both users and administrators in the CLIF repository.

-

This instance is still under testing and it is not currently open for public registration, but you can still get an account by asking in #peers at irc.libera.chat. diff --git a/templates/mailing_list/emails.html b/templates/mailing_list/emails.html index 0b55ebf..25166b2 100644 --- a/templates/mailing_list/emails.html +++ b/templates/mailing_list/emails.html @@ -6,7 +6,7 @@ {% for thread in threads %}

Created {{ thread.datetime|ago }} diff --git a/templates/mailing_list/mailing_list.html b/templates/mailing_list/mailing_list.html index d2611f4..8de2765 100644 --- a/templates/mailing_list/mailing_list.html +++ b/templates/mailing_list/mailing_list.html @@ -1,8 +1,8 @@ {% extends "layout.html" %} {% block path %} - home / - {{ list_address }} + home ยป + {{ list_address }} {% endblock %} {% block context %} diff --git a/web.py b/web.py index ed063da..dfdc1f7 100644 --- a/web.py +++ b/web.py @@ -586,8 +586,9 @@ def threads(repository): :param repository: Match repository name NOT ending with ".git" """ - path = os.path.join(GITOLITE_REPOSITORIES_ROOT, repository + '.mlist.git') - list_address = '{}@{}'.format(repository, INSTANCE_DOMAIN) + repository += '.mlist.git' + path = os.path.join(GITOLITE_REPOSITORIES_ROOT, repository) + list_address = '{}@{}'.format(repository[:-10], INSTANCE_DOMAIN) if not os.path.isdir(path): bottle.abort(404, 'No repository at this path.') @@ -624,8 +625,9 @@ def thread(repository, thread_id): Show a single email thread. """ - path = os.path.join(GITOLITE_REPOSITORIES_ROOT, repository + '.mlist.git') - list_address = '{}@{}'.format(repository, INSTANCE_DOMAIN) + repository += '.mlist.git' + path = os.path.join(GITOLITE_REPOSITORIES_ROOT, repository) + list_address = '{}@{}'.format(repository[:-10], INSTANCE_DOMAIN) if not os.path.isdir(path): bottle.abort(404, 'No repository at this path.')