liquid_feedback_frontend

diff app/main/delegation/new.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/new.lua	Fri Sep 24 14:49:36 2010 +0200
     1.2 +++ b/app/main/delegation/new.lua	Mon Oct 04 17:51:29 2010 +0200
     1.3 @@ -10,6 +10,8 @@
     1.4    util.help("delegation.new.issue")
     1.5  end
     1.6  
     1.7 +local initiative = Initiative:by_id(param.get("initiative_id", atom.integer))
     1.8 +
     1.9  if not area and not issue then
    1.10    slot.put_into("title", encode.html(_"Set global delegation"))
    1.11    util.help("delegation.new.global")
    1.12 @@ -80,9 +82,21 @@
    1.13          name = _"No delegation"
    1.14        }
    1.15      }
    1.16 +
    1.17      for i, record in ipairs(contact_members) do
    1.18        records[#records+1] = record
    1.19      end
    1.20 +    disabled_records = {}
    1.21 +    -- add initiative authors
    1.22 +    if initiative then
    1.23 +      records[#records+1] = {id="_", name=_"--- Initiators ---"}
    1.24 +      disabled_records["_"] = true
    1.25 +      for i,record in ipairs(initiative.initiators) do
    1.26 +        trace.debug(record)
    1.27 +        trace.debug(record.member.name)
    1.28 +        records[#records+1] = record.member
    1.29 +      end
    1.30 +    end
    1.31  
    1.32      ui.field.select{
    1.33        label = _"Trustee",
    1.34 @@ -90,7 +104,9 @@
    1.35        foreign_records = records,
    1.36        foreign_id = "id",
    1.37        foreign_name = "name",
    1.38 +      disabled_records = disabled_records
    1.39      }
    1.40 +
    1.41      ui.submit{ text = _"Save" }
    1.42    end
    1.43  }

Impressum / About Us