liquid_feedback_frontend
diff app/main/lf2/area.lua @ 217:73dbc9e2bfd4
Cummulative patch for enhancements at next generation frontend
| author | bsw |
|---|---|
| date | Sat Mar 12 19:22:50 2011 +0100 (2011-03-12) |
| parents | 1dab81353eb1 |
| children |
line diff
1.1 --- a/app/main/lf2/area.lua Mon Mar 07 12:15:22 2011 +0100 1.2 +++ b/app/main/lf2/area.lua Sat Mar 12 19:22:50 2011 +0100 1.3 @@ -1,18 +1,12 @@ 1.4 local area = Area:by_id(param.get_id()) 1.5 1.6 -slot.set_layout("lf2") 1.7 - 1.8 -slot.select("sidebar", function() 1.9 - execute.view{ module = "lf2", view = "_sidebar_unit", params = { current_area_id = area.id } } 1.10 -end) 1.11 - 1.12 -execute.view{ module = "lf2", view = "_area", params = { area = area } } 1.13 - 1.14 +local current_phase = param.get("phase") or "closed" 1.15 +local current_order = param.get("order") or "last_change" 1.16 1.17 local issues_selector = Issue:build_selector{ 1.18 area_id = area.id, 1.19 - phase = param.get("phase"), 1.20 - order = param.get("order") 1.21 + phase = current_phase, 1.22 + order = current_order 1.23 }:limit(25) 1.24 1.25 local issues = issues_selector:exec() 1.26 @@ -21,7 +15,18 @@ 1.27 issues:load("interest_for_member", { member_id = app.session.member_id }, "interest") 1.28 issues:load("outgoing_delegations_for_member", { member_id = app.session.member_id }, "outgoing_delegations") 1.29 1.30 +app.topnav_order = current_order 1.31 +app.topnav_phase = current_phase 1.32 +app.topnav_area_id = area.id 1.33 +app.topnav_unit_id = area.unit_id 1.34 1.35 -app.topnav_area_id = area.id 1.36 + 1.37 +slot.set_layout("lf2") 1.38 + 1.39 +slot.select("sidebar", function() 1.40 + execute.view{ module = "lf2", view = "_sidebar_unit", params = { unit = area.unit, current_area_id = area.id } } 1.41 +end) 1.42 + 1.43 +execute.view{ module = "lf2", view = "_area", params = { area = area } } 1.44 1.45 execute.view{ module = "lf2", view = "_issues", params = { issues = issues } }