liquid_feedback_frontend

diff app/main/initiative/_list_element.lua @ 862:a1ff5d08f0f4

Displays correct avatar when showing delegation chain preview for other member
author bsw
date Fri Aug 17 19:54:41 2012 +0200 (2012-08-17)
parents 21ae6ff8629a
children ae9ab3edff89
line diff
     1.1 --- a/app/main/initiative/_list_element.lua	Fri Aug 17 19:51:40 2012 +0200
     1.2 +++ b/app/main/initiative/_list_element.lua	Fri Aug 17 19:54:41 2012 +0200
     1.3 @@ -1,5 +1,6 @@
     1.4  local initiative = param.get("initiative", "table")
     1.5  local selected = param.get("selected", atom.boolean)
     1.6 +local for_member = param.get("for_member", "table") or app.session.member
     1.7  
     1.8  local class = "initiative"
     1.9  
    1.10 @@ -66,20 +67,33 @@
    1.11    if app.session.member_id then
    1.12      ui.container{ attr = { class = "interest" }, content = function()
    1.13        if initiative.member_info.initiated then
    1.14 -        local label = _"You are initiator of this initiative"
    1.15 +        local label 
    1.16 +        if for_member and for_member.id ~= app.session.member_id then
    1.17 +          label = _"This member is initiator of this initiative"
    1.18 +        else
    1.19 +          label = _"You are initiator of this initiative"
    1.20 +        end
    1.21          ui.image{
    1.22            attr = { alt = label, title = label },
    1.23            static = "icons/16/user_edit.png"
    1.24          }
    1.25        elseif initiative.member_info.directly_supported then
    1.26          if initiative.member_info.satisfied then
    1.27 -          local label = _"You are supporter of this initiative"
    1.28 +          if for_member and for_member.id ~= app.session.member_id then
    1.29 +            label = _"This member is supporter of this initiative"
    1.30 +          else
    1.31 +            local label = _"You are supporter of this initiative"
    1.32 +          end
    1.33            ui.image{
    1.34              attr = { alt = label, title = label },
    1.35              static = "icons/16/thumb_up_green.png"
    1.36            }
    1.37          else
    1.38 -          local label = _"You are potential supporter of this initiative"
    1.39 +          if for_member and for_member.id ~= app.session.member_id then
    1.40 +            label = _"This member is potential supporter of this initiative"
    1.41 +          else
    1.42 +            local label = _"You are potential supporter of this initiative"
    1.43 +          end
    1.44            ui.image{
    1.45              attr = { alt = label, title = label },
    1.46              static = "icons/16/thumb_up.png"
    1.47 @@ -87,13 +101,21 @@
    1.48          end
    1.49        elseif initiative.member_info.supported then
    1.50          if initiative.member_info.satisfied then
    1.51 -          local label = _"You are supporter of this initiative via delegation"
    1.52 +          if for_member and for_member.id ~= app.session.member_id then
    1.53 +            label = _"This member is supporter of this initiative via delegation"
    1.54 +          else
    1.55 +            local label = _"You are supporter of this initiative via delegation"
    1.56 +          end
    1.57            ui.image{
    1.58              attr = { alt = label, title = label },
    1.59              static = "icons/16/thumb_up_green_arrow.png"
    1.60            }
    1.61          else
    1.62 -          local label = _"You are potential supporter of this initiative via delegation"
    1.63 +          if for_member and for_member.id ~= app.session.member_id then
    1.64 +            label = _"This member is potential supporter of this initiative via delegation"
    1.65 +          else
    1.66 +            local label = _"You are potential supporter of this initiative via delegation"
    1.67 +          end
    1.68            ui.image{
    1.69              attr = { alt = label, title = label },
    1.70              static = "icons/16/thumb_up_arrow.png"

Impressum / About Us