liquid_feedback_frontend
view app/main/delegation/show_incoming.lua @ 1045:701a5cf6b067
Imported LiquidFeedback Frontend 3.0 branch
author | bsw |
---|---|
date | Thu Jul 10 01:19:48 2014 +0200 (2014-07-10) |
parents | |
children |
line source
1 local issue = Issue:by_id(param.get("issue_id", atom.integer))
3 local member = Member:by_id(param.get("member_id", atom.integer))
5 local members_selector = Member:new_selector()
6 :join("delegating_interest_snapshot", nil, "delegating_interest_snapshot.member_id = member.id")
7 :join("issue", nil, "issue.id = delegating_interest_snapshot.issue_id")
8 :add_where{ "delegating_interest_snapshot.issue_id = ?", issue.id }
9 :add_where{ "delegating_interest_snapshot.event = ?", issue.latest_snapshot_event }
10 :add_where{ "delegating_interest_snapshot.delegate_member_ids[1] = ?", member.id }
11 :add_field{ "delegating_interest_snapshot.weight" }
14 execute.view {
15 module = "issue", view = "_head", params = {
16 issue = issue
17 }
18 }
20 ui.section( function()
22 ui.sectionHead( function()
23 ui.heading{ level = 1, content = _("Incoming delegations for '#{member_name}'", { member_name = member.name } ) }
24 end)
26 execute.view{
27 module = "member",
28 view = "_list",
29 params = {
30 members_selector = members_selector,
31 issue = issue,
32 trustee = member
33 }
34 }
35 end )