liquid_feedback_frontend

annotate app/main/issue/_show_head.lua @ 10:72c5e0ee7c98

Version beta6

Bugfixes:
- Security fix: Every user was able to change the discussion URL of an initiative
- Creation of new issues in areas without default policies is now possible
- Members can now be sorted in different ways
- No error when trying to compare a draft with itself
- Added missing local statement to variable initialization in app/main/delegation/new.lua
- CSS flaw in initiative action bar fixed

New features:
- Possiblity to invite other users to become initiator
- Revokation of initiatives implemented
- Number of suggestions, supporters, etc. is shown on corresponding tabs of initiative view
- Members can now be sorted by account creation (default sorting is "newest first")
- Configuration option to create an automatic discussion link for all issues
- First draft of global timeline feature (not accessible via link yet)
- Custom stylesheet URL for users marked as developers

In area listing the number of closed issues is shown too

Renamed "author" field of initiative to "last author"

Removed wrongly included file app/main/member/_show_thumb.lua.orig in the distribution

Help texts updated
author bsw
date Sun Jan 10 12:00:00 2010 +0100 (2010-01-10)
parents 3941792e8be6
children 559c6be0e1e9
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@10 80 if config.issue_discussion_url_func then
bsw@10 81 local url = config.issue_discussion_url_func(issue)
bsw@10 82 ui.link{
bsw@10 83 attr = { target = "_blank" },
bsw@10 84 external = url,
bsw@10 85 content = function()
bsw@10 86 ui.image{ static = "icons/16/comments.png" }
bsw@10 87 slot.put(_"Discussion on issue")
bsw@10 88 end,
bsw@10 89 }
bsw@10 90 end
bsw/jbe@4 91 end)
bsw/jbe@4 92
bsw/jbe@4 93
bsw/jbe@4 94 execute.view{
bsw/jbe@4 95 module = "issue",
bsw/jbe@4 96 view = "_show_box",
bsw/jbe@4 97 params = { issue = issue }
bsw/jbe@4 98 }
bsw/jbe@4 99
bsw/jbe@4 100 -- ui.twitter("http://example.com/t" .. tostring(issue.id))
bsw/jbe@6 101
bsw/jbe@6 102
bsw/jbe@6 103 if issue.state == 'voting' then
bsw/jbe@6 104 ui.container{
bsw/jbe@6 105 attr = { class = "voting_active_info" },
bsw/jbe@6 106 content = function()
bsw/jbe@6 107 slot.put(_"Voting for this issue is currently running!")
bsw/jbe@6 108 slot.put(" ")
bsw/jbe@6 109 ui.link{
bsw/jbe@6 110 content = function()
bsw/jbe@6 111 slot.put(_"Vote now")
bsw/jbe@6 112 end,
bsw/jbe@6 113 module = "vote",
bsw/jbe@6 114 view = "list",
bsw/jbe@6 115 params = { issue_id = issue.id }
bsw/jbe@6 116 }
bsw/jbe@6 117 end
bsw/jbe@6 118 }
bsw/jbe@6 119 slot.put("<br />")
bsw/jbe@6 120 end
bsw/jbe@6 121

Impressum / About Us