liquid_feedback_frontend
view app/main/index/_not_voted_issues.lua @ 482:3bc96debbd05
Add more missing group by clauses for search selectors
| author | bsw | 
|---|---|
| date | Thu Mar 15 13:23:42 2012 +0100 (2012-03-15) | 
| parents | 87c33552f406 | 
| children | 
 line source
     1 local areas = param.get("areas", "table")
     3 if #areas > 0 then
     4   ui.container{
     5     attr = { style = "font-weight: bold;" },
     6     content = _"Current votings in areas you are member of and issues you are interested in:"
     7   }
     9   ui.list{
    10     records = areas,
    11     columns = {
    12       {
    13         name = "name"
    14       },
    15       {
    16         content = function(record)
    17           if record.is_member and record.issues_to_vote_count > 0 then
    18             ui.link{
    19               content = function()
    20                 if record.issues_to_vote_count > 1 then
    21                   slot.put(_("#{issues_to_vote_count} issue(s)", { issues_to_vote_count = record.issues_to_vote_count }))
    22                 else
    23                   slot.put(_("One issue"))
    24                 end
    25               end,
    26               module = "area",
    27               view = "show",
    28               id = record.id,
    29               params = { 
    30                 tab = "open",
    31                 filter = "frozen",
    32                 filter_interest = "any",
    33                 filter_voting = "not_voted"
    34               }
    35             }
    36           else
    37             slot.put(_"Not a member")
    38           end
    39         end
    40       },
    41       {
    42         content = function(record)
    43           if record.interested_issues_to_vote_count > 0 then
    44             ui.link{
    45               content = function()
    46                 if record.interested_issues_to_vote_count > 1 then
    47                   slot.put(_("#{interested_issues_to_vote_count} issue(s) you are interested in", { interested_issues_to_vote_count = record.interested_issues_to_vote_count }))
    48                 else
    49                   slot.put(_"One issue you are interested in")
    50                 end
    51               end,
    52               module = "area",
    53               view = "show",
    54               id = record.id,
    55               params = { 
    56                 tab = "open",
    57                 filter = "frozen",
    58                 filter_interest = "issue",
    59                 filter_voting = "not_voted"
    60               }
    61             }
    62           end
    63         end
    64       },
    65     }
    66   }
    67 end
