liquid_feedback_frontend
view app/main/initiative/_initiators.lua @ 172:165f4bd02cf3
don't show the first draft of a new initiative as a new draft event in the timeline
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Sun Oct 10 19:40:32 2010 +0200 (2010-10-10) |
| parents | 00d1004545f1 |
| children |
line source
1 local initiative = param.get("initiative", "table")
2 local initiator = param.get("initiator", "table")
3 local initiators_members_selector = param.get("initiators_members_selector", "table")
5 local initiator_count = initiators_members_selector:count()
7 if initiator and initiator.accepted and not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then
8 ui.link{
9 attr = { class = "action" },
10 content = function()
11 ui.image{ static = "icons/16/user_add.png" }
12 slot.put(_"Invite initiator")
13 end,
14 module = "initiative",
15 view = "add_initiator",
16 params = { initiative_id = initiative.id }
17 }
18 if initiator_count > 1 then
19 ui.link{
20 content = function()
21 ui.image{ static = "icons/16/user_delete.png" }
22 slot.put(_"Remove initiator")
23 end,
24 module = "initiative",
25 view = "remove_initiator",
26 params = { initiative_id = initiative.id }
27 }
28 end
29 end
30 if initiator and initiator.accepted == false then
31 ui.link{
32 image = { static = "icons/16/user_delete.png" },
33 text = _"Cancel refuse of invitation",
34 module = "initiative",
35 action = "remove_initiator",
36 params = {
37 initiative_id = initiative.id,
38 member_id = app.session.member.id
39 },
40 routing = {
41 ok = {
42 mode = "redirect",
43 module = "initiative",
44 view = "show",
45 id = initiative.id
46 }
47 }
48 }
49 end
51 execute.view{
52 module = "member",
53 view = "_list",
54 params = {
55 members_selector = initiators_members_selector,
56 initiator = initiator
57 }
58 }
