liquid_feedback_frontend

view 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 source
1 local unit = param.get("unit", "table")
3 local trustees = Member:new_selector()
4 :add_field("delegation_chain.*")
5 :join("delegation_chain(" .. tostring(app.session.member.id) .. ", NULL, NULL)", "delegation_chain", "member.id = delegation_chain.member_id")
6 :add_order_by("index")
7 :exec()
9 ui.box{ content = function()
10 ui.box_row{ class = "head", content = function()
11 ui.box_col{ class = "head", content = _"DE / Berlin / Friedrichshain-Kreuzberg" }
12 end }
14 if #trustees > 1 then
15 ui.box_row{ content = function() ui.box_col{ content = function()
16 execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small" } }
17 end } end }
18 end
20 ui.box_row{ content = function() ui.box_col{ content = function()
21 if trustees[1].scope_out == "global" then
22 text = _"Change or revoke unit delegation..."
23 else
24 text = _"Set unit delegation..."
25 end
26 ui.link{
27 text = text,
28 module = "lf2", view = "delegation", params = { unit_id = unit.id }
29 }
30 end } end }
32 end }

Impressum / About Us