liquid_feedback_frontend
diff app/main/index/_notifications.lua @ 990:77873f08d94f
Completed support for check delegations, removed debug code
author | bsw |
---|---|
date | Sat Apr 20 19:26:58 2013 +0200 (2013-04-20) |
parents | 81bde33c2256 |
children |
line diff
1.1 --- a/app/main/index/_notifications.lua Sat Apr 20 18:51:28 2013 +0200 1.2 +++ b/app/main/index/_notifications.lua Sat Apr 20 19:26:58 2013 +0200 1.3 @@ -21,11 +21,18 @@ 1.4 :single_object_mode() 1.5 :exec() 1.6 1.7 + 1.8 if member.needs_delegation_check_soft then 1.9 - notification_links[#notification_links+1] = { 1.10 - module = "index", view = "check_delegations", 1.11 - text = _"Check your delegations!" 1.12 - } 1.13 + 1.14 + local delegations = Delegation:delegations_to_check_for_member_id(member.id) 1.15 + 1.16 + if #delegations > 0 then 1.17 + notification_links[#notification_links+1] = { 1.18 + module = "index", view = "check_delegations", 1.19 + text = _"Check your delegations!" 1.20 + } 1.21 + end 1.22 + 1.23 end 1.24 end 1.25