diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-12-22 18:55:46 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-12-22 18:55:46 +0100 |
commit | 096e226de8126eb460c69d7c0645a735cb1f5a87 (patch) | |
tree | 8e47573b39848a4db865a0f7fa5871d72c42e906 /website/www | |
parent | 2e02412a90fc9933735a4de74746091ee699174e (diff) | |
download | guix-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'.
Diffstat (limited to 'website/www')
-rw-r--r-- | website/www/packages.scm | 18 |
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))) |