liquid_feedback_frontend
annotate app/main/issue/_show_vote_later_box.lua @ 75:733f65c0c0a0
Bugfixes, feature enhancements, code-cleanup, and major work on API
Details:
- API
-- Allow relation name to be passed to helper function util.autoapi{...}
-- Added area API
-- Bugfixes in API
--- Correctly return initiatives (bug #162)
--- Correctly process "id" parameter for initiative API
--- Bugfix related to "state" parameter (bug #165)
--- Changed constant "discussion" to "accepted" (in model/issue.lua, used by API)
--- Fixed JSON encoding in auto_api (bug #181)
--- Ignore list filter "voted" in case of public access
--- Enable access to API without session
- Work on RSS feed (incomplete yet)
- Other bugfixes
-- Handle empty browser identification string
-- Handle invalid date in member/update.lua (bugs #24 #109 #115 #136)
-- Better handle errors while converting uploaded images. (bug #79 +5 duplicates)
-- Don't display revoked initiatives in list of new drafts (bug #134)
-- Fixed syntax error in app/main/member/_action/update_name.lua throwing unexpected error, when new name was too short
-- Do not display refresh support button for revoked initiatives
-- Repaired issue search (bug #150)
-- Fixed typos in german translation files
--- "initi(i)erte"
--- "Er(g)eignisse" (bug #161)
- Code cleanup
-- Removed deprecated motd files locale/motd/de.txt and locale/motd/de_public.txt
-- Removed redundant code in app/main/index/_updated_drafts.lua
- New features and (optical) enhancements
-- Support change of notify email; notification of not approved address added to start page
-- Settings dialog splitted into single pages
-- Mark deactivated members
-- Calendar for birthday selection in profile
-- Policy list public readable when public access is enabled
Details:
- API
-- Allow relation name to be passed to helper function util.autoapi{...}
-- Added area API
-- Bugfixes in API
--- Correctly return initiatives (bug #162)
--- Correctly process "id" parameter for initiative API
--- Bugfix related to "state" parameter (bug #165)
--- Changed constant "discussion" to "accepted" (in model/issue.lua, used by API)
--- Fixed JSON encoding in auto_api (bug #181)
--- Ignore list filter "voted" in case of public access
--- Enable access to API without session
- Work on RSS feed (incomplete yet)
- Other bugfixes
-- Handle empty browser identification string
-- Handle invalid date in member/update.lua (bugs #24 #109 #115 #136)
-- Better handle errors while converting uploaded images. (bug #79 +5 duplicates)
-- Don't display revoked initiatives in list of new drafts (bug #134)
-- Fixed syntax error in app/main/member/_action/update_name.lua throwing unexpected error, when new name was too short
-- Do not display refresh support button for revoked initiatives
-- Repaired issue search (bug #150)
-- Fixed typos in german translation files
--- "initi(i)erte"
--- "Er(g)eignisse" (bug #161)
- Code cleanup
-- Removed deprecated motd files locale/motd/de.txt and locale/motd/de_public.txt
-- Removed redundant code in app/main/index/_updated_drafts.lua
- New features and (optical) enhancements
-- Support change of notify email; notification of not approved address added to start page
-- Settings dialog splitted into single pages
-- Mark deactivated members
-- Calendar for birthday selection in profile
-- Policy list public readable when public access is enabled
| author | bsw |
|---|---|
| date | Thu Jul 08 18:44:02 2010 +0200 (2010-07-08) |
| parents | 00d1004545f1 |
| children |
| rev | line source |
|---|---|
| bsw@16 | 1 local issue = param.get("issue", "table") |
| bsw@16 | 2 |
| bsw@16 | 3 |
| bsw@16 | 4 if issue.closed and issue.half_frozen then |
| bsw@16 | 5 return |
| bsw@16 | 6 end |
| bsw@16 | 7 |
| bsw@16 | 8 local interest = Interest:by_pk(issue.id, app.session.member.id) |
| bsw@16 | 9 |
| bsw@16 | 10 if not interest then |
| bsw@16 | 11 return |
| bsw@16 | 12 end |
| bsw@16 | 13 |
| bsw@16 | 14 if interest.voting_requested ~= nil then |
| bsw@16 | 15 slot.select("actions", function() |
| bsw@16 | 16 |
| bsw@16 | 17 ui.container{ |
| bsw@16 | 18 attr = { class = "voting_requested vote_info"}, |
| bsw@16 | 19 content = function() |
| bsw@16 | 20 ui.container{ |
| bsw@16 | 21 attr = { |
| bsw@16 | 22 class = "head head_active", |
| bsw@16 | 23 onclick = "document.getElementById('voting_requested_content').style.display = 'block';" |
| bsw@16 | 24 }, |
| bsw@16 | 25 content = function() |
| bsw@16 | 26 if interest.voting_requested == false then |
| bsw@16 | 27 ui.image{ |
| bsw@16 | 28 static = "icons/16/clock_play.png" |
| bsw@16 | 29 } |
| bsw@16 | 30 slot.put(_"You want to vote later") |
| bsw@16 | 31 ui.image{ |
| bsw@16 | 32 static = "icons/16/dropdown.png" |
| bsw@16 | 33 } |
| bsw@16 | 34 end |
| bsw@16 | 35 end |
| bsw@16 | 36 } |
| bsw@16 | 37 ui.container{ |
| bsw@16 | 38 attr = { class = "content", id = "voting_requested_content" }, |
| bsw@16 | 39 content = function() |
| bsw@16 | 40 ui.container{ |
| bsw@16 | 41 attr = { |
| bsw@16 | 42 class = "close", |
| bsw@16 | 43 style = "cursor: pointer;", |
| bsw@16 | 44 onclick = "document.getElementById('voting_requested_content').style.display = 'none';" |
| bsw@16 | 45 }, |
| bsw@16 | 46 content = function() |
| bsw@16 | 47 ui.image{ static = "icons/16/cross.png" } |
| bsw@16 | 48 end |
| bsw@16 | 49 } |
| bsw@16 | 50 ui.link{ |
| bsw/jbe@19 | 51 text = _"Remove my request to vote later", |
| bsw/jbe@19 | 52 module = "interest", |
| bsw/jbe@19 | 53 action = "update_voting_requested", |
| bsw/jbe@19 | 54 params = { issue_id = issue.id, voting_requested = nil }, |
| bsw@16 | 55 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } |
| bsw@16 | 56 } |
| bsw@16 | 57 slot.put("<br />") |
| bsw@16 | 58 end |
| bsw@16 | 59 } |
| bsw@16 | 60 end |
| bsw@16 | 61 } |
| bsw@16 | 62 end) |
| bsw@16 | 63 else |
| bsw@16 | 64 if not issue.closed and not issue.half_frozen then |
| bsw@16 | 65 ui.link{ |
| bsw/jbe@19 | 66 image = { static = "icons/16/clock_play.png" }, |
| bsw/jbe@19 | 67 text = _"Vote later", |
| bsw@16 | 68 module = "interest", |
| bsw@16 | 69 action = "update_voting_requested", |
| bsw@16 | 70 params = { |
| bsw@16 | 71 issue_id = issue.id, |
| bsw@16 | 72 voting_requested = false |
| bsw@16 | 73 }, |
| bsw@16 | 74 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } |
| bsw@16 | 75 } |
| bsw@16 | 76 end |
| bsw@16 | 77 end |