Pagination widget: Use just links, no <ul> and <li>

This commit is contained in:
fr33domlover 2016-06-07 13:07:34 +00:00
parent d500b85c57
commit 574b47a72a

View file

@ -79,32 +79,25 @@ pageNavWidget nm nws mklink =
<a href=@{route}#{suffix}>#{label}
|]
in [whamlet|
<ul>
$if nmFirst nm
<li>
^{link 1 $ nwsFirst nws}
$if nmFirst nm
^{link 1 $ nwsFirst nws}
$#--------- TODO prev jumps --------
$#--------- TODO prev jumps --------
$maybe (ps, p) <- nmPrev nm
$forall m <- ps
<li>
^{link m (T.pack $ show m)}
<li>
^{link p (nwsPrev nws p)}
$maybe (ps, p) <- nmPrev nm
$forall m <- ps
^{link m (T.pack $ show m)}
^{link p (nwsPrev nws p)}
<li>#{nwsCurrent nws (nmCurrent nm) (nmTotal nm)}
#{nwsCurrent nws (nmCurrent nm) (nmTotal nm)} #
$maybe (n, ns) <- nmNext nm
<li>
^{link n (nwsNext nws n)}
$forall m <- ns
<li>
^{link m (T.pack $ show m)}
$maybe (n, ns) <- nmNext nm
^{link n (nwsNext nws n)}
$forall m <- ns
^{link m (T.pack $ show m)}
$#--------- TODO next jumps --------
$#--------- TODO next jumps --------
$if nmLast nm
<li>
^{link (nmTotal nm) (nwsLast nws $ nmTotal nm)}
$if nmLast nm
^{link (nmTotal nm) (nwsLast nws $ nmTotal nm)}
|]