liquid_feedback_frontend

diff app/main/lf2/_areas.lua @ 211:4993b71b383f

First checkin of lf2 (frontend second generation) prototype
author bsw
date Wed Mar 02 20:06:26 2011 +0100 (2011-03-02)
parents
children 3e4ad069847a
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/lf2/_areas.lua	Wed Mar 02 20:06:26 2011 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +local areas = param.get("areas_selector", "table"):exec()
     1.5 +local head_content = param.get("head_content", "function")
     1.6 +
     1.7 +ui.box{ class = "areas", row_count = #areas, content = function()
     1.8 +  if head_content then
     1.9 +    ui.box_row{ class = "head", content = function() ui.box_col{ content = head_content } end }
    1.10 +  end
    1.11 +
    1.12 +  for i, area in ipairs(areas) do
    1.13 +    local delegation = Delegation:by_pk(app.session.member_id, area.id)
    1.14 +    
    1.15 +    ui.box_row{ 
    1.16 +      class = "area", 
    1.17 +      toggle_content = function() 
    1.18 +        ui.image{ static = "lf2/icon_search_crossed.png" } 
    1.19 +      end,
    1.20 +      content = function()
    1.21 +        ui.box_col{ class = "name", content = function()
    1.22 +          if delegation then
    1.23 +            execute.view{ module = "lf2", view = "_avatars", params = { members = { delegation.trustee }, size = "small" } }
    1.24 +          end
    1.25 +          ui.link{ module = "lf2", view = "area", id = area.id, text = area.name }
    1.26 +        end }
    1.27 +      end
    1.28 +    }
    1.29 +    
    1.30 +  end
    1.31 +
    1.32 +end }
    1.33 \ No newline at end of file

Impressum / About Us