liquid_feedback_frontend

changeset 556:53f93f0ffa6e

Fix public event line (do not use member_info when no member logged in)
author bsw
date Tue Jun 19 18:44:46 2012 +0200 (2012-06-19)
parents 3d9cf824f9df
children fc01e21c3d41
files app/main/initiative/_list_element.lua
line diff
     1.1 --- a/app/main/initiative/_list_element.lua	Tue Jun 19 18:41:29 2012 +0200
     1.2 +++ b/app/main/initiative/_list_element.lua	Tue Jun 19 18:44:46 2012 +0200
     1.3 @@ -58,44 +58,46 @@
     1.4      end
     1.5    end }
     1.6  
     1.7 -  ui.container{ attr = { class = "interest" }, content = function()
     1.8 -    if initiative.member_info.initiated then
     1.9 -      local label = _"You are initiator of this initiative"
    1.10 -      ui.image{
    1.11 -        attr = { alt = label, title = label },
    1.12 -        static = "icons/16/user_edit.png"
    1.13 -      }
    1.14 -    elseif initiative.member_info.directly_supported then
    1.15 -      if initiative.member_info.satisfied then
    1.16 -        local label = _"You are supporter of this initiative"
    1.17 -        ui.image{
    1.18 -          attr = { alt = label, title = label },
    1.19 -          static = "icons/16/thumb_up_green.png"
    1.20 -        }
    1.21 -      else
    1.22 -        local label = _"You are potential supporter of this initiative"
    1.23 +  if app.session.member_id then
    1.24 +    ui.container{ attr = { class = "interest" }, content = function()
    1.25 +      if initiative.member_info.initiated then
    1.26 +        local label = _"You are initiator of this initiative"
    1.27          ui.image{
    1.28            attr = { alt = label, title = label },
    1.29 -          static = "icons/16/thumb_up.png"
    1.30 -        }
    1.31 -      end
    1.32 -    elseif initiative.member_info.supported then
    1.33 -      if initiative.member_info.satisfied then
    1.34 -        local label = _"You are supporter of this initiative via delegation"
    1.35 -        ui.image{
    1.36 -          attr = { alt = label, title = label },
    1.37 -          static = "icons/16/thumb_up_green_arrow.png"
    1.38 +          static = "icons/16/user_edit.png"
    1.39          }
    1.40 -      else
    1.41 -        local label = _"You are potential supporter of this initiative via delegation"
    1.42 -        ui.image{
    1.43 -          attr = { alt = label, title = label },
    1.44 -          static = "icons/16/thumb_up_arrow.png"
    1.45 -        }
    1.46 +      elseif initiative.member_info.directly_supported then
    1.47 +        if initiative.member_info.satisfied then
    1.48 +          local label = _"You are supporter of this initiative"
    1.49 +          ui.image{
    1.50 +            attr = { alt = label, title = label },
    1.51 +            static = "icons/16/thumb_up_green.png"
    1.52 +          }
    1.53 +        else
    1.54 +          local label = _"You are potential supporter of this initiative"
    1.55 +          ui.image{
    1.56 +            attr = { alt = label, title = label },
    1.57 +            static = "icons/16/thumb_up.png"
    1.58 +          }
    1.59 +        end
    1.60 +      elseif initiative.member_info.supported then
    1.61 +        if initiative.member_info.satisfied then
    1.62 +          local label = _"You are supporter of this initiative via delegation"
    1.63 +          ui.image{
    1.64 +            attr = { alt = label, title = label },
    1.65 +            static = "icons/16/thumb_up_green_arrow.png"
    1.66 +          }
    1.67 +        else
    1.68 +          local label = _"You are potential supporter of this initiative via delegation"
    1.69 +          ui.image{
    1.70 +            attr = { alt = label, title = label },
    1.71 +            static = "icons/16/thumb_up_arrow.png"
    1.72 +          }
    1.73 +        end
    1.74        end
    1.75 -    end
    1.76 -  end }
    1.77 -
    1.78 +    end }
    1.79 +  end
    1.80 +    
    1.81    ui.container{ attr = { class = "name" }, content = function()
    1.82      local link_class = "initiative_link"
    1.83      if initiative.revoked then

Impressum / About Us