# HG changeset patch
# User bsw
# Date 1340477812 -7200
# Node ID 487cca534fbe1712d599561c17e36f9301522c29
# Parent 6ccab80399359cc1d90604ef70f4af8f010a8536
Fixed broken unit view on member page. close #1257
diff -r 6ccab8039935 -r 487cca534fbe app/main/index/_member_home.lua
--- a/app/main/index/_member_home.lua Fri Jun 22 17:40:59 2012 +0200
+++ b/app/main/index/_member_home.lua Sat Jun 23 20:56:52 2012 +0200
@@ -2,35 +2,37 @@
local for_member = param.get("for_member", atom.boolean)
local filter_unit = param.get_all_cgi()["filter_unit"] or "personal"
-
-execute.view{
- module = "index", view = "_notifications"
-}
-
-
-ui.container{ attr = { class = "ui_filter_head" }, content = function()
-
- ui.link{
- attr = { class = filter_unit == "personal" and "ui_tabs_link active" or nil },
- text = _"My units and areas",
- module = "index", view = "index", params = { filter_unit = "personal" }
+if not for_member then
+ execute.view{
+ module = "index", view = "_notifications"
}
-
- slot.put(" ")
+
+ ui.container{ attr = { class = "ui_filter_head" }, content = function()
+
+ ui.link{
+ attr = { class = filter_unit == "personal" and "ui_tabs_link active" or nil },
+ text = _"My units and areas",
+ module = "index", view = "index", params = { filter_unit = "personal" }
+ }
+
+ slot.put(" ")
- ui.link{
- attr = { class = filter_unit == "global" and "active" or nil },
- text = _"All units",
- module = "index", view = "index", params = { filter_unit = "global" }
- }
-end }
+ ui.link{
+ attr = { class = filter_unit == "global" and "active" or nil },
+ text = _"All units",
+ module = "index", view = "index", params = { filter_unit = "global" }
+ }
+ end }
+end
-slot.put("
")
-
+ slot.put("
")
-if filter_unit == "global" then
- execute.view{ module = "unit", view = "_list" }
- return
+if not for_member then
+ if filter_unit == "global" then
+ execute.view{ module = "unit", view = "_list" }
+ return
+ end
+
end
local units = Unit:new_selector():exec()
diff -r 6ccab8039935 -r 487cca534fbe app/main/member/_show.lua
--- a/app/main/member/_show.lua Fri Jun 22 17:40:59 2012 +0200
+++ b/app/main/member/_show.lua Sat Jun 23 20:56:52 2012 +0200
@@ -22,8 +22,8 @@
name = "areas",
label = _"Units",
icon = { static = "icons/16/package.png" },
- module = "member",
- view = "_area_list",
+ module = "index",
+ view = "_member_home",
params = { areas_selector = areas_selector, member = member, for_member = true },
}