liquid_feedback_frontend
annotate app/main/issue/_show_head.lua @ 4:80c215dbf076
Version alpha5
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
author | bsw/jbe |
---|---|
date | Thu Dec 10 12:00:00 2009 +0100 (2009-12-10) |
parents | |
children | afd9f769c7ae |
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@4 | 14 slot.put_into("title", encode.html(_"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name))) |
bsw/jbe@4 | 15 |
bsw/jbe@4 | 16 slot.select("actions", function() |
bsw/jbe@4 | 17 execute.view{ |
bsw/jbe@4 | 18 module = "interest", |
bsw/jbe@4 | 19 view = "_show_box", |
bsw/jbe@4 | 20 params = { issue = issue } |
bsw/jbe@4 | 21 } |
bsw/jbe@4 | 22 |
bsw/jbe@4 | 23 execute.view{ |
bsw/jbe@4 | 24 module = "delegation", |
bsw/jbe@4 | 25 view = "_show_box", |
bsw/jbe@4 | 26 params = { issue_id = issue.id } |
bsw/jbe@4 | 27 } |
bsw/jbe@4 | 28 |
bsw/jbe@4 | 29 -- TODO performance |
bsw/jbe@4 | 30 local interest = Interest:by_pk(issue.id, app.session.member.id) |
bsw/jbe@4 | 31 if not issue.closed and not issue.fully_frozen then |
bsw/jbe@4 | 32 if not interest then |
bsw/jbe@4 | 33 ui.link{ |
bsw/jbe@4 | 34 content = function() |
bsw/jbe@4 | 35 ui.image{ static = "icons/16/user_add.png" } |
bsw/jbe@4 | 36 slot.put(_"Add my interest") |
bsw/jbe@4 | 37 end, |
bsw/jbe@4 | 38 module = "interest", |
bsw/jbe@4 | 39 action = "update", |
bsw/jbe@4 | 40 params = { issue_id = issue.id }, |
bsw/jbe@4 | 41 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } |
bsw/jbe@4 | 42 } |
bsw/jbe@4 | 43 end |
bsw/jbe@4 | 44 end |
bsw/jbe@4 | 45 |
bsw/jbe@4 | 46 |
bsw/jbe@4 | 47 end) |
bsw/jbe@4 | 48 |
bsw/jbe@4 | 49 |
bsw/jbe@4 | 50 execute.view{ |
bsw/jbe@4 | 51 module = "issue", |
bsw/jbe@4 | 52 view = "_show_box", |
bsw/jbe@4 | 53 params = { issue = issue } |
bsw/jbe@4 | 54 } |
bsw/jbe@4 | 55 |
bsw/jbe@4 | 56 -- ui.twitter("http://example.com/t" .. tostring(issue.id)) |