liquid_feedback_frontend

view app/main/lf2/_filter_view/10_topnav.lua @ 215:1dab81353eb1

More enhancements for second generation frontend
author bsw
date Sat Mar 05 15:34:17 2011 +0100 (2011-03-05)
parents 4993b71b383f
children 73dbc9e2bfd4
line source
1 execute.inner()
3 local phase
4 if app.topnav_phase then
5 phase = app.topnav_phase
6 else
7 phase = param.get("phase")
8 end
10 local area_id
11 if app.topnav_area_id then
12 area_id = app.topnav_area_id
13 else
14 area_id = param.get_all_cgi()["area_id"]
15 end
17 local order = param.get("order")
19 local view
20 local id
21 if area_id then
22 view = "area"
23 id = area_id
24 else
25 view = "index"
26 end
28 slot.select("topnav", function()
30 ui.link{
31 attr = { class = phase == "closed" and "active" or nil },
32 text = _"Closed", module = "lf2", view = view, id = id, params = { phase = "closed", order = order }
33 }
34 ui.link{
35 attr = { class = phase == "voting" and "active" or nil },
36 text = _"Voting", module = "lf2", view = view, id = id, params = { phase = "voting", order = order }
37 }
38 ui.link{
39 attr = { class = phase == "frozen" and "active" or nil },
40 text = _"Frozen", module = "lf2", view = view, id = id, params = { phase = "frozen", order = order }
41 }
42 ui.link{
43 attr = { class = phase == "discussion" and "active" or nil },
44 text = _"Discussion", module = "lf2", view = view, id = id, params = { phase = "discussion", order = order }
45 }
46 ui.link{
47 attr = { class = phase == "new" and "active" or nil },
48 text = _"New", module = "lf2", view = view, id = id, params = { phase = "new", order = order }
49 }
51 ui.container{ attr = { class = "right" }, content = function()
52 ui.link{
53 attr = { class = order == "last_change" and "active" or nil },
54 text = _"Last change", module = "lf2", view = view, id = id, params = { order = "last_change", state = state }
55 }
56 ui.link{
57 attr = { class = order == "time_left" and "active" or nil },
58 text = _"Time left", module = "lf2", view = view, id = id, params = { order = "time_left", state = state }
59 }
60 ui.link{
61 attr = { class = order == "interest" and "active" or nil },
62 text = _"Interest", module = "lf2", view = view, id = id, params = { order = "interest", state = state }
63 }
64 end }
66 end)

Impressum / About Us