liquid_feedback_frontend
diff app/main/delegation/_show_box.lua @ 120:e5a221e57dc6
merge
author | bsw |
---|---|
date | Mon Oct 04 17:51:29 2010 +0200 (2010-10-04) |
parents | bf885faf3452 |
children | 02aacb3dffe0 |
line diff
1.1 --- a/app/main/delegation/_show_box.lua Fri Sep 24 14:49:36 2010 +0200 1.2 +++ b/app/main/delegation/_show_box.lua Mon Oct 04 17:51:29 2010 +0200 1.3 @@ -1,4 +1,4 @@ 1.4 -function change_delegation(scope, area_id, issue, delegation) 1.5 +function change_delegation(scope, area_id, issue, delegation, initiative_id) 1.6 local image 1.7 local text 1.8 if scope == "global" and delegation then 1.9 @@ -34,6 +34,7 @@ 1.10 view = "new", 1.11 params = { 1.12 issue_id = issue and issue.id or nil, 1.13 + initiative_id = initiative_id or nil, 1.14 area_id = area_id 1.15 }, 1.16 } 1.17 @@ -62,11 +63,13 @@ 1.18 local delegation 1.19 local area_id 1.20 local issue_id 1.21 +local initiative_id 1.22 1.23 local scope = "global" 1.24 1.25 if param.get("initiative_id", atom.integer) then 1.26 - issue_id = Initiative:by_id(param.get("initiative_id", atom.integer)).issue_id 1.27 + initiative_id = param.get("initiative_id", atom.integer) 1.28 + issue_id = Initiative:by_id(initiative_id).issue_id 1.29 scope = "issue" 1.30 end 1.31 1.32 @@ -84,6 +87,7 @@ 1.33 1.34 local delegation 1.35 local issue 1.36 + 1.37 if issue_id then 1.38 issue = Issue:by_id(issue_id) 1.39 delegation = Delegation:by_pk(app.session.member.id, nil, issue_id) 1.40 @@ -149,7 +153,7 @@ 1.41 :exec() 1.42 1.43 if not issue or (issue.state ~= "finished" and issue.state ~= "cancelled") then 1.44 - change_delegation(scope, area_id, issue, delegation) 1.45 + change_delegation(scope, area_id, issue, delegation, initiative_id) 1.46 end 1.47 1.48 for i, record in ipairs(delegation_chain) do 1.49 @@ -210,6 +214,6 @@ 1.50 end 1.51 } 1.52 else 1.53 - change_delegation(scope, area_id, issue) 1.54 + change_delegation(scope, area_id, issue, nil, initiative_id) 1.55 end 1.56 end)