annotate app/main/unit/_head.lua @ 525:63d6549cc00b
Delegation chain preview improved, better visualisation of current context, code cleanup
author |
bsw |
date |
Fri May 18 19:07:07 2012 +0200 (2012-05-18) |
parents |
|
children |
18cd8595459b |
rev |
line source |
bsw@525
|
1 local unit = param.get("unit", "table")
|
bsw@525
|
2
|
bsw@525
|
3 slot.select("head", function()
|
bsw@525
|
4
|
bsw@525
|
5 ui.container{ attr = { class = "unit_head" }, content = function()
|
bsw@525
|
6
|
bsw@525
|
7 execute.view{ module = "delegation", view = "_info", params = { unit = unit } }
|
bsw@525
|
8
|
bsw@525
|
9 ui.container{ attr = { class = "title" }, content = function()
|
bsw@525
|
10 if not config.single_unit_id then
|
bsw@525
|
11 ui.link{
|
bsw@525
|
12 module = "unit", view = "show", id = unit.id,
|
bsw@525
|
13 attr = { class = "unit_name" }, content = unit.name
|
bsw@525
|
14 }
|
bsw@525
|
15 else
|
bsw@525
|
16 ui.link{
|
bsw@525
|
17 module = "unit", view = "show", id = unit.id,
|
bsw@525
|
18 attr = { class = "unit_name" }, content = config.app_title
|
bsw@525
|
19 }
|
bsw@525
|
20 end
|
bsw@525
|
21 end }
|
bsw@525
|
22
|
bsw@525
|
23 ui.container{ attr = { class = "content" }, content = function()
|
bsw@525
|
24
|
bsw@525
|
25 ui.tag{ content = "1234 Stimmberechtigte" }
|
bsw@525
|
26
|
bsw@525
|
27 end }
|
bsw@525
|
28
|
bsw@525
|
29 end }
|
bsw@525
|
30
|
bsw@525
|
31 end ) |