rename Page functions

This commit is contained in:
Thibault Duplessis 2016-01-25 13:45:24 +07:00
parent 6882b9b918
commit a9c73f1234
3 changed files with 18 additions and 18 deletions

View file

@ -7,37 +7,37 @@ import views._
object Page extends LilaController {
private def page(bookmark: String) = Open { implicit ctx =>
OptionOk(Prismic oneShotBookmark bookmark) {
private def bookmark(name: String) = Open { implicit ctx =>
OptionOk(Prismic oneShotBookmark name) {
case (doc, resolver) => views.html.site.page(doc, resolver)
}
}
def thanks = page("thanks")
def thanks = bookmark("thanks")
def tos = page("tos")
def tos = bookmark("tos")
def contribute = page("help")
def contribute = bookmark("help")
def streamHowTo = page("stream-howto")
def streamHowTo = bookmark("stream-howto")
def contact = page("contact")
def contact = bookmark("contact")
def master = page("master")
def master = bookmark("master")
def kingOfTheHill = page("king-of-the-hill")
def kingOfTheHill = bookmark("king-of-the-hill")
def atomic = page("atomic")
def atomic = bookmark("atomic")
def antichess = page("antichess")
def antichess = bookmark("antichess")
def fischerrandom = page("chess960")
def chess960 = bookmark("chess960")
def horde = page("horde")
def horde = bookmark("horde")
def racingKings = page("racing-kings")
def racingKings = bookmark("racing-kings")
def crazyhouse = page("crazyhouse")
def crazyhouse = bookmark("crazyhouse")
def privacy = page("privacy")
def privacy = bookmark("privacy")
}

View file

@ -2,7 +2,7 @@
@url = {
@variant match {
case chess.variant.Standard => {https://en.wikipedia.org/wiki/Chess}
case chess.variant.Chess960 => {@routes.Page.fischerrandom}
case chess.variant.Chess960 => {@routes.Page.chess960}
case chess.variant.KingOfTheHill => {@routes.Page.kingOfTheHill}
case chess.variant.ThreeCheck => {http://en.wikipedia.org/wiki/Three-check_chess}
case chess.variant.Antichess => {@routes.Page.antichess}

View file

@ -403,7 +403,7 @@ GET /contact controllers.Page.contact
GET /variant/king-of-the-hill controllers.Page.kingOfTheHill
GET /variant/atomic controllers.Page.atomic
GET /variant/antichess controllers.Page.antichess
GET /variant/chess960 controllers.Page.fischerrandom
GET /variant/chess960 controllers.Page.chess960
GET /variant/horde controllers.Page.horde
GET /variant/racing-kings controllers.Page.racingKings
GET /variant/crazyhouse controllers.Page.crazyhouse