liquid_feedback_frontend
diff app/main/index/email_unconfirmed.lua @ 558:18e8de7a2b6a
Show notifications on start page as ulli list with links instead of tabs
author | bsw |
---|---|
date | Tue Jun 19 21:20:46 2012 +0200 (2012-06-19) |
parents | |
children | 418b590fa9ed |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/index/email_unconfirmed.lua Tue Jun 19 21:20:46 2012 +0200 1.3 @@ -0,0 +1,51 @@ 1.4 +if app.session.member.notify_email_unconfirmed then 1.5 + 1.6 + local current = Member:new_selector() 1.7 + :add_where{ "id = ?", app.session.member_id } 1.8 + :add_where("notify_email_unconfirmed NOTNULL") 1.9 + :add_where("notify_email_secret_expiry > now()") 1.10 + :optional_object_mode() 1.11 + :exec() 1.12 + 1.13 + slot.select("title", function() 1.14 + ui.tag{ content = _"Notification address unconfirmed" } 1.15 + end ) 1.16 + 1.17 + if current then 1.18 + ui.tag{ 1.19 + tag = "div", 1.20 + content = _("You didn't confirm your email address '#{email}'. You have received an email with an activation link.", { email = app.session.member.notify_email_unconfirmed }) 1.21 + } 1.22 + else 1.23 + ui.tag{ 1.24 + tag = "div", 1.25 + content = _("You didn't confirm your email address '#{email}' within 7 days.", { email = app.session.member.notify_email_unconfirmed }) 1.26 + } 1.27 + end 1.28 + slot.put("<br />") 1.29 + 1.30 + ui.link{ 1.31 + text = _"Change email address", 1.32 + module = "member", 1.33 + view = "settings_email", 1.34 + } 1.35 + slot.put("<br />") 1.36 + slot.put("<br />") 1.37 + 1.38 + ui.link{ 1.39 + text = _("Resend activation email to '#{email}'", { email = app.session.member.notify_email_unconfirmed }), 1.40 + module = "member", 1.41 + action = "update_email", 1.42 + params = { 1.43 + resend = true 1.44 + }, 1.45 + routing = { 1.46 + default = { 1.47 + mode = "redirect", 1.48 + module = "index", 1.49 + view = "index" 1.50 + } 1.51 + } 1.52 + } 1.53 + 1.54 +end