liquid_feedback_frontend

diff app/main/index/_notifications.lua @ 988:81bde33c2256

Added support for regular delegation check, fixed css for pagination
author bsw
date Sat Apr 20 18:40:34 2013 +0200 (2013-04-20)
parents 6ba4ebe7b707
children 77873f08d94f
line diff
     1.1 --- a/app/main/index/_notifications.lua	Wed Mar 20 09:26:11 2013 +0100
     1.2 +++ b/app/main/index/_notifications.lua	Sat Apr 20 18:40:34 2013 +0200
     1.3 @@ -14,6 +14,21 @@
     1.4    }
     1.5  end
     1.6  
     1.7 +if config.check_delegations_interval_soft then
     1.8 +  local member = Member:new_selector()
     1.9 +    :add_where({ "id = ?", app.session.member_id })
    1.10 +    :add_field({ "now() > COALESCE(last_delegation_check, activated) + ?::interval", config.check_delegations_interval_soft }, "needs_delegation_check_soft")
    1.11 +    :single_object_mode()
    1.12 +    :exec()
    1.13 +    
    1.14 +  if member.needs_delegation_check_soft then
    1.15 +    notification_links[#notification_links+1] = {
    1.16 +      module = "index", view = "check_delegations", 
    1.17 +      text = _"Check your delegations!"
    1.18 +    }
    1.19 +  end
    1.20 +end
    1.21 +
    1.22  local broken_delegations_count = Delegation:selector_for_broken(app.session.member_id):count()
    1.23  
    1.24  if broken_delegations_count > 0 then

Impressum / About Us