aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-07-29 21:10:41 +0100
committerChristopher Baines <mail@cbaines.net>2019-07-29 21:10:41 +0100
commitef123dcded503f445c7ca533632a00e68bce32b5 (patch)
treee5a0c09fcf744c33beeefb71ee9e46c3b28b6020
parent91e0527b4da803c089974b6022b373cf910ecb66 (diff)
downloaddata-service-ef123dcded503f445c7ca533632a00e68bce32b5.tar
data-service-ef123dcded503f445c7ca533632a00e68bce32b5.tar.gz
Link to the package pages from the comparison page
-rw-r--r--guix-data-service/web/view/html.scm95
1 files changed, 61 insertions, 34 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index 25d6d37..1702a71 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -1234,8 +1234,9 @@
(@ (class "table"))
(thead
(tr
- (th (@ (class "col-md-3")) "Name")
- (th (@ (class "col-md-9")) "Version")))
+ (th (@ (class "col-md-4")) "Name")
+ (th (@ (class "col-md-4")) "Version")
+ (th (@ (class "col-md-4")) "")))
(tbody
,@(map
(match-lambda
@@ -1243,7 +1244,12 @@
('version . version))
`(tr
(td ,name)
- (td ,version))))
+ (td ,version)
+ (td (@ (class "text-right"))
+ (a (@ (href ,(string-append
+ "/revision/" target-commit
+ "/package/" name "/" version)))
+ "More information")))))
new-packages))))))
(div
(@ (class "row"))
@@ -1256,8 +1262,9 @@
(@ (class "table"))
(thead
(tr
- (th (@ (class "col-md-3")) "Name")
- (th (@ (class "col-md-9")) "Version")))
+ (th (@ (class "col-md-4")) "Name")
+ (th (@ (class "col-md-4")) "Version")
+ (th (@ (class "col-md-4")) "")))
(tbody
,@(map
(match-lambda
@@ -1265,41 +1272,61 @@
('version . version))
`(tr
(td ,name)
- (td ,version))))
+ (td ,version)
+ (td (@ (class "text-right"))
+ (a (@ (href ,(string-append
+ "/revision/" base-commit
+ "/package/" name "/" version)))
+ "More information")))))
removed-packages))))))
(div
(@ (class "row"))
(div
(@ (class "col-sm-12"))
(h3 "Version changes")
- ,(if (null? version-changes)
- '(p "No version changes")
- `(table
- (@ (class "table"))
- (thead
- (tr
- (th (@ (class "col-md-3")) "Name")
- (th (@ (class "col-md-9")) "Versions")))
- (tbody
- ,@(map
- (match-lambda
- ((name . versions)
- `(tr
- (td ,name)
- (td (ul
- ,@(map (match-lambda
- ((type . versions)
- `(li (@ (class ,(if (eq? type 'base)
- "text-danger"
- "text-success")))
- ,(string-join
- (vector->list versions)
- ", ")
- ,(if (eq? type 'base)
- " (old)"
- " (new)"))))
- versions))))))
- version-changes))))))))))
+ ,(if
+ (null? version-changes)
+ '(p "No version changes")
+ `(table
+ (@ (class "table"))
+ (thead
+ (tr
+ (th (@ (class "col-md-3")) "Name")
+ (th (@ (class "col-md-9")) "Versions")))
+ (tbody
+ ,@(map
+ (match-lambda
+ ((name . versions)
+ `(tr
+ (td ,name)
+ (td
+ (ul
+ ,@(map
+ (match-lambda
+ ((type . versions)
+ `(li (@ (class ,(if (eq? type 'base)
+ "text-danger"
+ "text-success")))
+ (ul
+ (@ (class "list-inline")
+ (style "display: inline-block;"))
+ ,@(map
+ (lambda (version)
+ `(li (a (@ (href
+ ,(string-append
+ "/revision/"
+ (if (eq? type 'base)
+ base-commit
+ target-commit)
+ "/package/"
+ name "/" version)))
+ ,version)))
+ (vector->list versions)))
+ ,(if (eq? type 'base)
+ " (old)"
+ " (new)"))))
+ versions))))))
+ version-changes))))))))))
(define (compare/derivations query-parameters
valid-systems