liquid_feedback_frontend
view app/main/area/list.lua @ 248:e3613831cd1e
Migrate global delegation to unit level
author | bsw |
---|---|
date | Fri Dec 30 03:13:10 2011 +0100 (2011-12-30) |
parents | 8e284d4319be |
children | 52b125fada5b |
line source
1 -- TODO support multiple units
2 local unit_id = param.get("units", atom.integer)
3 local areas_selector = Area:build_selector{ active = true, unit_id = unit_id }
5 local unit = Unit:by_id(unit_id)
8 if app.session.member_id then
9 slot.put_into("title", _("Area list of unit '#{unit_name}'", { unit_name = unit.name }))
10 else
11 slot.put_into("title", encode.html(config.app_title))
12 end
15 if not app.session.member_id and config.motd_public then
16 local help_text = config.motd_public
17 ui.container{
18 attr = { class = "wiki motd" },
19 content = function()
20 slot.put(format.wiki_text(help_text))
21 end
22 }
23 end
25 util.help("area.list", _"Area list")
27 execute.view{
28 module = "delegation",
29 view = "_show_box",
30 params = { unit_id = unit_id }
31 }
34 execute.view{
35 module = "area",
36 view = "_list",
37 params = { areas_selector = areas_selector }
38 }