liquid_feedback_frontend

diff app/main/issue/_show.lua @ 879:ea3d3757ddc3

Added support for voting comments
author bsw
date Mon Aug 20 01:00:09 2012 +0200 (2012-08-20)
parents 4ab1e6f5f039
children 1e4c6baf2d87
line diff
     1.1 --- a/app/main/issue/_show.lua	Sat Aug 18 23:22:20 2012 +0200
     1.2 +++ b/app/main/issue/_show.lua	Mon Aug 20 01:00:09 2012 +0200
     1.3 @@ -13,7 +13,14 @@
     1.4  local voteable = app.session.member_id and issue.state == 'voting' and
     1.5         app.session.member:has_voting_right_for_unit_id(issue.area.unit_id)
     1.6  
     1.7 -local vote_link_text = direct_voter and _"Change vote" or _"Vote now"
     1.8 +local vote_comment_able = app.session.member_id and issue.closed and direct_voter
     1.9 +
    1.10 +local vote_link_text
    1.11 +if voteable then 
    1.12 +  vote_link_text = direct_voter and _"Change vote" or _"Vote now"
    1.13 +elseif vote_comment_able then
    1.14 +  vote_link_text = direct_voter and _"Change voting comment"
    1.15 +end  
    1.16  
    1.17  
    1.18  local class = "issue"
    1.19 @@ -87,7 +94,7 @@
    1.20  
    1.21    local links = {}
    1.22    
    1.23 -  if voteable then
    1.24 +  if vote_link_text then
    1.25      links[#links+1] ={
    1.26        content = vote_link_text,
    1.27        module = "vote",

Impressum / About Us