liquid_feedback_frontend
diff 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 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/issue/_show_head.lua Thu Dec 10 12:00:00 2009 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +local issue = param.get("issue", "table") 1.5 + 1.6 +slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(issue.id) .. '.rss" />') 1.7 + 1.8 +slot.select("path", function() 1.9 + ui.link{ 1.10 + content = _"Area '#{name}'":gsub("#{name}", issue.area.name), 1.11 + module = "area", 1.12 + view = "show", 1.13 + id = issue.area.id 1.14 + } 1.15 +end) 1.16 + 1.17 +slot.put_into("title", encode.html(_"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name))) 1.18 + 1.19 +slot.select("actions", function() 1.20 + execute.view{ 1.21 + module = "interest", 1.22 + view = "_show_box", 1.23 + params = { issue = issue } 1.24 + } 1.25 + 1.26 + execute.view{ 1.27 + module = "delegation", 1.28 + view = "_show_box", 1.29 + params = { issue_id = issue.id } 1.30 + } 1.31 + 1.32 + -- TODO performance 1.33 + local interest = Interest:by_pk(issue.id, app.session.member.id) 1.34 + if not issue.closed and not issue.fully_frozen then 1.35 + if not interest then 1.36 + ui.link{ 1.37 + content = function() 1.38 + ui.image{ static = "icons/16/user_add.png" } 1.39 + slot.put(_"Add my interest") 1.40 + end, 1.41 + module = "interest", 1.42 + action = "update", 1.43 + params = { issue_id = issue.id }, 1.44 + routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } 1.45 + } 1.46 + end 1.47 + end 1.48 + 1.49 + 1.50 +end) 1.51 + 1.52 + 1.53 +execute.view{ 1.54 + module = "issue", 1.55 + view = "_show_box", 1.56 + params = { issue = issue } 1.57 +} 1.58 + 1.59 +-- ui.twitter("http://example.com/t" .. tostring(issue.id))