liquid_feedback_frontend

view 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
author bsw
date Thu Jul 08 18:44:02 2010 +0200 (2010-07-08)
parents 00d1004545f1
children
line source
1 local issue = param.get("issue", "table")
4 if issue.closed and issue.half_frozen then
5 return
6 end
8 local interest = Interest:by_pk(issue.id, app.session.member.id)
10 if not interest then
11 return
12 end
14 if interest.voting_requested ~= nil then
15 slot.select("actions", function()
17 ui.container{
18 attr = { class = "voting_requested vote_info"},
19 content = function()
20 ui.container{
21 attr = {
22 class = "head head_active",
23 onclick = "document.getElementById('voting_requested_content').style.display = 'block';"
24 },
25 content = function()
26 if interest.voting_requested == false then
27 ui.image{
28 static = "icons/16/clock_play.png"
29 }
30 slot.put(_"You want to vote later")
31 ui.image{
32 static = "icons/16/dropdown.png"
33 }
34 end
35 end
36 }
37 ui.container{
38 attr = { class = "content", id = "voting_requested_content" },
39 content = function()
40 ui.container{
41 attr = {
42 class = "close",
43 style = "cursor: pointer;",
44 onclick = "document.getElementById('voting_requested_content').style.display = 'none';"
45 },
46 content = function()
47 ui.image{ static = "icons/16/cross.png" }
48 end
49 }
50 ui.link{
51 text = _"Remove my request to vote later",
52 module = "interest",
53 action = "update_voting_requested",
54 params = { issue_id = issue.id, voting_requested = nil },
55 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
56 }
57 slot.put("<br />")
58 end
59 }
60 end
61 }
62 end)
63 else
64 if not issue.closed and not issue.half_frozen then
65 ui.link{
66 image = { static = "icons/16/clock_play.png" },
67 text = _"Vote later",
68 module = "interest",
69 action = "update_voting_requested",
70 params = {
71 issue_id = issue.id,
72 voting_requested = false
73 },
74 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
75 }
76 end
77 end

Impressum / About Us