liquid_feedback_frontend

diff app/main/index/_member_home.lua @ 570:b904fc12cc1a

Show only units with voting privilege in member_home page
author bsw
date Tue Jun 19 23:18:39 2012 +0200 (2012-06-19)
parents 18e8de7a2b6a
children 63eda58a870e
line diff
     1.1 --- a/app/main/index/_member_home.lua	Tue Jun 19 22:59:58 2012 +0200
     1.2 +++ b/app/main/index/_member_home.lua	Tue Jun 19 23:18:39 2012 +0200
     1.3 @@ -36,6 +36,9 @@
     1.4  local units = Unit:new_selector():exec()
     1.5  
     1.6  for i, unit in ipairs(units) do
     1.7 +  if not member:has_voting_right_for_unit_id(unit.id) then
     1.8 +    break
     1.9 +  end
    1.10    local trustee_member = Member:new_selector()
    1.11      :join("delegation", nil, { "delegation.scope = 'unit' AND delegation.unit_id = ? AND delegation.trustee_id = member.id AND delegation.truster_id = ?", unit.id, member.id })
    1.12      :optional_object_mode()
    1.13 @@ -50,7 +53,7 @@
    1.14    local area_count = areas_selector:count()
    1.15    
    1.16    ui.container{ attr = { class = "member_area_list" }, content = function()
    1.17 -    ui.container{ attr = { class = "xunit_head" }, content = function()
    1.18 +    ui.container{ attr = { class = "unit_head" }, content = function()
    1.19        ui.link{
    1.20          text = unit.name,
    1.21          module = "unit", view = "show", id = unit.id

Impressum / About Us