# HG changeset patch # User bsw # Date 1328632302 -3600 # Node ID 743194cbdd8966c44e6eae72463155b6ebfda326 # Parent 4c0bff8141ee12e904aad04b3e757dcafd33d5bf Removed current unit chooser diff -r 4c0bff8141ee -r 743194cbdd89 app/main/_filter/20_session.lua --- a/app/main/_filter/20_session.lua Tue Feb 07 17:27:07 2012 +0100 +++ b/app/main/_filter/20_session.lua Tue Feb 07 17:31:42 2012 +0100 @@ -13,6 +13,4 @@ locale.set{lang = app.session.lang or config.default_lang or "en"} -request.set_perm_param("units", param.get("units")) - execute.inner() diff -r 4c0bff8141ee -r 743194cbdd89 app/main/_filter_view/30_navigation.lua --- a/app/main/_filter_view/30_navigation.lua Tue Feb 07 17:27:07 2012 +0100 +++ b/app/main/_filter_view/30_navigation.lua Tue Feb 07 17:31:42 2012 +0100 @@ -13,34 +13,6 @@ if app.session.member or config.public_access then - local units = Unit:get_flattened_tree() - - ui.form{ - attr = { class = "unit_selector" }, - module = "index", action = "set_current_units", - routing = { default = { mode = "redirect", module = "area", view = "list" } }, - content = function() - ui.tag{ - tag = "select", - attr = { name = "unit_ids", onchange = "this.form.submit();" }, - content = function () - for i, unit in ipairs(units) do - local selected - -- TODO support multiple units - if unit.id == param.get("units", atom.integer) then - selected = "selected" - end - ui.tag{ - tag = "option", - attr = { value = unit.id, selected = selected }, - content = unit.name - } - end - end - } - end - } - ui.link{ image = { static = "icons/16/package.png" }, text = _"Areas", diff -r 4c0bff8141ee -r 743194cbdd89 app/main/area/list.lua --- a/app/main/area/list.lua Tue Feb 07 17:27:07 2012 +0100 +++ b/app/main/area/list.lua Tue Feb 07 17:31:42 2012 +0100 @@ -1,5 +1,4 @@ -- TODO support multiple units -local unit_id = param.get("units", atom.integer) local areas_selector = Area:build_selector{ active = true, unit_id = unit_id } local unit = Unit:by_id(unit_id) diff -r 4c0bff8141ee -r 743194cbdd89 app/main/index/_action/set_current_units.lua --- a/app/main/index/_action/set_current_units.lua Tue Feb 07 17:27:07 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ --- TODO support multiple units -local current_unit_id = param.get("unit_ids", atom.integer) - -request.set_perm_param("units", current_unit_id) - -