liquid_feedback_frontend
annotate app/main/issue/_show_head.lua @ 9:0ee1e0c42d4c
Version beta5
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
author | bsw |
---|---|
date | Mon Jan 04 12:00:00 2010 +0100 (2010-01-04) |
parents | 3941792e8be6 |
children | 72c5e0ee7c98 |
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@7 | 67 |
bsw@7 | 68 --[[ |
bsw/jbe@5 | 69 if issue.state == "accepted" then |
bsw/jbe@5 | 70 -- TODO |
bsw/jbe@5 | 71 ui.link{ |
bsw/jbe@5 | 72 content = function() |
bsw/jbe@5 | 73 ui.image{ static = "icons/16/time.png" } |
bsw/jbe@5 | 74 slot.put(_"Vote now/later") |
bsw/jbe@5 | 75 end, |
bsw/jbe@5 | 76 } |
bsw/jbe@5 | 77 end |
bsw@7 | 78 --]] |
bsw/jbe@4 | 79 |
bsw/jbe@4 | 80 end) |
bsw/jbe@4 | 81 |
bsw/jbe@4 | 82 |
bsw/jbe@4 | 83 execute.view{ |
bsw/jbe@4 | 84 module = "issue", |
bsw/jbe@4 | 85 view = "_show_box", |
bsw/jbe@4 | 86 params = { issue = issue } |
bsw/jbe@4 | 87 } |
bsw/jbe@4 | 88 |
bsw/jbe@4 | 89 -- ui.twitter("http://example.com/t" .. tostring(issue.id)) |
bsw/jbe@6 | 90 |
bsw/jbe@6 | 91 |
bsw/jbe@6 | 92 if issue.state == 'voting' then |
bsw/jbe@6 | 93 ui.container{ |
bsw/jbe@6 | 94 attr = { class = "voting_active_info" }, |
bsw/jbe@6 | 95 content = function() |
bsw/jbe@6 | 96 slot.put(_"Voting for this issue is currently running!") |
bsw/jbe@6 | 97 slot.put(" ") |
bsw/jbe@6 | 98 ui.link{ |
bsw/jbe@6 | 99 content = function() |
bsw/jbe@6 | 100 slot.put(_"Vote now") |
bsw/jbe@6 | 101 end, |
bsw/jbe@6 | 102 module = "vote", |
bsw/jbe@6 | 103 view = "list", |
bsw/jbe@6 | 104 params = { issue_id = issue.id } |
bsw/jbe@6 | 105 } |
bsw/jbe@6 | 106 end |
bsw/jbe@6 | 107 } |
bsw/jbe@6 | 108 slot.put("<br />") |
bsw/jbe@6 | 109 end |
bsw/jbe@6 | 110 |