bsw@212: local unit = param.get("unit", "table") bsw@212: bsw@212: local trustees = Member:new_selector() bsw@212: :add_field("delegation_chain.*") bsw@212: :join("delegation_chain(" .. tostring(app.session.member.id) .. ", NULL, NULL)", "delegation_chain", "member.id = delegation_chain.member_id") bsw@212: :add_order_by("index") bsw@212: :exec() bsw@212: bsw@212: ui.box{ content = function() bsw@212: ui.box_row{ class = "head", content = function() bsw@212: ui.box_col{ class = "head", content = _"DE / Berlin / Friedrichshain-Kreuzberg" } bsw@212: end } bsw@212: bsw@212: if #trustees > 1 then bsw@212: ui.box_row{ content = function() ui.box_col{ content = function() bsw@212: execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small" } } bsw@212: end } end } bsw@212: end bsw@212: bsw@212: ui.box_row{ content = function() ui.box_col{ content = function() bsw@212: if trustees[1].scope_out == "global" then bsw@212: text = _"Change or revoke unit delegation..." bsw@212: else bsw@212: text = _"Set unit delegation..." bsw@212: end bsw@212: ui.link{ bsw@212: text = text, bsw@212: module = "lf2", view = "delegation", params = { unit_id = unit.id } bsw@212: } bsw@212: end } end } bsw@212: bsw@212: end } bsw@212: