liquid_feedback_frontend
diff app/main/member/_show_thumb.lua @ 177:b9c8503feff7
Highlight members been part of my delegation chain, removed unused code
author | bsw |
---|---|
date | Sun Oct 31 19:54:07 2010 +0100 (2010-10-31) |
parents | 733f65c0c0a0 |
children | bf799314a20f |
line diff
1.1 --- a/app/main/member/_show_thumb.lua Sun Oct 31 19:53:15 2010 +0100 1.2 +++ b/app/main/member/_show_thumb.lua Sun Oct 31 19:54:07 2010 +0100 1.3 @@ -21,6 +21,19 @@ 1.4 container_class = container_class .. " not_informed" 1.5 end 1.6 1.7 +local in_delegation_chain = false 1.8 +if member.delegate_member_ids then 1.9 + for member_id in member.delegate_member_ids:gmatch("(%w+)") do 1.10 + if tonumber(member_id) == member.id then 1.11 + in_delegation_chain = true 1.12 + end 1.13 + end 1.14 +end 1.15 + 1.16 +if in_delegation_chain then 1.17 + container_class = container_class .. " in_delegation_chain" 1.18 +end 1.19 + 1.20 ui.container{ 1.21 attr = { class = container_class }, 1.22 content = function() 1.23 @@ -93,7 +106,10 @@ 1.24 end 1.25 end 1.26 ui.link{ 1.27 - attr = { title = _"Number of incoming delegations, follow link to see more details" }, 1.28 + attr = { 1.29 + class = in_delegation_chain and "in_delegation_chain" or nil, 1.30 + title = _"Number of incoming delegations, follow link to see more details" 1.31 + }, 1.32 content = _("+ #{weight}", { weight = weight - 1 }), 1.33 module = module, 1.34 view = "show_incoming",