liquid_feedback_frontend
annotate 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 |
rev | line source |
---|---|
bsw/jbe@4 | 1 local issue = param.get("issue", "table") |
bsw/jbe@4 | 2 |
bsw/jbe@4 | 3 slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(issue.id) .. '.rss" />') |
bsw/jbe@4 | 4 |
bsw/jbe@4 | 5 slot.select("path", function() |
bsw/jbe@4 | 6 ui.link{ |
bsw/jbe@4 | 7 content = _"Area '#{name}'":gsub("#{name}", issue.area.name), |
bsw/jbe@4 | 8 module = "area", |
bsw/jbe@4 | 9 view = "show", |
bsw/jbe@4 | 10 id = issue.area.id |
bsw/jbe@4 | 11 } |
bsw/jbe@4 | 12 end) |
bsw/jbe@4 | 13 |
bsw/jbe@5 | 14 slot.select("title", function() |
bsw/jbe@5 | 15 ui.link{ |
bsw/jbe@5 | 16 content = _"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name), |
bsw/jbe@5 | 17 module = "issue", |
bsw/jbe@5 | 18 view = "show", |
bsw/jbe@5 | 19 id = issue.id |
bsw/jbe@5 | 20 } |
bsw/jbe@5 | 21 end) |
bsw/jbe@5 | 22 |
bsw/jbe@4 | 23 |
bsw/jbe@4 | 24 slot.select("actions", function() |
bsw/jbe@5 | 25 |
bsw/jbe@5 | 26 if issue.state == 'voting' then |
bsw/jbe@5 | 27 ui.link{ |
bsw/jbe@5 | 28 content = function() |
bsw/jbe@5 | 29 ui.image{ static = "icons/16/email_open.png" } |
bsw/jbe@5 | 30 slot.put(_"Vote now") |
bsw/jbe@5 | 31 end, |
bsw/jbe@5 | 32 module = "vote", |
bsw/jbe@5 | 33 view = "list", |
bsw/jbe@5 | 34 params = { issue_id = issue.id } |
bsw/jbe@5 | 35 } |
bsw/jbe@5 | 36 end |
bsw/jbe@5 | 37 |
bsw/jbe@4 | 38 execute.view{ |
bsw/jbe@4 | 39 module = "interest", |
bsw/jbe@4 | 40 view = "_show_box", |
bsw/jbe@4 | 41 params = { issue = issue } |
bsw/jbe@4 | 42 } |
bsw/jbe@4 | 43 -- TODO performance |
bsw/jbe@4 | 44 local interest = Interest:by_pk(issue.id, app.session.member.id) |
bsw/jbe@4 | 45 if not issue.closed and not issue.fully_frozen then |
bsw/jbe@4 | 46 if not interest then |
bsw/jbe@4 | 47 ui.link{ |
bsw/jbe@4 | 48 content = function() |
bsw/jbe@4 | 49 ui.image{ static = "icons/16/user_add.png" } |
bsw/jbe@4 | 50 slot.put(_"Add my interest") |
bsw/jbe@4 | 51 end, |
bsw/jbe@4 | 52 module = "interest", |
bsw/jbe@4 | 53 action = "update", |
bsw/jbe@4 | 54 params = { issue_id = issue.id }, |
bsw/jbe@4 | 55 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } |
bsw/jbe@4 | 56 } |
bsw/jbe@4 | 57 end |
bsw/jbe@4 | 58 end |
bsw/jbe@4 | 59 |
bsw/jbe@5 | 60 if not issue.closed then |
bsw/jbe@5 | 61 execute.view{ |
bsw/jbe@5 | 62 module = "delegation", |
bsw/jbe@5 | 63 view = "_show_box", |
bsw/jbe@5 | 64 params = { issue_id = issue.id } |
bsw/jbe@5 | 65 } |
bsw/jbe@5 | 66 end |
bsw/jbe@5 | 67 |
bsw/jbe@5 | 68 if issue.state == "accepted" then |
bsw/jbe@5 | 69 -- TODO |
bsw/jbe@5 | 70 ui.link{ |
bsw/jbe@5 | 71 content = function() |
bsw/jbe@5 | 72 ui.image{ static = "icons/16/time.png" } |
bsw/jbe@5 | 73 slot.put(_"Vote now/later") |
bsw/jbe@5 | 74 end, |
bsw/jbe@5 | 75 } |
bsw/jbe@5 | 76 end |
bsw/jbe@4 | 77 |
bsw/jbe@4 | 78 end) |
bsw/jbe@4 | 79 |
bsw/jbe@4 | 80 |
bsw/jbe@4 | 81 execute.view{ |
bsw/jbe@4 | 82 module = "issue", |
bsw/jbe@4 | 83 view = "_show_box", |
bsw/jbe@4 | 84 params = { issue = issue } |
bsw/jbe@4 | 85 } |
bsw/jbe@4 | 86 |
bsw/jbe@4 | 87 -- ui.twitter("http://example.com/t" .. tostring(issue.id)) |