# HG changeset patch # User bsw # Date 1331746766 -3600 # Node ID a421796629515e31e45222d1258502878bc5d574 # Parent 52c4a6ce5ef48c60e101d98beb581e34e446c428 Show correct text when member area list is shown for other member diff -r 52c4a6ce5ef4 -r a42179662951 app/main/member/_area_list.lua --- a/app/main/member/_area_list.lua Wed Mar 14 18:39:01 2012 +0100 +++ b/app/main/member/_area_list.lua Wed Mar 14 18:39:26 2012 +0100 @@ -1,4 +1,6 @@ local member = param.get("member", "table") +local for_member = param.get("for_member", atom.boolean) + local units = member.units_with_voting_right for i, unit in ipairs(units) do @@ -48,7 +50,11 @@ params = { areas_selector = areas_selector, hide_membership = true } } else - ui.container{ attr = { class = "voting_priv_info" }, content = _"You have voting privileges for this unit, but you are not member of any of its areas." } + if for_member then + ui.container{ attr = { class = "voting_priv_info" }, content = _"This member has voting privileges for this unit, but you ist not member of any of its areas." } + else + ui.container{ attr = { class = "voting_priv_info" }, content = _"You have voting privileges for this unit, but you are not member of any of its areas." } + end end local max_area_count = Area:new_selector() :add_where{ "area.unit_id = ?", unit.id } @@ -65,7 +71,7 @@ if more_area_count > 0 then slot.put("
") ui.container{ attr = { class = "more_areas" }, content = function() - ui.link{ content = _("#{count} more areas in this unit, #{delegated_count} of them delegated", { count = more_area_count, delegated_count = delegated_count }), module = "unit", view = "show", id = unit.id } + ui.link{ content = _("#{count} more areas in this unit, #{delegated_count} of them are delegated", { count = more_area_count, delegated_count = delegated_count }), module = "unit", view = "show", id = unit.id } end } end end } diff -r 52c4a6ce5ef4 -r a42179662951 app/main/member/show_tab.lua --- a/app/main/member/show_tab.lua Wed Mar 14 18:39:01 2012 +0100 +++ b/app/main/member/show_tab.lua Wed Mar 14 18:39:26 2012 +0100 @@ -170,7 +170,7 @@ icon = { static = "icons/16/package.png" }, module = "member", view = "_area_list", - params = { areas_selector = areas_selector, member = member }, + params = { areas_selector = areas_selector, member = member, for_member = not show_as_homepage }, } if show_as_homepage then