liquid_feedback_frontend

changeset 890:941941955c0e

Allow (un)set of non_voter only while voting is running
author bsw
date Mon Aug 20 02:59:30 2012 +0200 (2012-08-20)
parents 6ba4ebe7b707
children 2c94dd398f8d
files app/main/vote/_action/non_voter.lua
line diff
     1.1 --- a/app/main/vote/_action/non_voter.lua	Mon Aug 20 02:59:05 2012 +0200
     1.2 +++ b/app/main/vote/_action/non_voter.lua	Mon Aug 20 02:59:30 2012 +0200
     1.3 @@ -1,5 +1,15 @@
     1.4  local issue = Issue:new_selector():add_where{ "id = ?", param.get("issue_id", atom.integer) }:for_share():single_object_mode():exec()
     1.5  
     1.6 +if issue.closed then
     1.7 +  slot.put_into("error", _"This issue is already closed.")
     1.8 +  return false
     1.9 +end
    1.10 +
    1.11 +if issue.state ~= "voting" then
    1.12 +  slot.put_into("error", _"Voting has not started yet.")
    1.13 +  return false
    1.14 +end
    1.15 +
    1.16  local direct_voter = DirectVoter:by_pk(issue.id, app.session.member_id)
    1.17  
    1.18  if direct_voter then

Impressum / About Us