liquid_feedback_frontend

diff app/main/index/_not_voted_issues.lua @ 61:f77ca23f9ebd

merge
author jbe
date Thu Apr 22 16:03:53 2010 +0200 (2010-04-22)
parents 4f39f0a0d5b5
children 87c33552f406
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/index/_not_voted_issues.lua	Thu Apr 22 16:03:53 2010 +0200
     1.3 @@ -0,0 +1,64 @@
     1.4 +local areas = param.get("areas", "table")
     1.5 +
     1.6 +if #areas > 0 then
     1.7 +  ui.container{
     1.8 +    attr = { style = "font-weight: bold;" },
     1.9 +    content = _"Current votings in areas you are member of and issues you are interested in:"
    1.10 +  }
    1.11 +  
    1.12 +  ui.list{
    1.13 +    records = areas,
    1.14 +    columns = {
    1.15 +      {
    1.16 +        name = "name"
    1.17 +      },
    1.18 +      {
    1.19 +        content = function(record)
    1.20 +          if record.is_member and record.issues_to_vote_count > 0 then
    1.21 +            ui.link{
    1.22 +              content = function()
    1.23 +                if record.issues_to_vote_count > 1 then
    1.24 +                  slot.put(_("#{issues_to_vote_count} issue(s)", { issues_to_vote_count = record.issues_to_vote_count }))
    1.25 +                else
    1.26 +                  slot.put(_("One issue"))
    1.27 +                end
    1.28 +              end,
    1.29 +              module = "area",
    1.30 +              view = "show",
    1.31 +              id = record.id,
    1.32 +              params = { 
    1.33 +                filter = "frozen",
    1.34 +                filter_voting = "not_voted"
    1.35 +              }
    1.36 +            }
    1.37 +          else
    1.38 +            slot.put(_"Not a member")
    1.39 +          end
    1.40 +        end
    1.41 +      },
    1.42 +      {
    1.43 +        content = function(record)
    1.44 +          if record.interested_issues_to_vote_count > 0 then
    1.45 +            ui.link{
    1.46 +              content = function()
    1.47 +                if record.interested_issues_to_vote_count > 1 then
    1.48 +                  slot.put(_("#{interested_issues_to_vote_count} issue(s) you are interested in", { interested_issues_to_vote_count = record.interested_issues_to_vote_count }))
    1.49 +                else
    1.50 +                  slot.put(_"One issue you are interested in")
    1.51 +                end
    1.52 +              end,
    1.53 +              module = "area",
    1.54 +              view = "show",
    1.55 +              id = record.id,
    1.56 +              params = { 
    1.57 +                filter = "frozen",
    1.58 +                filter_interest = "my",
    1.59 +                filter_voting = "not_voted"
    1.60 +              }
    1.61 +            }
    1.62 +          end
    1.63 +        end
    1.64 +      },
    1.65 +    }
    1.66 +  }
    1.67 +end

Impressum / About Us