liquid_feedback_frontend
diff app/main/issue/_show_head.lua @ 5:afd9f769c7ae
Version beta1
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
author | bsw/jbe |
---|---|
date | Fri Dec 25 12:00:00 2009 +0100 (2009-12-25) |
parents | 80c215dbf076 |
children | 8d91bccab0bf |
line diff
1.1 --- a/app/main/issue/_show_head.lua Thu Dec 10 12:00:00 2009 +0100 1.2 +++ b/app/main/issue/_show_head.lua Fri Dec 25 12:00:00 2009 +0100 1.3 @@ -11,21 +11,35 @@ 1.4 } 1.5 end) 1.6 1.7 -slot.put_into("title", encode.html(_"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name))) 1.8 +slot.select("title", function() 1.9 + ui.link{ 1.10 + content = _"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name), 1.11 + module = "issue", 1.12 + view = "show", 1.13 + id = issue.id 1.14 + } 1.15 +end) 1.16 + 1.17 1.18 slot.select("actions", function() 1.19 + 1.20 + if issue.state == 'voting' then 1.21 + ui.link{ 1.22 + content = function() 1.23 + ui.image{ static = "icons/16/email_open.png" } 1.24 + slot.put(_"Vote now") 1.25 + end, 1.26 + module = "vote", 1.27 + view = "list", 1.28 + params = { issue_id = issue.id } 1.29 + } 1.30 + end 1.31 + 1.32 execute.view{ 1.33 module = "interest", 1.34 view = "_show_box", 1.35 params = { issue = issue } 1.36 } 1.37 - 1.38 - execute.view{ 1.39 - module = "delegation", 1.40 - view = "_show_box", 1.41 - params = { issue_id = issue.id } 1.42 - } 1.43 - 1.44 -- TODO performance 1.45 local interest = Interest:by_pk(issue.id, app.session.member.id) 1.46 if not issue.closed and not issue.fully_frozen then 1.47 @@ -43,6 +57,23 @@ 1.48 end 1.49 end 1.50 1.51 + if not issue.closed then 1.52 + execute.view{ 1.53 + module = "delegation", 1.54 + view = "_show_box", 1.55 + params = { issue_id = issue.id } 1.56 + } 1.57 + end 1.58 + 1.59 + if issue.state == "accepted" then 1.60 + -- TODO 1.61 + ui.link{ 1.62 + content = function() 1.63 + ui.image{ static = "icons/16/time.png" } 1.64 + slot.put(_"Vote now/later") 1.65 + end, 1.66 + } 1.67 + end 1.68 1.69 end) 1.70