liquid_feedback_frontend
diff app/main/supporter/_show_box.lua @ 10:72c5e0ee7c98
Version beta6
Bugfixes:
- Security fix: Every user was able to change the discussion URL of an initiative
- Creation of new issues in areas without default policies is now possible
- Members can now be sorted in different ways
- No error when trying to compare a draft with itself
- Added missing local statement to variable initialization in app/main/delegation/new.lua
- CSS flaw in initiative action bar fixed
New features:
- Possiblity to invite other users to become initiator
- Revokation of initiatives implemented
- Number of suggestions, supporters, etc. is shown on corresponding tabs of initiative view
- Members can now be sorted by account creation (default sorting is "newest first")
- Configuration option to create an automatic discussion link for all issues
- First draft of global timeline feature (not accessible via link yet)
- Custom stylesheet URL for users marked as developers
In area listing the number of closed issues is shown too
Renamed "author" field of initiative to "last author"
Removed wrongly included file app/main/member/_show_thumb.lua.orig in the distribution
Help texts updated
Bugfixes:
- Security fix: Every user was able to change the discussion URL of an initiative
- Creation of new issues in areas without default policies is now possible
- Members can now be sorted in different ways
- No error when trying to compare a draft with itself
- Added missing local statement to variable initialization in app/main/delegation/new.lua
- CSS flaw in initiative action bar fixed
New features:
- Possiblity to invite other users to become initiator
- Revokation of initiatives implemented
- Number of suggestions, supporters, etc. is shown on corresponding tabs of initiative view
- Members can now be sorted by account creation (default sorting is "newest first")
- Configuration option to create an automatic discussion link for all issues
- First draft of global timeline feature (not accessible via link yet)
- Custom stylesheet URL for users marked as developers
In area listing the number of closed issues is shown too
Renamed "author" field of initiative to "last author"
Removed wrongly included file app/main/member/_show_thumb.lua.orig in the distribution
Help texts updated
author | bsw |
---|---|
date | Sun Jan 10 12:00:00 2010 +0100 (2010-01-10) |
parents | afd9f769c7ae |
children | 00d1004545f1 |
line diff
1.1 --- a/app/main/supporter/_show_box.lua Mon Jan 04 12:00:00 2010 +0100 1.2 +++ b/app/main/supporter/_show_box.lua Sun Jan 10 12:00:00 2010 +0100 1.3 @@ -3,103 +3,101 @@ 1.4 local initiative = param.get("initiative", "table") 1.5 local supporter = Supporter:by_pk(initiative.id, app.session.member.id) 1.6 1.7 - ui.container{ 1.8 - attr = { class = "actions" }, 1.9 - content = function() 1.10 - if not initiative.issue.fully_frozen and not initiative.issue.closed then 1.11 - if supporter then 1.12 - if not supporter:has_critical_opinion() then 1.13 - ui.container{ 1.14 - attr = { 1.15 - class = "head head_supporter", 1.16 - style = "cursor: pointer;", 1.17 - onclick = "document.getElementById('support_content').style.display = 'block';" 1.18 - }, 1.19 - content = function() 1.20 - ui.image{ 1.21 - static = "icons/16/thumb_up_green.png" 1.22 - } 1.23 - slot.put(_"Your are supporter") 1.24 - ui.image{ 1.25 - static = "icons/16/dropdown.png" 1.26 - } 1.27 - end 1.28 + if not initiative.issue.fully_frozen and not initiative.issue.closed then 1.29 + if supporter then 1.30 + if not supporter:has_critical_opinion() then 1.31 + ui.container{ 1.32 + attr = { 1.33 + class = "head head_supporter", 1.34 + style = "cursor: pointer;", 1.35 + onclick = "document.getElementById('support_content').style.display = 'block';" 1.36 + }, 1.37 + content = function() 1.38 + ui.image{ 1.39 + static = "icons/16/thumb_up_green.png" 1.40 + } 1.41 + slot.put(_"Your are supporter") 1.42 + ui.image{ 1.43 + static = "icons/16/dropdown.png" 1.44 } 1.45 - else 1.46 - ui.container{ 1.47 - attr = { 1.48 - class = "head head_potential_supporter", 1.49 - style = "cursor: pointer;", 1.50 - onclick = "document.getElementById('support_content').style.display = 'block';" 1.51 - }, 1.52 - content = function() 1.53 - ui.image{ 1.54 - static = "icons/16/thumb_up.png" 1.55 - } 1.56 - slot.put(_"Your are potential supporter") 1.57 - ui.image{ 1.58 - static = "icons/16/dropdown.png" 1.59 - } 1.60 - end 1.61 + end 1.62 + } 1.63 + else 1.64 + ui.container{ 1.65 + attr = { 1.66 + class = "head head_potential_supporter", 1.67 + style = "cursor: pointer;", 1.68 + onclick = "document.getElementById('support_content').style.display = 'block';" 1.69 + }, 1.70 + content = function() 1.71 + ui.image{ 1.72 + static = "icons/16/thumb_up.png" 1.73 + } 1.74 + slot.put(_"Your are potential supporter") 1.75 + ui.image{ 1.76 + static = "icons/16/dropdown.png" 1.77 } 1.78 end 1.79 + } 1.80 + end 1.81 + ui.container{ 1.82 + attr = { class = "content", id = "support_content" }, 1.83 + content = function() 1.84 ui.container{ 1.85 - attr = { class = "content", id = "support_content" }, 1.86 + attr = { 1.87 + class = "close", 1.88 + style = "cursor: pointer;", 1.89 + onclick = "document.getElementById('support_content').style.display = 'none';" 1.90 + }, 1.91 content = function() 1.92 - ui.container{ 1.93 - attr = { 1.94 - class = "close", 1.95 - style = "cursor: pointer;", 1.96 - onclick = "document.getElementById('support_content').style.display = 'none';" 1.97 - }, 1.98 - content = function() 1.99 - ui.image{ static = "icons/16/cross.png" } 1.100 - end 1.101 - } 1.102 - if supporter then 1.103 - ui.link{ 1.104 - content = function() 1.105 - ui.image{ static = "icons/16/thumb_down_red.png" } 1.106 - slot.put(_"Remove my support from this initiative") 1.107 - end, 1.108 - module = "initiative", 1.109 - action = "remove_support", 1.110 - id = initiative.id, 1.111 - routing = { 1.112 - default = { 1.113 - mode = "redirect", 1.114 - module = request.get_module(), 1.115 - view = request.get_view(), 1.116 - id = param.get_id_cgi(), 1.117 - params = param.get_all_cgi() 1.118 - } 1.119 - } 1.120 - } 1.121 - else 1.122 - end 1.123 + ui.image{ static = "icons/16/cross.png" } 1.124 end 1.125 } 1.126 - else 1.127 - ui.link{ 1.128 - content = function() 1.129 - ui.image{ static = "icons/16/thumb_up_green.png" } 1.130 - slot.put(_"Support this initiative") 1.131 - end, 1.132 - module = "initiative", 1.133 - action = "add_support", 1.134 - id = initiative.id, 1.135 - routing = { 1.136 - default = { 1.137 - mode = "redirect", 1.138 - module = request.get_module(), 1.139 - view = request.get_view(), 1.140 - id = param.get_id_cgi(), 1.141 - params = param.get_all_cgi() 1.142 + if supporter then 1.143 + ui.link{ 1.144 + content = function() 1.145 + ui.image{ static = "icons/16/thumb_down_red.png" } 1.146 + slot.put(_"Remove my support from this initiative") 1.147 + end, 1.148 + module = "initiative", 1.149 + action = "remove_support", 1.150 + id = initiative.id, 1.151 + routing = { 1.152 + default = { 1.153 + mode = "redirect", 1.154 + module = request.get_module(), 1.155 + view = request.get_view(), 1.156 + id = param.get_id_cgi(), 1.157 + params = param.get_all_cgi() 1.158 + } 1.159 } 1.160 } 1.161 + else 1.162 + end 1.163 + end 1.164 + } 1.165 + else 1.166 + if not initiative.revoked then 1.167 + ui.link{ 1.168 + content = function() 1.169 + ui.image{ static = "icons/16/thumb_up_green.png" } 1.170 + slot.put(_"Support this initiative") 1.171 + end, 1.172 + module = "initiative", 1.173 + action = "add_support", 1.174 + id = initiative.id, 1.175 + routing = { 1.176 + default = { 1.177 + mode = "redirect", 1.178 + module = request.get_module(), 1.179 + view = request.get_view(), 1.180 + id = param.get_id_cgi(), 1.181 + params = param.get_all_cgi() 1.182 + } 1.183 } 1.184 - end 1.185 + } 1.186 end 1.187 end 1.188 - } 1.189 + end 1.190 + 1.191 end)