liquid_feedback_frontend
changeset 594:487cca534fbe
Fixed broken unit view on member page. close #1257
author | bsw |
---|---|
date | Sat Jun 23 20:56:52 2012 +0200 (2012-06-23) |
parents | 6ccab8039935 |
children | bc6934411019 |
files | app/main/index/_member_home.lua app/main/member/_show.lua |
line diff
1.1 --- a/app/main/index/_member_home.lua Fri Jun 22 17:40:59 2012 +0200 1.2 +++ b/app/main/index/_member_home.lua Sat Jun 23 20:56:52 2012 +0200 1.3 @@ -2,35 +2,37 @@ 1.4 local for_member = param.get("for_member", atom.boolean) 1.5 local filter_unit = param.get_all_cgi()["filter_unit"] or "personal" 1.6 1.7 - 1.8 -execute.view{ 1.9 - module = "index", view = "_notifications" 1.10 -} 1.11 - 1.12 - 1.13 -ui.container{ attr = { class = "ui_filter_head" }, content = function() 1.14 - 1.15 - ui.link{ 1.16 - attr = { class = filter_unit == "personal" and "ui_tabs_link active" or nil }, 1.17 - text = _"My units and areas", 1.18 - module = "index", view = "index", params = { filter_unit = "personal" } 1.19 +if not for_member then 1.20 + execute.view{ 1.21 + module = "index", view = "_notifications" 1.22 } 1.23 - 1.24 - slot.put(" ") 1.25 + 1.26 + ui.container{ attr = { class = "ui_filter_head" }, content = function() 1.27 + 1.28 + ui.link{ 1.29 + attr = { class = filter_unit == "personal" and "ui_tabs_link active" or nil }, 1.30 + text = _"My units and areas", 1.31 + module = "index", view = "index", params = { filter_unit = "personal" } 1.32 + } 1.33 + 1.34 + slot.put(" ") 1.35 1.36 - ui.link{ 1.37 - attr = { class = filter_unit == "global" and "active" or nil }, 1.38 - text = _"All units", 1.39 - module = "index", view = "index", params = { filter_unit = "global" } 1.40 - } 1.41 -end } 1.42 + ui.link{ 1.43 + attr = { class = filter_unit == "global" and "active" or nil }, 1.44 + text = _"All units", 1.45 + module = "index", view = "index", params = { filter_unit = "global" } 1.46 + } 1.47 + end } 1.48 +end 1.49 1.50 -slot.put("<br />") 1.51 - 1.52 + slot.put("<br />") 1.53 1.54 -if filter_unit == "global" then 1.55 - execute.view{ module = "unit", view = "_list" } 1.56 - return 1.57 +if not for_member then 1.58 + if filter_unit == "global" then 1.59 + execute.view{ module = "unit", view = "_list" } 1.60 + return 1.61 + end 1.62 + 1.63 end 1.64 1.65 local units = Unit:new_selector():exec()
2.1 --- a/app/main/member/_show.lua Fri Jun 22 17:40:59 2012 +0200 2.2 +++ b/app/main/member/_show.lua Sat Jun 23 20:56:52 2012 +0200 2.3 @@ -22,8 +22,8 @@ 2.4 name = "areas", 2.5 label = _"Units", 2.6 icon = { static = "icons/16/package.png" }, 2.7 - module = "member", 2.8 - view = "_area_list", 2.9 + module = "index", 2.10 + view = "_member_home", 2.11 params = { areas_selector = areas_selector, member = member, for_member = true }, 2.12 } 2.13