liquid_feedback_frontend

changeset 260:743194cbdd89

Removed current unit chooser
author bsw
date Tue Feb 07 17:31:42 2012 +0100 (2012-02-07)
parents 4c0bff8141ee
children 82c1d3a7819c
files app/main/_filter/20_session.lua app/main/_filter_view/30_navigation.lua app/main/area/list.lua app/main/index/_action/set_current_units.lua
line diff
     1.1 --- a/app/main/_filter/20_session.lua	Tue Feb 07 17:27:07 2012 +0100
     1.2 +++ b/app/main/_filter/20_session.lua	Tue Feb 07 17:31:42 2012 +0100
     1.3 @@ -13,6 +13,4 @@
     1.4  
     1.5  locale.set{lang = app.session.lang or config.default_lang or "en"}
     1.6  
     1.7 -request.set_perm_param("units", param.get("units"))
     1.8 -
     1.9  execute.inner()
     2.1 --- a/app/main/_filter_view/30_navigation.lua	Tue Feb 07 17:27:07 2012 +0100
     2.2 +++ b/app/main/_filter_view/30_navigation.lua	Tue Feb 07 17:31:42 2012 +0100
     2.3 @@ -13,34 +13,6 @@
     2.4  
     2.5    if app.session.member or config.public_access then
     2.6  
     2.7 -    local units = Unit:get_flattened_tree()
     2.8 -
     2.9 -    ui.form{
    2.10 -      attr = { class = "unit_selector" },
    2.11 -      module = "index", action = "set_current_units", 
    2.12 -      routing = { default = { mode = "redirect", module = "area", view = "list" } },
    2.13 -      content = function()
    2.14 -        ui.tag{
    2.15 -          tag = "select",
    2.16 -          attr = { name = "unit_ids", onchange = "this.form.submit();" },
    2.17 -          content = function ()
    2.18 -            for i, unit in ipairs(units) do
    2.19 -              local selected
    2.20 -              -- TODO support multiple units
    2.21 -              if unit.id == param.get("units", atom.integer) then
    2.22 -                selected = "selected"
    2.23 -              end
    2.24 -              ui.tag{
    2.25 -                tag = "option",
    2.26 -                attr = { value = unit.id, selected = selected },
    2.27 -                content = unit.name
    2.28 -              }
    2.29 -            end
    2.30 -          end
    2.31 -        }
    2.32 -      end
    2.33 -    }
    2.34 -
    2.35      ui.link{
    2.36        image  = { static = "icons/16/package.png" },
    2.37        text   = _"Areas",
     3.1 --- a/app/main/area/list.lua	Tue Feb 07 17:27:07 2012 +0100
     3.2 +++ b/app/main/area/list.lua	Tue Feb 07 17:31:42 2012 +0100
     3.3 @@ -1,5 +1,4 @@
     3.4  -- TODO support multiple units
     3.5 -local unit_id = param.get("units", atom.integer)
     3.6  local areas_selector = Area:build_selector{ active = true, unit_id = unit_id }
     3.7  
     3.8  local unit = Unit:by_id(unit_id)
     4.1 --- a/app/main/index/_action/set_current_units.lua	Tue Feb 07 17:27:07 2012 +0100
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,6 +0,0 @@
     4.4 --- TODO support multiple units
     4.5 -local current_unit_id = param.get("unit_ids", atom.integer)
     4.6 -
     4.7 -request.set_perm_param("units", current_unit_id)
     4.8 -
     4.9 -

Impressum / About Us