aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-13 17:13:41 +0000
committerChristopher Baines <mail@cbaines.net>2019-12-13 17:13:41 +0000
commit67710065f04655bca38e8e044ed5cd4436557cb1 (patch)
tree35fe4409b5a15311c548479475f4ed94279136f5
parentfc9c44b715ead00564c30341c9b05cf4d00b66a5 (diff)
downloaddata-service-67710065f04655bca38e8e044ed5cd4436557cb1.tar
data-service-67710065f04655bca38e8e044ed5cd4436557cb1.tar.gz
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.
-rw-r--r--guix-data-service/web/revision/html.scm24
1 files 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")))
'())))))))