liquid_feedback_frontend

changeset 574:e7baf2713987

Make direct delegation to initiator work again
author bsw
date Tue Jun 19 23:42:13 2012 +0200 (2012-06-19)
parents b8e72db6dd0d
children 5650f8163a29
files app/main/delegation/show.lua app/main/initiative/_show.lua app/main/issue/_show.lua
line diff
     1.1 --- a/app/main/delegation/show.lua	Tue Jun 19 23:37:20 2012 +0200
     1.2 +++ b/app/main/delegation/show.lua	Tue Jun 19 23:42:13 2012 +0200
     1.3 @@ -169,16 +169,11 @@
     1.4        }
     1.5  
     1.6      end
     1.7 -    -- add saved members
     1.8 +    -- add current trustee
     1.9      if current_trustee_id then
    1.10        records[#records+1] = {id="_", name= "--- " .. _"Current trustee" .. " ---"}
    1.11        records[#records+1] = { id = current_trustee_id, name = current_trustee_name }
    1.12      end
    1.13 -    -- add saved members
    1.14 -    records[#records+1] = {id="_", name= "--- " .. _"Saved contacts" .. " ---"}
    1.15 -    for i, record in ipairs(contact_members) do
    1.16 -      records[#records+1] = record
    1.17 -    end
    1.18      -- add initiative authors
    1.19      if initiative then
    1.20        records[#records+1] = {id="_", name= "--- " .. _"Initiators" .. " ---"}
    1.21 @@ -186,6 +181,11 @@
    1.22          records[#records+1] = record.member
    1.23        end
    1.24      end
    1.25 +    -- add saved members
    1.26 +    records[#records+1] = {id="_", name= "--- " .. _"Saved contacts" .. " ---"}
    1.27 +    for i, record in ipairs(contact_members) do
    1.28 +      records[#records+1] = record
    1.29 +    end
    1.30  
    1.31      disabled_records = {}
    1.32      disabled_records["_"] = true
     2.1 --- a/app/main/initiative/_show.lua	Tue Jun 19 23:37:20 2012 +0200
     2.2 +++ b/app/main/initiative/_show.lua	Tue Jun 19 23:42:13 2012 +0200
     2.3 @@ -19,7 +19,8 @@
     2.4      view = "_show",
     2.5      params = {
     2.6        issue = initiative.issue,
     2.7 -      initiative_limit = 3
     2.8 +      initiative_limit = 3,
     2.9 +      for_initiative = initiative
    2.10      }
    2.11    }
    2.12  end)
     3.1 --- a/app/main/issue/_show.lua	Tue Jun 19 23:37:20 2012 +0200
     3.2 +++ b/app/main/issue/_show.lua	Tue Jun 19 23:42:13 2012 +0200
     3.3 @@ -1,6 +1,8 @@
     3.4  local issue = param.get("issue", "table")
     3.5  local initiative_limit = param.get("initiative_limit", atom.integer)
     3.6  local for_listing = param.get("for_listing", atom.boolean)
     3.7 +local for_initiative = param.get("for_initiative", "table")
     3.8 +local for_initiative_id = for_initiative and for_initiative.id or nil
     3.9  
    3.10  local direct_voter
    3.11  if app.session.member_id then
    3.12 @@ -133,9 +135,9 @@
    3.13  
    3.14      if not issue.closed and app.session.member_id and app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
    3.15        if issue.member_info.own_delegation_scope ~= "issue" then
    3.16 -        links[#links+1] = { text = _"Delegate issue", module = "delegation", view = "show", params = { issue_id = issue.id } }
    3.17 +        links[#links+1] = { text = _"Delegate issue", module = "delegation", view = "show", params = { issue_id = issue.id, initiative_id = for_initiative_id } }
    3.18        else
    3.19 -        links[#links+1] = { text = _"Change issue delegation", module = "delegation", view = "show", params = { issue_id = issue.id } }
    3.20 +        links[#links+1] = { text = _"Change issue delegation", module = "delegation", view = "show", params = { issue_id = issue.id, initiative_id = for_initiative_id } }
    3.21        end
    3.22      end
    3.23  

Impressum / About Us