From 08d9cbbfe3a954123c5eb9e7652635ee81a66ed2 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 27 Jul 2019 09:38:50 +0100 Subject: [PATCH] Neaten up how branches in Git repositories are linked to --- guix-data-service/web/view/html.scm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index c790769..e54f871 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -388,13 +388,19 @@ ,@(map (match-lambda ((name datetime) - (if (string-null? cgit-url-base) - `(,name " at " ,datetime) - `(a (@ (href ,(string-append - cgit-url-base - "commit/?id=" - commit-hash))) - ,name " at " ,datetime)))) + `(div + (a (@ (href ,(string-append "/repository/" id + "/branch/" name))) + ,name) + " at " ,datetime + ,@(if (string-null? cgit-url-base) + '() + `(" " + (a (@ (href ,(string-append + cgit-url-base + "commit/?id=" + commit-hash))) + "(View cgit)")))))) branches)))) git-repositories-and-branches)))