liquid_feedback_frontend

diff app/main/delegation/_list.lua @ 0:3bfb2fcf7ab9

Version alpha1
author bsw/jbe
date Wed Nov 18 12:00:00 2009 +0100 (2009-11-18)
parents
children 5c601807d397
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/delegation/_list.lua	Wed Nov 18 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +local selector = param.get("selector", "table")
     1.5 +
     1.6 +ui.paginate{
     1.7 +  selector = selector,
     1.8 +  content = function()
     1.9 +    ui.list{
    1.10 +      records = selector:exec(),
    1.11 +      columns = {
    1.12 +        {
    1.13 +          label = _"Truster",
    1.14 +          content = function(record)
    1.15 +            ui.link{
    1.16 +              content = record.truster.name,
    1.17 +              module = "member",
    1.18 +              view = "show",
    1.19 +              id = record.truster.id
    1.20 +            }
    1.21 +          end
    1.22 +        },
    1.23 +        {
    1.24 +          label = _"Trustee",
    1.25 +          content = function(record)
    1.26 +            ui.link{
    1.27 +              content = record.trustee.name,
    1.28 +              module = "member",
    1.29 +              view = "show",
    1.30 +              id = record.trustee.id
    1.31 +            }
    1.32 +          end
    1.33 +        },
    1.34 +        {
    1.35 +          label = _"Area",
    1.36 +          content = function(record)
    1.37 +            if record.area then
    1.38 +              ui.field.text{ value = record.area.name }
    1.39 +            end
    1.40 +          end
    1.41 +        },
    1.42 +        {
    1.43 +          label = _"Issue",
    1.44 +          content = function(record)
    1.45 +            if record.issue then
    1.46 +              ui.field.text{ value = record.issue.id }
    1.47 +            end
    1.48 +          end
    1.49 +        },
    1.50 +      }
    1.51 +    }
    1.52 +  end
    1.53 +}

Impressum / About Us