From 096e226de8126eb460c69d7c0645a735cb1f5a87 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 22 Dec 2015 18:55:46 +0100 Subject: 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'. --- website/www/packages.scm | 18 +++++++++++++----- 1 file 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))) -- cgit v1.2.3