liquid_feedback_frontend
diff app/main/member/settings_notification.lua @ 474:4e5bb26f0335
Notifications settings page is much easier now
| author | bsw | 
|---|---|
| date | Wed Mar 14 18:54:55 2012 +0100 (2012-03-14) | 
| parents | 9e6a23f11f32 | 
| children | 0fce0bdf7ce1 | 
   line diff
1.1 --- a/app/main/member/settings_notification.lua Wed Mar 14 18:41:56 2012 +0100 1.2 +++ b/app/main/member/settings_notification.lua Wed Mar 14 18:54:55 2012 +0100 1.3 @@ -26,92 +26,93 @@ 1.4 } 1.5 }, 1.6 content = function() 1.7 - ui.tag{ tag = "p", _"Send me notifications about issues in following phases:" } 1.8 + ui.tag{ tag = "p", content = _"I like to receive notifications about events in my areas and issues:" } 1.9 1.10 ui.container{ content = function() 1.11 ui.tag{ 1.12 tag = "input", 1.13 attr = { 1.14 - type = "radio", name = "notify_level", value = "voting", 1.15 - checked = app.session.member.notify_level == 'voting' and "checked" or nil 1.16 + id = "notify_level_none", 1.17 + type = "radio", name = "notify_level", value = "none", 1.18 + checked = app.session.member.notify_level == 'none' and "checked" or nil 1.19 } 1.20 } 1.21 - ui.tag{ content = _"Voting phase" } 1.22 - ui.tag{ tag = "ul", content = function() 1.23 - ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" } 1.24 - end } 1.25 + ui.tag{ 1.26 + tag = "label", attr = { ['for'] = "notify_level_none" }, 1.27 + content = _"No notifications at all" 1.28 + } 1.29 end } 1.30 - 1.31 + 1.32 + slot.put("<br />") 1.33 + 1.34 ui.container{ content = function() 1.35 ui.tag{ 1.36 tag = "input", 1.37 attr = { 1.38 - type = "radio", name = "notify_level", value = "verification", 1.39 - checked = app.session.member.notify_level == 'verification' and "checked" or nil 1.40 + id = "notify_level_all", 1.41 + type = "radio", name = "notify_level", value = "all", 1.42 + checked = app.session.member.notify_level == 'all' and "checked" or nil 1.43 } 1.44 } 1.45 - ui.tag{ content = _"Frozen and voting phase" } 1.46 - ui.tag{ tag = "ul", content = function() 1.47 - ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" } 1.48 - ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" } 1.49 - ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" } 1.50 - end } 1.51 + ui.tag{ 1.52 + tag = "label", attr = { ['for'] = "notify_level_all" }, 1.53 + content = _"All of them" 1.54 + } 1.55 end } 1.56 + 1.57 + slot.put("<br />") 1.58 1.59 ui.container{ content = function() 1.60 ui.tag{ 1.61 tag = "input", 1.62 attr = { 1.63 + id = "notify_level_discussion", 1.64 type = "radio", name = "notify_level", value = "discussion", 1.65 checked = app.session.member.notify_level == 'discussion' and "checked" or nil 1.66 } 1.67 } 1.68 - ui.tag{ content = _"Discussion, frozen and voting phase" } 1.69 - ui.tag{ tag = "ul", content = function() 1.70 - ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'discussion'" } 1.71 - ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" } 1.72 - ui.tag{ tag = "li", content = _"The draft of an initiative I'm supporting is updated" } 1.73 - ui.tag{ tag = "li", content = _"An initiative I was supporting is revoked" } 1.74 - ui.tag{ tag = "li", content = _"A new suggestion is created in an initiative I'm supporting" } 1.75 - ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" } 1.76 - ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" } 1.77 - end } 1.78 + ui.tag{ 1.79 + tag = "label", attr = { ['for'] = "notify_level_discussion" }, 1.80 + content = _"Only for issues reaching the discussion phase" 1.81 + } 1.82 end } 1.83 1.84 + slot.put("<br />") 1.85 + 1.86 ui.container{ content = function() 1.87 ui.tag{ 1.88 tag = "input", 1.89 attr = { 1.90 - type = "radio", name = "notify_level", value = "all", 1.91 - checked = app.session.member.notify_level == 'all' and "checked" or nil 1.92 + id = "notify_level_verification", 1.93 + type = "radio", name = "notify_level", value = "verification", 1.94 + checked = app.session.member.notify_level == 'verification' and "checked" or nil 1.95 } 1.96 } 1.97 - ui.tag{ content = _"Any phase" } 1.98 - ui.tag{ tag = "ul", content = function() 1.99 - ui.tag{ tag = "li", content = _"A new issue is created in one of my areas" } 1.100 - ui.tag{ tag = "li", content = _"An issue in one of my areas or i'm interested in enters phase 'discussion'" } 1.101 - ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" } 1.102 - ui.tag{ tag = "li", content = _"The draft of an initiative I'm supporting is updated" } 1.103 - ui.tag{ tag = "li", content = _"An initiative I was supporting is revoked" } 1.104 - ui.tag{ tag = "li", content = _"A new suggestion is created in an initiative I'm supporting" } 1.105 - ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" } 1.106 - ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" } 1.107 - end } 1.108 + ui.tag{ 1.109 + tag = "label", attr = { ['for'] = "notify_level_verification" }, 1.110 + content = _"Only for issues reaching the frozen phase" 1.111 + } 1.112 end } 1.113 + 1.114 + slot.put("<br />") 1.115 1.116 ui.container{ content = function() 1.117 ui.tag{ 1.118 tag = "input", 1.119 attr = { 1.120 - type = "radio", name = "notify_level", value = "none", 1.121 - checked = app.session.member.notify_level == 'none' and "checked" or nil 1.122 + id = "notify_level_voting", 1.123 + type = "radio", name = "notify_level", value = "voting", 1.124 + checked = app.session.member.notify_level == 'voting' and "checked" or nil 1.125 } 1.126 } 1.127 - ui.tag{ content = _"No notifications at all" } 1.128 + ui.tag{ 1.129 + tag = "label", attr = { ['for'] = "notify_level_voting" }, 1.130 + content = _"Only for issues reaching the voting phase" 1.131 + } 1.132 end } 1.133 1.134 + slot.put("<br />") 1.135 1.136 - 1.137 ui.submit{ value = _"Change notification settings" } 1.138 end 1.139 }