# HG changeset patch # User Ingo Bormuth # Date 1324953275 -3600 # Node ID 910bbf6bc6b1888494a5bfeb67aaf70ef7c5d8f4 # Parent 86988175dc89255bd969b699fea7efcb0e6cc585 Show area delegations in area list diff -r 86988175dc89 -r 910bbf6bc6b1 app/main/area/_list.lua --- a/app/main/area/_list.lua Tue Dec 27 02:13:46 2011 +0100 +++ b/app/main/area/_list.lua Tue Dec 27 03:34:35 2011 +0100 @@ -18,6 +18,7 @@ :add_field({ "(SELECT COUNT(*) FROM issue LEFT JOIN direct_voter ON direct_voter.issue_id = issue.id AND direct_voter.member_id = ? WHERE issue.area_id = area.id AND issue.fully_frozen NOTNULL AND issue.closed ISNULL AND direct_voter.member_id ISNULL)", app.session.member.id }, "issues_to_vote_count") :left_join("membership", "_membership", { "_membership.area_id = area.id AND _membership.member_id = ?", app.session.member.id }) :add_field("_membership.member_id NOTNULL", "is_member", { "grouped" }) + :add_field({ "(SELECT member.name FROM delegation LEFT JOIN member ON delegation.trustee_id = member.id WHERE delegation.scope = 'area' AND delegation.area_id = area.id AND truster_id = ?)", app.session.member.id }, "area_delegation_name") else areas_selector:add_field("0", "issues_to_vote_count") end @@ -69,6 +70,17 @@ }, { content = function(record) + if record.area_delegation_name then + local text = _("Area delegated to '#{name}'", { name = record.area_delegation_name }) + ui.image{ + attr = { title = text, alt = text, style = "vertical-align: middle;" }, + static = "icons/16/link.png", + } + end + end + }, + { + content = function(record) if record.member_weight and record.direct_member_count then local max_value = MemberCount:get() ui.bargraph{ @@ -256,6 +268,14 @@ slot.put(" ") slot.put(_"Member of area") slot.put("   ") + + ui.image{ + attr = { title = title, alt = title }, + static = "icons/16/link.png" + } + slot.put(" ") + slot.put(_"Area delegated") + slot.put("   ") end ui.image{ diff -r 86988175dc89 -r 910bbf6bc6b1 locale/translations.de.lua --- a/locale/translations.de.lua Tue Dec 27 02:13:46 2011 +0100 +++ b/locale/translations.de.lua Tue Dec 27 03:34:35 2011 +0100 @@ -57,6 +57,8 @@ ["Are you sure?"] = "Sicher?"; ["Area"] = "Themenbereich"; ["Area '#{name}'"] = "Themenbereich '#{name}'"; +["Area delegated"] = "Themenbereich delegiert"; +["Area delegated to '#{name}'"] = "Themenbereich an '#{name}' delegiert"; ["Area delegation"] = "Delegation für Themenbereich"; ["Area delegation active"] = "Delegation für Themenbereich aktiv"; ["Area list"] = "Liste der Themenbereiche"; diff -r 86988175dc89 -r 910bbf6bc6b1 locale/translations.en.lua --- a/locale/translations.en.lua Tue Dec 27 02:13:46 2011 +0100 +++ b/locale/translations.en.lua Tue Dec 27 03:34:35 2011 +0100 @@ -57,6 +57,8 @@ ["Are you sure?"] = false; ["Area"] = false; ["Area '#{name}'"] = false; +["Area delegated"] = false; +["Area delegated to '#{name}'"] = false; ["Area delegation"] = false; ["Area delegation active"] = false; ["Area list"] = false; diff -r 86988175dc89 -r 910bbf6bc6b1 locale/translations.eo.lua --- a/locale/translations.eo.lua Tue Dec 27 02:13:46 2011 +0100 +++ b/locale/translations.eo.lua Tue Dec 27 03:34:35 2011 +0100 @@ -57,6 +57,8 @@ ["Are you sure?"] = "Ĉu vi estas certa?"; ["Area"] = "Temaro"; ["Area '#{name}'"] = "Temaro '#{name}'"; +["Area delegated"] = "Temarodelegacio"; -- FIXME +["Area delegated to '#{name}'"] = "Temarodelegacio '#{name}'"; -- FIXME ["Area delegation"] = "Temarodelegacio"; ["Area delegation active"] = "Temarodlegacio aplikita"; ["Area list"] = "Temarolisto"; diff -r 86988175dc89 -r 910bbf6bc6b1 locale/translations.fr.lua --- a/locale/translations.fr.lua Tue Dec 27 02:13:46 2011 +0100 +++ b/locale/translations.fr.lua Tue Dec 27 03:34:35 2011 +0100 @@ -57,6 +57,8 @@ ["Are you sure?"] = false; ["Area"] = false; ["Area '#{name}'"] = false; +["Area delegated"] = false; +["Area delegated to '#{name}'"] = false; ["Area delegation"] = false; ["Area delegation active"] = false; ["Area list"] = false; diff -r 86988175dc89 -r 910bbf6bc6b1 static/icons/16/link.png Binary file static/icons/16/link.png has changed