liquid_feedback_frontend
diff app/main/lf2/index.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/index.lua Mon Mar 07 12:15:22 2011 +0100 1.2 +++ b/app/main/lf2/index.lua Sat Mar 12 19:22:50 2011 +0100 1.3 @@ -1,9 +1,23 @@ 1.4 slot.set_layout("lf2") 1.5 1.6 -local current_phase = param.get("phase") 1.7 -local current_order = param.get("order") 1.8 +local unit = Unit:by_id(param.get_id()) 1.9 + 1.10 +local current_phase = param.get("phase") or "closed" 1.11 +local current_order = param.get("order") or "last_change" 1.12 + 1.13 +if current_phase == "closed" and current_order == "time_left" then 1.14 + current_order = "last_change" 1.15 +end 1.16 + 1.17 +app.topnav_phase = current_phase 1.18 +app.topnav_order = current_order 1.19 +if unit then 1.20 + app.topnav_unit_id = unit.id 1.21 +end 1.22 + 1.23 1.24 local issues_selector = Issue:build_selector{ 1.25 + unit_id = unit and unit.id or nil, 1.26 phase = current_phase, 1.27 order = current_order 1.28 }:limit(25) 1.29 @@ -16,7 +30,7 @@ 1.30 1.31 1.32 slot.select("sidebar", function() 1.33 - execute.view{ module = "lf2", view = "_sidebar_unit" } 1.34 + execute.view{ module = "lf2", view = "_sidebar_unit", params = { unit = unit } } 1.35 end) 1.36 1.37 execute.view{ module = "lf2", view = "_issues", params = { issues = issues } }