liquid_feedback_frontend
view app/main/member/settings_notification.lua @ 311:b3506522d043
Fixed a translation
| author | bsw | 
|---|---|
| date | Mon Feb 27 16:18:56 2012 +0100 (2012-02-27) | 
| parents | ee477a136fd4 | 
| children | 9e6a23f11f32 | 
 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_notification",
    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 = { type = "radio", name = "notification_level", value = "voting" }
    35       }
    36       ui.tag{ content = _"Voting phase" }
    37       ui.tag{ tag = "ul", content = function()
    38         ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
    39       end }
    40     end }
    42     ui.container{ content = function()
    43       ui.tag{
    44         tag = "input", 
    45         attr = { type = "radio", name = "notification_level", value = "frozen" }
    46       }
    47       ui.tag{ content = _"Frozen and voting phase" }
    48       ui.tag{ tag = "ul", content = function()
    49         ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" }
    50         ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" }
    51         ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
    52       end }
    53     end }
    55     ui.container{ content = function()
    56       ui.tag{
    57         tag = "input", 
    58         attr = { type = "radio", name = "notification_level", value = "discussion" }
    59       }
    60       ui.tag{ content = _"Discussion, frozen and voting phase" }
    61       ui.tag{ tag = "ul", content = function()
    62         ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'discussion'" }
    63         ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" }
    64         ui.tag{ tag = "li", content = _"The draft of an initiative I'm supporting is updated" }
    65         ui.tag{ tag = "li", content = _"An initiative I was supporting is revoked" }
    66         ui.tag{ tag = "li", content = _"A new suggestion is created in an initiative I'm supporting" }
    67         ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" }
    68         ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
    69       end }
    70     end }
    72     ui.container{ content = function()
    73       ui.tag{
    74         tag = "input", 
    75         attr = { type = "radio", name = "notification_level", value = "any" }
    76       }
    77       ui.tag{ content = _"Any phase" }
    78       ui.tag{ tag = "ul", content = function()
    79         ui.tag{ tag = "li", content = _"A new issue is created in one of my areas" }
    80         ui.tag{ tag = "li", content = _"An issue in one of my areas or i'm interested in enters phase 'discussion'" }
    81         ui.tag{ tag = "li", content = _"A new initiative is created in an issue I'm interested in" }
    82         ui.tag{ tag = "li", content = _"The draft of an initiative I'm supporting is updated" }
    83         ui.tag{ tag = "li", content = _"An initiative I was supporting is revoked" }
    84         ui.tag{ tag = "li", content = _"A new suggestion is created in an initiative I'm supporting" }
    85         ui.tag{ tag = "li", content = _"An issue in one of my areas or I'm interested in enters phase 'frozen'" }
    86         ui.tag{ tag = "li", content = _"Voting of an issue in one of my areas or I'm interested in starts" }
    87       end }
    88     end }
    90     ui.container{ content = function()
    91       ui.tag{
    92         tag = "input", 
    93         attr = { type = "radio", name = "notification_level", value = "none" }
    94       }
    95       ui.tag{ content = _"No notifications at all" }
    96     end }
   100     ui.submit{ value = _"Change display settings" }
   101   end
   102 }
   104 -- 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;
