templates: If applicable, disable "Last" and "First" pagination links.

* src/cuirass/templates.scm (pagination): Disable "Last" and "First"
if applicable.
This commit is contained in:
Danny Milosavljevic 2019-06-19 17:39:29 +02:00
parent 8c91c82e35
commit d5b827097b
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5
1 changed files with 4 additions and 2 deletions

View File

@ -210,7 +210,8 @@
(nav
(@ (class "mx-auto") (aria-label "Page navigation"))
(ul (@ (class "pagination"))
(li (@ (class "page-item"))
(li (@ (class "page-item"
,(if (string-null? prev-link) " disabled")))
(a (@ (class "page-link")
(href ,first-link))
"<< First"))
@ -224,7 +225,8 @@
(a (@ (class "page-link")
(href ,next-link))
"Next >"))
(li (@ (class "page-item"))
(li (@ (class "page-item"
,(if (string-null? next-link) " disabled")))
(a (@ (class "page-link")
(href ,last-link))
"Last >>"))))))