liquid_feedback_frontend

diff app/main/lf2/_sidebar_unit.lua @ 212:3e4ad069847a

Some more work at 2nd generation frontend code
author bsw
date Thu Mar 03 18:39:00 2011 +0100 (2011-03-03)
parents
children 1dab81353eb1
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/lf2/_sidebar_unit.lua	Thu Mar 03 18:39:00 2011 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +local unit = param.get("unit", "table")
     1.5 +
     1.6 +local trustees = Member:new_selector()
     1.7 +  :add_field("delegation_chain.*")
     1.8 +  :join("delegation_chain(" .. tostring(app.session.member.id) .. ", NULL, NULL)", "delegation_chain", "member.id = delegation_chain.member_id")
     1.9 +  :add_order_by("index")
    1.10 +  :exec()
    1.11 +
    1.12 +ui.box{ content = function()
    1.13 +  ui.box_row{ class = "head", content = function()
    1.14 +    ui.box_col{ class = "head", content = _"DE / Berlin / Friedrichshain-Kreuzberg" }
    1.15 +  end }
    1.16 +  
    1.17 +  if #trustees > 1 then
    1.18 +    ui.box_row{ content = function() ui.box_col{ content = function()
    1.19 +      execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small" } }
    1.20 +    end } end }
    1.21 +  end
    1.22 +  
    1.23 +  ui.box_row{ content = function() ui.box_col{ content = function()
    1.24 +    if trustees[1].scope_out == "global" then
    1.25 +      text = _"Change or revoke unit delegation..."
    1.26 +    else
    1.27 +      text = _"Set unit delegation..."
    1.28 +    end  
    1.29 +    ui.link{
    1.30 +      text = text,
    1.31 +      module = "lf2", view = "delegation", params = { unit_id = unit.id }
    1.32 +    }    
    1.33 +  end } end }
    1.34 +  
    1.35 +end }
    1.36 +    
    1.37 \ No newline at end of file

Impressum / About Us