liquid_feedback_frontend
diff app/main/initiative/_show.lua @ 286:c587d8762e62
Registration process updated for Core 2.0, lockable member fields, notification settings
author | bsw |
---|---|
date | Sat Feb 25 11:51:37 2012 +0100 (2012-02-25) |
parents | 808269b7f41c |
children | 56dc44366c38 |
line diff
1.1 --- a/app/main/initiative/_show.lua Fri Feb 17 15:16:02 2012 +0100 1.2 +++ b/app/main/initiative/_show.lua Sat Feb 25 11:51:37 2012 +0100 1.3 @@ -32,87 +32,86 @@ 1.4 attr = { class = "initiative_name" }, 1.5 content = _("Initiative i#{id}: #{name}", { id = initiative.id, name = initiative.name }) 1.6 } 1.7 - if app.session.member_id or config.public_access == "pseudonym" or config.public_access == "full" then 1.8 - ui.tag{ 1.9 - attr = { class = "initiator_names" }, 1.10 - content = function() 1.11 - for i, initiator in ipairs(initiators) do 1.12 - slot.put(" ") 1.13 - ui.link{ 1.14 - content = function () 1.15 - execute.view{ 1.16 - module = "member_image", 1.17 - view = "_show", 1.18 - params = { 1.19 - member = initiator, 1.20 - image_type = "avatar", 1.21 - show_dummy = true, 1.22 - class = "micro_avatar", 1.23 - popup_text = text 1.24 - } 1.25 +end ) 1.26 + 1.27 +if app.session.member_id or config.public_access == "pseudonym" or config.public_access == "full" then 1.28 + ui.tag{ 1.29 + attr = { class = "initiator_names" }, 1.30 + content = function() 1.31 + for i, initiator in ipairs(initiators) do 1.32 + slot.put(" ") 1.33 + ui.link{ 1.34 + content = function () 1.35 + execute.view{ 1.36 + module = "member_image", 1.37 + view = "_show", 1.38 + params = { 1.39 + member = initiator, 1.40 + image_type = "avatar", 1.41 + show_dummy = true, 1.42 + class = "micro_avatar", 1.43 + popup_text = text 1.44 } 1.45 - end, 1.46 - module = "member", view = "show", id = initiator.id 1.47 - } 1.48 - slot.put(" ") 1.49 - ui.link{ 1.50 - text = initiator.name, 1.51 - module = "member", view = "show", id = initiator.id 1.52 - } 1.53 - if not initiator.accepted then 1.54 - ui.tag{ attr = { title = _"Not accepted yet" }, content = "?" } 1.55 - end 1.56 + } 1.57 + end, 1.58 + module = "member", view = "show", id = initiator.id 1.59 + } 1.60 + slot.put(" ") 1.61 + ui.link{ 1.62 + text = initiator.name, 1.63 + module = "member", view = "show", id = initiator.id 1.64 + } 1.65 + if not initiator.accepted then 1.66 + ui.tag{ attr = { title = _"Not accepted yet" }, content = "?" } 1.67 end 1.68 end 1.69 - } 1.70 - end 1.71 + end 1.72 + } 1.73 +end 1.74 1.75 - if initiator and initiator.accepted and not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then 1.76 +if initiator and initiator.accepted and not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then 1.77 + slot.put(" · ") 1.78 + ui.link{ 1.79 + attr = { class = "action" }, 1.80 + content = function() 1.81 + slot.put(_"Invite initiator") 1.82 + end, 1.83 + module = "initiative", 1.84 + view = "add_initiator", 1.85 + params = { initiative_id = initiative.id } 1.86 + } 1.87 + if #initiators > 1 then 1.88 slot.put(" · ") 1.89 ui.link{ 1.90 - attr = { class = "action" }, 1.91 content = function() 1.92 - slot.put(_"Invite initiator") 1.93 + slot.put(_"Remove initiator") 1.94 end, 1.95 module = "initiative", 1.96 - view = "add_initiator", 1.97 + view = "remove_initiator", 1.98 params = { initiative_id = initiative.id } 1.99 } 1.100 - if #initiators > 1 then 1.101 - slot.put(" · ") 1.102 - ui.link{ 1.103 - content = function() 1.104 - slot.put(_"Remove initiator") 1.105 - end, 1.106 - module = "initiative", 1.107 - view = "remove_initiator", 1.108 - params = { initiative_id = initiative.id } 1.109 - } 1.110 - end 1.111 end 1.112 - if initiator and initiator.accepted == false then 1.113 - slot.put(" · ") 1.114 - ui.link{ 1.115 - text = _"Cancel refuse of invitation", 1.116 - module = "initiative", 1.117 - action = "remove_initiator", 1.118 - params = { 1.119 - initiative_id = initiative.id, 1.120 - member_id = app.session.member.id 1.121 - }, 1.122 - routing = { 1.123 - ok = { 1.124 - mode = "redirect", 1.125 - module = "initiative", 1.126 - view = "show", 1.127 - id = initiative.id 1.128 - } 1.129 +end 1.130 +if initiator and initiator.accepted == false then 1.131 + slot.put(" · ") 1.132 + ui.link{ 1.133 + text = _"Cancel refuse of invitation", 1.134 + module = "initiative", 1.135 + action = "remove_initiator", 1.136 + params = { 1.137 + initiative_id = initiative.id, 1.138 + member_id = app.session.member.id 1.139 + }, 1.140 + routing = { 1.141 + ok = { 1.142 + mode = "redirect", 1.143 + module = "initiative", 1.144 + view = "show", 1.145 + id = initiative.id 1.146 } 1.147 } 1.148 - end 1.149 - 1.150 - 1.151 -end ) 1.152 + } 1.153 +end 1.154 1.155 util.help("initiative.show") 1.156 1.157 @@ -308,3 +307,4 @@ 1.158 end 1.159 1.160 1.161 +