annotate app/main/lf2/_sidebar.lua @ 213:acf92c2d33f4
Seperated css and fixed issue delegations for second generation frontend
| author |
bsw |
| date |
Thu Mar 03 21:26:35 2011 +0100 (2011-03-03) |
| parents |
3e4ad069847a |
| children |
|
| rev |
line source |
|
bsw@212
|
1 local current_area_id = param.get("current_area_id", atom.integer)
|
|
bsw@212
|
2
|
|
bsw@211
|
3 local member_areas_selector = Area:build_selector{
|
|
bsw@211
|
4 member_id = app.session.member_id,
|
|
bsw@211
|
5 order = "name"
|
|
bsw@211
|
6 }
|
|
bsw@211
|
7 local other_areas_selector = Area:build_selector{
|
|
bsw@211
|
8 not_member_id = app.session.member_id,
|
|
bsw@211
|
9 order = "name"
|
|
bsw@211
|
10 }
|
|
bsw@211
|
11
|
|
bsw@212
|
12 execute.view{ module = "lf2", view = "_sidebar_unit", params = { unit = {} } } --TODO
|
|
bsw@211
|
13
|
|
bsw@211
|
14 ui.form{
|
|
bsw@212
|
15 method = "get",
|
|
bsw@211
|
16 content = function()
|
|
bsw@211
|
17
|
|
bsw@211
|
18 ui.container{ attr = { class = "boxhead" }, content = _"" }
|
|
bsw@211
|
19 --execute.view{ module = "lf2", view = "_areas", params = { areas_selector = member_areas_selector } }
|
|
bsw@211
|
20
|
|
bsw@211
|
21 execute.view{
|
|
bsw@211
|
22 module = "lf2", view = "_areas", params = {
|
|
bsw@211
|
23 areas_selector = member_areas_selector,
|
|
bsw@212
|
24 current_area_id = current_area_id,
|
|
bsw@211
|
25 head_content = function() ui.tag{ content = _"Areas, you are member of" } end
|
|
bsw@211
|
26 }
|
|
bsw@211
|
27 }
|
|
bsw@211
|
28
|
|
bsw@211
|
29 execute.view{
|
|
bsw@211
|
30 module = "lf2", view = "_areas", params = {
|
|
bsw@211
|
31 areas_selector = other_areas_selector,
|
|
bsw@212
|
32 current_area_id = current_area_id,
|
|
bsw@211
|
33 head_content = function() ui.tag{ content = _"Areas, you are not member of" } end
|
|
bsw@211
|
34 }
|
|
bsw@211
|
35 }
|
|
bsw@211
|
36
|
|
bsw@211
|
37 end
|
|
bsw@211
|
38 }
|
|
bsw@211
|
39
|
|
bsw@211
|
40 execute.view{ module = "lf2", view = "_search", params = { area = area } }
|
|
bsw@211
|
41
|