@(currentPage: Page[(Computer, Option[Company])], currentOrderBy: Int, currentFilter: String)(implicit flash: play.api.mvc.Flash) @**************************************** * Helper generating navigation links * ****************************************@ @link(newPage: Int, newOrderBy: Option[Int] = None) = @{ routes.Application.list(newPage, newOrderBy.map { orderBy => if(orderBy == scala.math.abs(currentOrderBy)) -currentOrderBy else orderBy }.getOrElse(currentOrderBy), currentFilter) } @********************************** * Helper generating table headers * ***********************************@ @header(orderBy: Int, title: String) = {
@computer.name | @computer.introduced.map(_.format("dd MMM yyyy")).getOrElse { - } | @computer.discontinued.map(_.format("dd MMM yyyy")).getOrElse { - } | @company.map(_.name).getOrElse { - } |