Last active
August 29, 2015 14:00
-
-
Save argius/11320011 to your computer and use it in GitHub Desktop.
Try to shorten pagination codes in Skinny 1.0.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul.pagination | |
li | |
- for (i <- (0 to totalPages + 1); p <- Seq(if (i == 0) (1, "«") else if (i == totalPages + 1) (totalPages, "»") else (i, i.toString))) | |
li | |
a(href={s.url(Controllers.members.indexUrl, "page" -> p._1)}) #{unescape(p._2)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment