bsw@57: local areas = param.get("areas", "table") bsw@57: bsw@57: if #areas > 0 then bsw@57: ui.container{ bsw@57: attr = { style = "font-weight: bold;" }, bsw@57: content = _"Current votings in areas you are member of and issues you are interested in:" bsw@57: } bsw@57: bsw@57: ui.list{ bsw@57: records = areas, bsw@57: columns = { bsw@57: { bsw@57: name = "name" bsw@57: }, bsw@57: { bsw@57: content = function(record) bsw@57: if record.is_member and record.issues_to_vote_count > 0 then bsw@57: ui.link{ bsw@57: content = function() bsw@57: if record.issues_to_vote_count > 1 then bsw@57: slot.put(_("#{issues_to_vote_count} issue(s)", { issues_to_vote_count = record.issues_to_vote_count })) bsw@57: else bsw@57: slot.put(_("One issue")) bsw@57: end bsw@57: end, bsw@57: module = "area", bsw@57: view = "show", bsw@57: id = record.id, bsw@57: params = { bsw@478: tab = "open", bsw@57: filter = "frozen", bsw@478: filter_interest = "any", bsw@57: filter_voting = "not_voted" bsw@57: } bsw@57: } bsw@57: else bsw@57: slot.put(_"Not a member") bsw@57: end bsw@57: end bsw@57: }, bsw@57: { bsw@57: content = function(record) bsw@57: if record.interested_issues_to_vote_count > 0 then bsw@57: ui.link{ bsw@57: content = function() bsw@57: if record.interested_issues_to_vote_count > 1 then bsw@57: slot.put(_("#{interested_issues_to_vote_count} issue(s) you are interested in", { interested_issues_to_vote_count = record.interested_issues_to_vote_count })) bsw@57: else bsw@57: slot.put(_"One issue you are interested in") bsw@57: end bsw@57: end, bsw@57: module = "area", bsw@57: view = "show", bsw@57: id = record.id, bsw@57: params = { bsw@478: tab = "open", bsw@57: filter = "frozen", bsw@478: filter_interest = "issue", bsw@57: filter_voting = "not_voted" bsw@57: } bsw@57: } bsw@57: end bsw@57: end bsw@57: }, bsw@57: } bsw@57: } bsw@57: end