bsw@262: local units = Unit:get_flattened_tree{ active = true } bsw@262: bsw@262: slot.put_into("title", encode.html(config.app_title)) bsw@262: bsw@262: if not app.session.member_id and config.motd_public then bsw@262: local help_text = config.motd_public bsw@262: ui.container{ bsw@262: attr = { class = "wiki motd" }, bsw@262: content = function() bsw@262: slot.put(format.wiki_text(help_text)) bsw@262: end bsw@262: } bsw@262: end bsw@262: bsw@262: util.help("unit.list", _"Unit list") bsw@262: bsw@262: ui.list{ bsw@262: records = units, bsw@262: columns = { bsw@262: { bsw@262: label = "name", bsw@262: content = function(unit) bsw@262: ui.link{ text = unit.name, module = "area", view = "list", params = { unit_id = unit.id } } bsw@262: end bsw@262: } bsw@262: } bsw@262: }