liquid_feedback_frontend

diff app/main/member/_area_list.lua @ 274:aec9df5b4cd3

More optical enhancements and repositioning of elements
author bsw
date Sun Feb 12 12:20:19 2012 +0100 (2012-02-12)
parents 7196685f9dd7
children fecd4c13054a
line diff
     1.1 --- a/app/main/member/_area_list.lua	Wed Feb 08 18:49:22 2012 +0100
     1.2 +++ b/app/main/member/_area_list.lua	Sun Feb 12 12:20:19 2012 +0100
     1.3 @@ -6,13 +6,25 @@
     1.4      :add_where{ "area.unit_id = ?", unit.id }
     1.5      :add_order_by("area.member_weight DESC")
     1.6    ui.link{
     1.7 +    attr = { class = "heading" },
     1.8      text = unit.name,
     1.9      module = "area", view = "list", params = { unit_id = unit.id }
    1.10    }
    1.11    
    1.12 -  execute.view{
    1.13 -    module = "area", view = "_list",
    1.14 -    params = { areas_selector = areas_selector },
    1.15 -  }
    1.16 +  if areas_selector:count() > 0 then
    1.17 +    execute.view{
    1.18 +      module = "area", view = "_list",
    1.19 +      params = { areas_selector = areas_selector },
    1.20 +    }
    1.21 +  else
    1.22 +    ui.tag{ content = _"You have voting privileges for this unit, but you are not member of any of its areas." }
    1.23 +    slot.put(" ")
    1.24 +    ui.link{
    1.25 +      text = _"Show all areas of this unit",
    1.26 +      module = "area", view = "list", params = { unit_id = unit.id }
    1.27 +    }
    1.28 +   end
    1.29 +  slot.put("<br />")
    1.30 +  
    1.31  end
    1.32  

Impressum / About Us