bsw/jbe@19: local area = param.get("area", "table") or Area:by_id(param.get("area_id", atom.integer)) bsw/jbe@19: bsw/jbe@19: local issues_selector = area:get_reference_selector("issues") bsw/jbe@19: local members_selector = area:get_reference_selector("members") bsw/jbe@19: local delegations_selector = area:get_reference_selector("delegations") bsw/jbe@19: bsw/jbe@19: ui.tabs{ bsw/jbe@19: module = "area", bsw/jbe@19: view = "show_tab", bsw/jbe@19: static_params = { area_id = area.id }, bsw/jbe@19: { bsw/jbe@19: name = "issues", bsw/jbe@19: label = _"Issues" .. " (" .. tostring(issues_selector:count()) .. ")", bsw/jbe@19: icon = { static = "icons/16/folder.png" }, bsw/jbe@19: module = "issue", bsw/jbe@19: view = "_list", bsw/jbe@19: params = { bsw/jbe@19: issues_selector = issues_selector, bsw/jbe@19: filter = cgi.params["filter"], bsw/jbe@19: filter_voting = param.get("filter_voting") bsw/jbe@19: } bsw/jbe@19: }, bsw/jbe@19: { bsw/jbe@19: name = "members", bsw/jbe@19: label = _"Members" .. " (" .. tostring(members_selector:count()) .. ")", bsw/jbe@19: icon = { static = "icons/16/group.png" }, bsw/jbe@19: module = "member", bsw/jbe@19: view = "_list", bsw/jbe@19: params = { members_selector = members_selector } bsw/jbe@19: }, bsw/jbe@19: { bsw/jbe@19: name = "delegations", bsw/jbe@19: label = _"Delegations" .. " (" .. tostring(delegations_selector:count()) .. ")", bsw/jbe@19: icon = { static = "icons/16/table_go.png" }, bsw/jbe@19: module = "delegation", bsw/jbe@19: view = "_list", bsw/jbe@19: params = { delegations_selector = delegations_selector } bsw/jbe@19: }, bsw/jbe@19: } bsw/jbe@19: