liquid_feedback_frontend

annotate app/main/area/list.lua @ 247:8e284d4319be

Show current unit in area list
author bsw
date Fri Dec 30 03:11:57 2011 +0100 (2011-12-30)
parents 6725c13b6ce0
children e3613831cd1e
rev   line source
bsw@241 1 -- TODO support multiple units
bsw@241 2 local unit_id = param.get("units", atom.integer)
bsw@241 3 local areas_selector = Area:build_selector{ active = true, unit_id = unit_id }
bsw@197 4
bsw@247 5 local unit = Unit:by_id(unit_id)
bsw@247 6
bsw@197 7
bsw@51 8 if app.session.member_id then
bsw@247 9 slot.put_into("title", _("Area list of unit '#{unit_name}'", { unit_name = unit.name }))
bsw@51 10 else
bsw@51 11 slot.put_into("title", encode.html(config.app_title))
bsw@51 12 end
bsw@51 13
bsw@197 14
bsw@69 15 if not app.session.member_id and config.motd_public then
bsw@69 16 local help_text = config.motd_public
bsw@69 17 ui.container{
bsw@69 18 attr = { class = "wiki motd" },
bsw@69 19 content = function()
bsw@69 20 slot.put(format.wiki_text(help_text))
bsw@69 21 end
bsw@69 22 }
bsw@51 23 end
bsw/jbe@0 24
bsw/jbe@4 25 util.help("area.list", _"Area list")
bsw/jbe@4 26
bsw/jbe@0 27
bsw/jbe@0 28 execute.view{
bsw/jbe@0 29 module = "area",
bsw/jbe@0 30 view = "_list",
bsw/jbe@0 31 params = { areas_selector = areas_selector }
bsw/jbe@0 32 }

Impressum / About Us