liquid_feedback_frontend

annotate app/main/lf2/_filter_view/10_topnav.lua @ 211:4993b71b383f

First checkin of lf2 (frontend second generation) prototype
author bsw
date Wed Mar 02 20:06:26 2011 +0100 (2011-03-02)
parents
children 1dab81353eb1
rev   line source
bsw@211 1 local state = param.get("state")
bsw@211 2 local order = param.get("order")
bsw@211 3
bsw@211 4 slot.select("topnav", function()
bsw@211 5
bsw@211 6 ui.link{
bsw@211 7 attr = { class = state == "closed" and "active" or nil },
bsw@211 8 text = _"Closed", module = "lf2", view = "index", params = { state = "closed", order = order }
bsw@211 9 }
bsw@211 10 ui.link{
bsw@211 11 attr = { class = state == "voting" and "active" or nil },
bsw@211 12 text = _"Voting", module = "lf2", view = "index", params = { state = "voting", order = order }
bsw@211 13 }
bsw@211 14 ui.link{
bsw@211 15 attr = { class = state == "frozen" and "active" or nil },
bsw@211 16 text = _"Frozen", module = "lf2", view = "index", params = { state = "frozen", order = order }
bsw@211 17 }
bsw@211 18 ui.link{
bsw@211 19 attr = { class = state == "discussion" and "active" or nil },
bsw@211 20 text = _"Discussion", module = "lf2", view = "index", params = { state = "discussion", order = order }
bsw@211 21 }
bsw@211 22 ui.link{
bsw@211 23 attr = { class = state == "new" and "active" or nil },
bsw@211 24 text = _"New", module = "lf2", view = "index", params = { state = "new", order = order }
bsw@211 25 }
bsw@211 26
bsw@211 27 ui.container{ attr = { class = "right" }, content = function()
bsw@211 28 ui.link{
bsw@211 29 attr = { class = order == "last_change" and "active" or nil },
bsw@211 30 text = _"Last change", module = "lf2", view = "index", params = { order = "last_change", state = state }
bsw@211 31 }
bsw@211 32 ui.link{
bsw@211 33 attr = { class = order == "time_left" and "active" or nil },
bsw@211 34 text = _"Time left", module = "lf2", view = "index", params = { order = "time_left", state = state }
bsw@211 35 }
bsw@211 36 ui.link{
bsw@211 37 attr = { class = order == "interest" and "active" or nil },
bsw@211 38 text = _"Interest", module = "lf2", view = "index", params = { order = "interest", state = state }
bsw@211 39 }
bsw@211 40 end }
bsw@211 41
bsw@211 42 end)
bsw@211 43
bsw@211 44 execute.inner()

Impressum / About Us