liquid_feedback_frontend

view 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
line source
1 local state = param.get("state")
2 local order = param.get("order")
4 slot.select("topnav", function()
6 ui.link{
7 attr = { class = state == "closed" and "active" or nil },
8 text = _"Closed", module = "lf2", view = "index", params = { state = "closed", order = order }
9 }
10 ui.link{
11 attr = { class = state == "voting" and "active" or nil },
12 text = _"Voting", module = "lf2", view = "index", params = { state = "voting", order = order }
13 }
14 ui.link{
15 attr = { class = state == "frozen" and "active" or nil },
16 text = _"Frozen", module = "lf2", view = "index", params = { state = "frozen", order = order }
17 }
18 ui.link{
19 attr = { class = state == "discussion" and "active" or nil },
20 text = _"Discussion", module = "lf2", view = "index", params = { state = "discussion", order = order }
21 }
22 ui.link{
23 attr = { class = state == "new" and "active" or nil },
24 text = _"New", module = "lf2", view = "index", params = { state = "new", order = order }
25 }
27 ui.container{ attr = { class = "right" }, content = function()
28 ui.link{
29 attr = { class = order == "last_change" and "active" or nil },
30 text = _"Last change", module = "lf2", view = "index", params = { order = "last_change", state = state }
31 }
32 ui.link{
33 attr = { class = order == "time_left" and "active" or nil },
34 text = _"Time left", module = "lf2", view = "index", params = { order = "time_left", state = state }
35 }
36 ui.link{
37 attr = { class = order == "interest" and "active" or nil },
38 text = _"Interest", module = "lf2", view = "index", params = { order = "interest", state = state }
39 }
40 end }
42 end)
44 execute.inner()

Impressum / About Us