liquid_feedback_frontend
diff app/main/area/list.lua @ 262:7ef1e03e4057
Added unit chooser and unit support to area list
| author | bsw |
|---|---|
| date | Tue Feb 07 17:54:00 2012 +0100 (2012-02-07) |
| parents | 743194cbdd89 |
| children | 1b8d51e21614 |
line diff
1.1 --- a/app/main/area/list.lua Tue Feb 07 17:35:45 2012 +0100 1.2 +++ b/app/main/area/list.lua Tue Feb 07 17:54:00 2012 +0100 1.3 @@ -1,11 +1,12 @@ 1.4 --- TODO support multiple units 1.5 +local unit_id = param.get("unit_id", atom.integer) 1.6 + 1.7 local areas_selector = Area:build_selector{ active = true, unit_id = unit_id } 1.8 1.9 local unit = Unit:by_id(unit_id) 1.10 1.11 1.12 -if app.session.member_id then 1.13 - slot.put_into("title", _("Area list of unit '#{unit_name}'", { unit_name = unit.name })) 1.14 +if config.feature_units_enabled then 1.15 + slot.put_into("title", unit.name) 1.16 else 1.17 slot.put_into("title", encode.html(config.app_title)) 1.18 end