Link to the package pages from the comparison page

This commit is contained in:
Christopher Baines 2019-07-29 21:10:41 +01:00
parent 91e0527b4d
commit ef123dcded

View file

@ -1234,8 +1234,9 @@
(@ (class "table")) (@ (class "table"))
(thead (thead
(tr (tr
(th (@ (class "col-md-3")) "Name") (th (@ (class "col-md-4")) "Name")
(th (@ (class "col-md-9")) "Version"))) (th (@ (class "col-md-4")) "Version")
(th (@ (class "col-md-4")) "")))
(tbody (tbody
,@(map ,@(map
(match-lambda (match-lambda
@ -1243,7 +1244,12 @@
('version . version)) ('version . version))
`(tr `(tr
(td ,name) (td ,name)
(td ,version)))) (td ,version)
(td (@ (class "text-right"))
(a (@ (href ,(string-append
"/revision/" target-commit
"/package/" name "/" version)))
"More information")))))
new-packages)))))) new-packages))))))
(div (div
(@ (class "row")) (@ (class "row"))
@ -1256,8 +1262,9 @@
(@ (class "table")) (@ (class "table"))
(thead (thead
(tr (tr
(th (@ (class "col-md-3")) "Name") (th (@ (class "col-md-4")) "Name")
(th (@ (class "col-md-9")) "Version"))) (th (@ (class "col-md-4")) "Version")
(th (@ (class "col-md-4")) "")))
(tbody (tbody
,@(map ,@(map
(match-lambda (match-lambda
@ -1265,41 +1272,61 @@
('version . version)) ('version . version))
`(tr `(tr
(td ,name) (td ,name)
(td ,version)))) (td ,version)
(td (@ (class "text-right"))
(a (@ (href ,(string-append
"/revision/" base-commit
"/package/" name "/" version)))
"More information")))))
removed-packages)))))) removed-packages))))))
(div (div
(@ (class "row")) (@ (class "row"))
(div (div
(@ (class "col-sm-12")) (@ (class "col-sm-12"))
(h3 "Version changes") (h3 "Version changes")
,(if (null? version-changes) ,(if
'(p "No version changes") (null? version-changes)
`(table '(p "No version changes")
(@ (class "table")) `(table
(thead (@ (class "table"))
(tr (thead
(th (@ (class "col-md-3")) "Name") (tr
(th (@ (class "col-md-9")) "Versions"))) (th (@ (class "col-md-3")) "Name")
(tbody (th (@ (class "col-md-9")) "Versions")))
,@(map (tbody
(match-lambda ,@(map
((name . versions) (match-lambda
`(tr ((name . versions)
(td ,name) `(tr
(td (ul (td ,name)
,@(map (match-lambda (td
((type . versions) (ul
`(li (@ (class ,(if (eq? type 'base) ,@(map
"text-danger" (match-lambda
"text-success"))) ((type . versions)
,(string-join `(li (@ (class ,(if (eq? type 'base)
(vector->list versions) "text-danger"
", ") "text-success")))
,(if (eq? type 'base) (ul
" (old)" (@ (class "list-inline")
" (new)")))) (style "display: inline-block;"))
versions)))))) ,@(map
version-changes)))))))))) (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 (define (compare/derivations query-parameters
valid-systems valid-systems