From 67710065f04655bca38e8e044ed5cd4436557cb1 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 13 Dec 2019 17:13:41 +0000 Subject: [PATCH] Improve the next page links on the revision pages To add or update the relevant query parameter, rather than replacing all the query parameters with the new value. --- guix-data-service/web/revision/html.scm | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm index b2c71cb..5e601bf 100644 --- a/guix-data-service/web/revision/html.scm +++ b/guix-data-service/web/revision/html.scm @@ -612,9 +612,11 @@ ,@(if show-next-page? `((div (@ (class "row")) - (a (@ (href ,(string-append path-base - "?after_name=" - (car (last packages))))) + (a (@ (href + ,(next-page-link path-base + query-parameters + 'after_name + (car (last packages))))) "Next page"))) '()))))) @@ -755,9 +757,11 @@ ,@(if show-next-page? `((div (@ (class "row")) - (a (@ (href ,(string-append path-base - "?after_name=" - (car (last derivations))))) + (a (@ (href + ,(next-page-link path-base + query-parameters + 'after_name + (car (last derivations))))) "Next page"))) '()))))))) @@ -853,9 +857,11 @@ ,@(if show-next-page? `((div (@ (class "row")) - (a (@ (href ,(string-append path-base - "?after_path=" - (car (last derivation-outputs))))) + (a (@ (href + ,(next-page-link path-base + query-parameters + 'after_path + (car (last derivation-outputs))))) "Next page"))) '())))))))