summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-22 18:55:46 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-22 18:55:46 +0100
commit096e226de8126eb460c69d7c0645a735cb1f5a87 (patch)
tree8e47573b39848a4db865a0f7fa5871d72c42e906
parent2e02412a90fc9933735a4de74746091ee699174e (diff)
downloadguix-artwork-096e226de8126eb460c69d7c0645a735cb1f5a87.tar
guix-artwork-096e226de8126eb460c69d7c0645a735cb1f5a87.tar.gz
website: issues: Use the same anchors as the package page.
* website/www/packages.scm (package->issue-sxml): Add #:anchor parameter and honor it. Move anchor to the "issues" cell. (packages->issue-sxml): Use 'packages->anchors'. Pass #:anchor to 'package->issue-sxml'.
-rw-r--r--website/www/packages.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/website/www/packages.scm b/website/www/packages.scm
index 483c32b..21d98d0 100644
--- a/website/www/packages.scm
+++ b/website/www/packages.scm
@@ -376,7 +376,10 @@ list of checker/report tuples."
(td (pre ,(string-trim-right report))))))
issues))))))
-(define* (package->issue-sxml package #:key (checkers %issue-checkers))
+(define* (package->issue-sxml package
+ #:key
+ (anchor (package-full-name package))
+ (checkers %issue-checkers))
"Return an SXML table row for PACKAGE containing all the reports generated
by CHECKERS."
(let ((issues (package-issues package checkers)))
@@ -384,13 +387,13 @@ by CHECKERS."
(string-append (package-name package) " "
(package-version package)))
- `(tr (td (a (@ (name ,(package-full-name package))))
- (a (@ (href ,(source-url package))
+ `(tr (td (a (@ (href ,(source-url package))
(title "Link to the Guix package source code"))
,(if (null? issues)
name+version
`(b ,name+version))))
- (td ,(issues->sxml package issues)))))
+ (td (a (@ (name ,anchor)))
+ ,(issues->sxml package issues)))))
(define* (packages->issue-sxml packages #:key (checkers %issue-checkers))
"Return an SXML tree representing the reports generated by CHECKERS for
@@ -403,10 +406,15 @@ PACKAGES."
(force-output (current-error-port))
(set! processed (+ 1 processed)))
+ (define package-anchor
+ (packages->anchors packages))
+
`(table
,@(map (lambda (package)
(report-progress)
- (package->issue-sxml package #:checkers checkers))
+ (package->issue-sxml package
+ #:anchor (package-anchor package)
+ #:checkers checkers))
packages)))