liquid_feedback_frontend
view app/main/member/settings_notification.lua @ 434:5a4f5cc161d7
Put admin button to footer
author | bsw |
---|---|
date | Sun Mar 11 09:14:19 2012 +0100 (2012-03-11) |
parents | 9e6a23f11f32 |
children | 4e5bb26f0335 |
line source
1 slot.put_into("title", _"Notification settings")
3 slot.select("actions", function()
4 ui.link{
5 content = function()
6 ui.image{ static = "icons/16/cancel.png" }
7 slot.put(_"Cancel")
8 end,
9 module = "member",
10 view = "settings"
11 }
12 end)
15 util.help("member.settings.notification", _"Notification settings")
17 ui.form{
18 attr = { class = "vertical" },
19 module = "member",
20 action = "update_notify_level",
21 routing = {
22 ok = {
23 mode = "redirect",
24 module = "index",
25 view = "index"
26 }
27 },
28 content = function()
29 ui.tag{ tag = "p", _"Send me notifications about issues in following phases:" }
31 ui.container{ content = function()
32 ui.tag{
33 tag = "input",
34 attr = {
35 type = "radio", name = "notify_level", value = "voting",
36 checked = app.session.member.notify_level == 'voting' and "checked" or nil
37 }
38 }
39 ui.tag{ content = _"Voting phase" }
40 ui.tag{ tag = "ul", content = function()
41 ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
42 end }
43 end }
45 ui.container{ content = function()
46 ui.tag{
47 tag = "input",
48 attr = {
49 type = "radio", name = "notify_level", value = "verification",
50 checked = app.session.member.notify_level == 'verification' and "checked" or nil
51 }
52 }
53 ui.tag{ content = _"Frozen and voting phase" }
54 ui.tag{ tag = "ul", content = function()
55 ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" }
56 ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" }
57 ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
58 end }
59 end }
61 ui.container{ content = function()
62 ui.tag{
63 tag = "input",
64 attr = {
65 type = "radio", name = "notify_level", value = "discussion",
66 checked = app.session.member.notify_level == 'discussion' and "checked" or nil
67 }
68 }
69 ui.tag{ content = _"Discussion, frozen and voting phase" }
70 ui.tag{ tag = "ul", content = function()
71 ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'discussion'" }
72 ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" }
73 ui.tag{ tag = "li", content = _"The draft of an initiative I'm supporting is updated" }
74 ui.tag{ tag = "li", content = _"An initiative I was supporting is revoked" }
75 ui.tag{ tag = "li", content = _"A new suggestion is created in an initiative I'm supporting" }
76 ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" }
77 ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
78 end }
79 end }
81 ui.container{ content = function()
82 ui.tag{
83 tag = "input",
84 attr = {
85 type = "radio", name = "notify_level", value = "all",
86 checked = app.session.member.notify_level == 'all' and "checked" or nil
87 }
88 }
89 ui.tag{ content = _"Any phase" }
90 ui.tag{ tag = "ul", content = function()
91 ui.tag{ tag = "li", content = _"A new issue is created in one of my areas" }
92 ui.tag{ tag = "li", content = _"An issue in one of my areas or i'm interested in enters phase 'discussion'" }
93 ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" }
94 ui.tag{ tag = "li", content = _"The draft of an initiative I'm supporting is updated" }
95 ui.tag{ tag = "li", content = _"An initiative I was supporting is revoked" }
96 ui.tag{ tag = "li", content = _"A new suggestion is created in an initiative I'm supporting" }
97 ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" }
98 ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
99 end }
100 end }
102 ui.container{ content = function()
103 ui.tag{
104 tag = "input",
105 attr = {
106 type = "radio", name = "notify_level", value = "none",
107 checked = app.session.member.notify_level == 'none' and "checked" or nil
108 }
109 }
110 ui.tag{ content = _"No notifications at all" }
111 end }
115 ui.submit{ value = _"Change notification settings" }
116 end
117 }
119 -- select event.id, event.occurrence, membership.member_id NOTNULL as membership, interest.member_id NOTNULL as interest, supporter.member_id NOTNULL as supporter, event.event, event.state, issue.id, initiative.name FROM event JOIN issue ON issue.id = event.issue_id LEFT JOIN membership ON membership.area_id = issue.area_id AND membership.member_id = 41 LEFT JOIN interest ON interest.issue_id = issue.id AND interest.member_id = 41 LEFT JOIN initiative ON initiative.id = event.initiative_id LEFT JOIN supporter ON supporter.initiative_id = initiative.id AND supporter.member_id = 41 WHERE (((event.event = 'issue_state_changed' OR event.event = 'initiative_created_in_new_issue') AND membership.member_id NOTNULL OR interest.member_id NOTNULL) OR (event.event = 'initiative_created_in_existing_issue' AND interest.member_id NOTNULL) OR ((event.event = 'initiative_revoked' OR event.event = 'new_draft_created' OR event.event = 'suggestion_created') AND supporter.member_id NOTNULL)) AND event.id > 7000 ORDER by event.id ASC LIMIT 1;