liquid_feedback_frontend
view app/main/initiative/_show_voting.lua @ 154:6b6c82f9ca9f
speedup member image loading when non set
we can add the location of the default file directy instead of going through another slow request
we can add the location of the default file directy instead of going through another slow request
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Fri Oct 08 15:25:10 2010 +0200 (2010-10-08) |
| parents | a6caaff47205 |
| children | 256d9be75916 |
line source
1 local initiative = param.get("initiative", "table")
3 if initiative.revoked then
4 slot.put(_"Not voted (revoked from initiator)")
5 elseif initiative.admitted == false then
6 slot.put(_"Not voted (not admitted)")
7 else
9 execute.view{
10 module = "initiative",
11 view = "_battles",
12 params = { initiative = initiative }
13 }
15 ui.container{
16 attr = { class = "heading" },
17 content = _"Member voting"
18 }
20 execute.view{
21 module = "member",
22 view = "_list",
23 params = {
24 initiative = initiative,
25 members_selector = initiative.issue:get_reference_selector("direct_voters")
26 :left_join("vote", nil, { "vote.initiative_id = ? AND vote.member_id = member.id", initiative.id })
27 :add_field("direct_voter.weight as voter_weight")
28 :add_field("coalesce(vote.grade, 0) as grade")
29 }
30 }
32 end
