annotate app/main/area/list.lua @ 260:743194cbdd89
Removed current unit chooser
author |
bsw |
date |
Tue Feb 07 17:31:42 2012 +0100 (2012-02-07) |
parents |
52b125fada5b |
children |
7ef1e03e4057 |
rev |
line source |
bsw@241
|
1 -- TODO support multiple units
|
bsw@241
|
2 local areas_selector = Area:build_selector{ active = true, unit_id = unit_id }
|
bsw@197
|
3
|
bsw@247
|
4 local unit = Unit:by_id(unit_id)
|
bsw@247
|
5
|
bsw@197
|
6
|
bsw@51
|
7 if app.session.member_id then
|
bsw@247
|
8 slot.put_into("title", _("Area list of unit '#{unit_name}'", { unit_name = unit.name }))
|
bsw@51
|
9 else
|
bsw@51
|
10 slot.put_into("title", encode.html(config.app_title))
|
bsw@51
|
11 end
|
bsw@51
|
12
|
bsw@197
|
13
|
bsw@69
|
14 if not app.session.member_id and config.motd_public then
|
bsw@69
|
15 local help_text = config.motd_public
|
bsw@69
|
16 ui.container{
|
bsw@69
|
17 attr = { class = "wiki motd" },
|
bsw@69
|
18 content = function()
|
bsw@69
|
19 slot.put(format.wiki_text(help_text))
|
bsw@69
|
20 end
|
bsw@69
|
21 }
|
bsw@51
|
22 end
|
bsw/jbe@0
|
23
|
bsw/jbe@4
|
24 util.help("area.list", _"Area list")
|
bsw/jbe@4
|
25
|
bsw@249
|
26 if app.session.member_id then
|
bsw@249
|
27 execute.view{
|
bsw@249
|
28 module = "delegation",
|
bsw@249
|
29 view = "_show_box",
|
bsw@249
|
30 params = { unit_id = unit_id }
|
bsw@249
|
31 }
|
bsw@249
|
32 end
|
bsw@248
|
33
|
bsw/jbe@0
|
34
|
bsw/jbe@0
|
35 execute.view{
|
bsw/jbe@0
|
36 module = "area",
|
bsw/jbe@0
|
37 view = "_list",
|
bsw/jbe@0
|
38 params = { areas_selector = areas_selector }
|
bsw/jbe@0
|
39 }
|