liquid_feedback_frontend

changeset 472:a42179662951

Show correct text when member area list is shown for other member
author bsw
date Wed Mar 14 18:39:26 2012 +0100 (2012-03-14)
parents 52c4a6ce5ef4
children df5572f67c3b
files app/main/member/_area_list.lua app/main/member/show_tab.lua
line diff
     1.1 --- a/app/main/member/_area_list.lua	Wed Mar 14 18:39:01 2012 +0100
     1.2 +++ b/app/main/member/_area_list.lua	Wed Mar 14 18:39:26 2012 +0100
     1.3 @@ -1,4 +1,6 @@
     1.4  local member = param.get("member", "table")
     1.5 +local for_member = param.get("for_member", atom.boolean)
     1.6 +
     1.7  local units = member.units_with_voting_right
     1.8  
     1.9  for i, unit in ipairs(units) do
    1.10 @@ -48,7 +50,11 @@
    1.11          params = { areas_selector = areas_selector, hide_membership = true }
    1.12        }
    1.13      else
    1.14 -      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." }
    1.15 +      if for_member then
    1.16 +        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." }
    1.17 +      else
    1.18 +        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." }
    1.19 +      end
    1.20      end
    1.21      local max_area_count = Area:new_selector()
    1.22        :add_where{ "area.unit_id = ?", unit.id }
    1.23 @@ -65,7 +71,7 @@
    1.24      if more_area_count > 0 then
    1.25        slot.put("<br />")
    1.26        ui.container{ attr = { class = "more_areas" }, content = function()
    1.27 -        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 }
    1.28 +        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 }
    1.29        end }
    1.30      end
    1.31    end }
     2.1 --- a/app/main/member/show_tab.lua	Wed Mar 14 18:39:01 2012 +0100
     2.2 +++ b/app/main/member/show_tab.lua	Wed Mar 14 18:39:26 2012 +0100
     2.3 @@ -170,7 +170,7 @@
     2.4    icon = { static = "icons/16/package.png" },
     2.5    module = "member",
     2.6    view = "_area_list",
     2.7 -  params = { areas_selector = areas_selector, member = member },
     2.8 +  params = { areas_selector = areas_selector, member = member, for_member = not show_as_homepage },
     2.9  }
    2.10    
    2.11  if show_as_homepage then

Impressum / About Us