liquid_feedback_frontend
changeset 292:44f9a09ea51c
Changed colors again, fixed language setting handling for Core 2.0
author | bsw |
---|---|
date | Sat Feb 25 17:34:51 2012 +0100 (2012-02-25) |
parents | 24f8920e05f1 |
children | a72a389399fc |
files | app/main/_filter/20_session.lua app/main/index/_action/login.lua app/main/index/_action/set_lang.lua app/main/initiative/_list_element.lua app/main/member/show_tab.lua env/ui/tabs.lua static/style.css |
line diff
1.1 --- a/app/main/_filter/20_session.lua Sat Feb 25 12:48:49 2012 +0100 1.2 +++ b/app/main/_filter/20_session.lua Sat Feb 25 17:34:51 2012 +0100 1.3 @@ -11,11 +11,6 @@ 1.4 1.5 request.set_csrf_secret(app.session.additional_secret) 1.6 1.7 -if not app.session.member.lang then 1.8 - app.session.member.lang = app.session.lang or config.default_lang or "en" 1.9 - app.session.member:save() 1.10 -end 1.11 - 1.12 -locale.set{lang = app.session.member.lang } 1.13 +locale.set{ lang = app.session.lang or config.default_lang or "en" } 1.14 1.15 execute.inner()
2.1 --- a/app/main/index/_action/login.lua Sat Feb 25 12:48:49 2012 +0100 2.2 +++ b/app/main/index/_action/login.lua Sat Feb 25 17:34:51 2012 +0100 2.3 @@ -54,6 +54,11 @@ 2.4 member.last_login = "now" 2.5 member.last_activity = "now" 2.6 member.active = true 2.7 + if member.lang == nil then 2.8 + member.lang = app.session.lang 2.9 + else 2.10 + app.session.lang = member.lang 2.11 + end 2.12 member:save() 2.13 app.session.member = member 2.14 app.session:save()
3.1 --- a/app/main/index/_action/set_lang.lua Sat Feb 25 12:48:49 2012 +0100 3.2 +++ b/app/main/index/_action/set_lang.lua Sat Feb 25 17:34:51 2012 +0100 3.3 @@ -2,7 +2,7 @@ 3.4 if lang == "de" or lang == "en" or lang == "eo" then 3.5 app.session.lang = param.get("lang") 3.6 app.session:save() 3.7 - if app.session.member then 3.8 + if app.session.member_id then 3.9 app.session.member.lang = app.session.lang 3.10 app.session.member:save() 3.11 end
4.1 --- a/app/main/initiative/_list_element.lua Sat Feb 25 12:48:49 2012 +0100 4.2 +++ b/app/main/initiative/_list_element.lua Sat Feb 25 17:34:51 2012 +0100 4.3 @@ -110,6 +110,24 @@ 4.4 id = id, 4.5 params = params, 4.6 } 4.7 + 4.8 + if initiative.is_supporter then 4.9 + slot.put(" ") 4.10 + local label = _"You are supporter of this initiative" 4.11 + ui.image{ 4.12 + attr = { alt = label, title = label }, 4.13 + static = "icons/16/thumb_up_green.png" 4.14 + } 4.15 + end 4.16 + 4.17 + if initiative.is_supporter_via_delegation then 4.18 + slot.put(" ") 4.19 + local label = _"You are supporter of this initiative via delegation" 4.20 + ui.image{ 4.21 + attr = { alt = label, title = label }, 4.22 + static = "icons/16/thumb_up_green.png" 4.23 + } 4.24 + end 4.25 4.26 if initiative.is_initiator then 4.27 slot.put(" ")
5.1 --- a/app/main/member/show_tab.lua Sat Feb 25 12:48:49 2012 +0100 5.2 +++ b/app/main/member/show_tab.lua Sat Feb 25 17:34:51 2012 +0100 5.3 @@ -171,7 +171,9 @@ 5.4 view = "_list", 5.5 params = { 5.6 issues_selector = issues_selector, for_member = member, 5.7 - filter_interest = member.id ~= app.session.member_id and "my" or nil 5.8 + }, 5.9 + link_params = { 5.10 + filter_interest = (member.id ~= app.session.member_id) and "my" or nil, 5.11 }, 5.12 } 5.13
6.1 --- a/env/ui/tabs.lua Sat Feb 25 12:48:49 2012 +0100 6.2 +++ b/env/ui/tabs.lua Sat Feb 25 17:34:51 2012 +0100 6.3 @@ -10,6 +10,12 @@ 6.4 attr = { class = "ui_tabs_links" }, 6.5 content = function() 6.6 for i, tab in ipairs(tabs) do 6.7 + local params = param.get_all_cgi() 6.8 + if tab.link_params then 6.9 + for key, value in pairs(tab.link_params) do 6.10 + params[key] = value 6.11 + end 6.12 + end 6.13 params["tab"] = i > 1 and tab.name or nil 6.14 ui.link{ 6.15 attr = {
7.1 --- a/static/style.css Sat Feb 25 12:48:49 2012 +0100 7.2 +++ b/static/style.css Sat Feb 25 17:34:51 2012 +0100 7.3 @@ -369,22 +369,16 @@ 7.4 } 7.5 7.6 .delegation .head_active, 7.7 -.interest .head_active, 7.8 -.actions .supporter, 7.9 -.actions .potential_supporter { 7.10 +.interest .head_active { 7.11 background-color: #cdf; 7.12 } 7.13 7.14 -.interest .head_active { 7.15 - background-color: #fec; 7.16 -} 7.17 - 7.18 .actions .supporter { 7.19 - background-color: #cfd; 7.20 + background-color: #cdf; 7.21 } 7.22 7.23 .actions .potential_supporter { 7.24 - background-color: #fec; 7.25 + background-color: #cdf; 7.26 } 7.27 7.28 .slot_support .head_initiator { 7.29 @@ -834,7 +828,7 @@ 7.30 .issues .issue.interested .issue_info, 7.31 .issues .issue.interested_by_delegation .issue_info { 7.32 background: -webkit-gradient(linear, left top, left bottom, 7.33 - color-stop(0%,#fec), color-stop(66%,#fff)); 7.34 + color-stop(0%,#cdf), color-stop(66%,#fff)); 7.35 } 7.36 7.37 .issues .issue .issue_info .issue_id { 7.38 @@ -872,15 +866,13 @@ 7.39 } 7.40 7.41 .initiative_link.supported { 7.42 - background-color: #cfd; 7.43 + background-color: #cdf; 7.44 border-radius: 5px; 7.45 - xbackground: -webkit-radial-gradient(center, ellipse cover, #cfd 50%,#fff 100%); /* Chrome10+,Safari5.1+ */ 7.46 } 7.47 7.48 .initiative_link.potentially_supported { 7.49 - background-color: #fec; 7.50 + background-color: #cdf; 7.51 border-radius: 5px; 7.52 - xbackground: -webkit-radial-gradient(center, ellipse cover, #fec 50%,#fff 100%); /* Chrome10+,Safari5.1+ */ 7.53 } 7.54 7.55 .lang_chooser {