Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait BreadPage {
- // Название страницы, которое будет в breadcrumbs
- def getName: String
- // Родительская страница
- def getParent: Option[BreadPage]
- // Действие при нажатии на название страницы в breadcrumbs. Убирается у активной страницы
- def getOpenAction: () => Unit = () => RedirectTo(this)
- // ID для узла в breadcrumbs. Нужен для установки активной страницы
- def getNavNodeId: String
- // Действия по наполнению контента. Метод может быть пустым
- def initialize(): Unit
- // Динамическая разметка контента в scalatags
- val content: TypedTag[Div]
- // Узел в breadcrumbs
- val navigationNode: TypedTag[LI] = li(id := getNavNodeId, a(href := "#", onclick := getOpenAction)(getName))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement