aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-07-27 09:38:50 +0100
committerChristopher Baines <mail@cbaines.net>2019-07-27 09:38:50 +0100
commit08d9cbbfe3a954123c5eb9e7652635ee81a66ed2 (patch)
tree9715f77e9708c58d5822d0f36b82ff29b78f699e
parenta2caa3ea302974b00801efbd96987d35bbbc8aa1 (diff)
downloaddata-service-08d9cbbfe3a954123c5eb9e7652635ee81a66ed2.tar
data-service-08d9cbbfe3a954123c5eb9e7652635ee81a66ed2.tar.gz
Neaten up how branches in Git repositories are linked to
-rw-r--r--guix-data-service/web/view/html.scm20
1 files 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)))