liquid_feedback_frontend
diff app/main/index/_sidebar_whatcanido.lua @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
author | bsw/jbe |
---|---|
date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
parents | 2d038d3ae153 |
children | 860e45ecd44e |
line diff
1.1 --- a/app/main/index/_sidebar_whatcanido.lua Thu Jun 23 03:30:57 2016 +0200 1.2 +++ b/app/main/index/_sidebar_whatcanido.lua Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -1,84 +1,116 @@ 1.4 -ui.sidebar ( "tab-whatcanido", function () 1.5 - 1.6 - ui.sidebarHeadWhatCanIDo() 1.7 +ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() 1.8 + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() 1.9 + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"What can I do here?" } 1.10 + end } 1.11 + ui.container{ attr = { class = "what-can-i-do-here" }, content = function() 1.12 1.13 - if app.session.member then 1.14 - ui.sidebarSection( function() 1.15 - ui.heading { level = 3, content = _"I want to know whats going on" } 1.16 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.17 - ui.tag { tag = "li", content = _"take a look on the issues (see left)" } 1.18 - ui.tag { tag = "li", content = _"by default only those issues are shown, for which your are eligible to participate (change filters on top of the list)" } 1.19 - end } 1.20 - end ) 1.21 - ui.sidebarSection( function() 1.22 - ui.heading { level = 3, content = _"I want to stay informed" } 1.23 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.24 - ui.tag { tag = "li", content = function () 1.25 - ui.tag{ content = _"check your " } 1.26 - ui.link{ 1.27 - module = "member", view = "settings_notification", 1.28 - params = { return_to = "home" }, 1.29 - text = _"notifications settings" 1.30 - } 1.31 - end } 1.32 - ui.tag { tag = "li", content = function () 1.33 - ui.tag{ content = _"subscribe subject areas or add your interested to issues and you will be notified about changes (follow the instruction on the area or issue page)" } 1.34 - end } 1.35 - end } 1.36 - end ) 1.37 - ui.sidebarSection( function() 1.38 - ui.heading { level = 3, content = _"I want to start a new initiative" } 1.39 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.40 - ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." } 1.41 - end } 1.42 - end ) 1.43 - ui.sidebarSection( function() 1.44 - ui.heading { level = 3, content = _"I want to delegate my vote" } 1.45 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.46 - ui.tag { tag = "li", content = _"open the organizational unit, subject area or issue you like to delegate and follow the instruction on that page." } 1.47 - end } 1.48 - end ) 1.49 - ui.sidebarSection( function() 1.50 - ui.heading { level = 3, content = _"I want to take a look at other organizational units" } 1.51 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.52 - ui.tag { tag = "li", content = function () 1.53 - ui.link{ 1.54 - module = "unit", view = "list", 1.55 - text = _"show all units" 1.56 - } 1.57 - end } 1.58 - end } 1.59 - end ) 1.60 - if config.download_dir then 1.61 - ui.sidebarSection( function() 1.62 - ui.heading { level = 3, content = _"I want to download all data" } 1.63 + if app.session.member then 1.64 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.65 + ui.tag{ content = _"I want to know whats going on" } 1.66 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.67 + ui.tag { tag = "li", content = _"take a look on the issues (see right)" } 1.68 + ui.tag { tag = "li", content = _"by default only those issues are shown, for which your are eligible to participate (change filters on top of the list)" } 1.69 + end } 1.70 + end } 1.71 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.72 + ui.tag{ content = _"I want to stay informed" } 1.73 ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.74 ui.tag { tag = "li", content = function () 1.75 + ui.tag{ content = _"check your " } 1.76 ui.link{ 1.77 - module = "index", view = "download", 1.78 - text = _"download database" 1.79 + module = "member", view = "settings_notification", 1.80 + params = { return_to = "home" }, 1.81 + text = _"notifications settings" 1.82 } 1.83 end } 1.84 + if not config.voting_only then 1.85 + ui.tag { tag = "li", content = function () 1.86 + ui.tag{ content = _"subscribe subject areas or add your interested to issues and you will be notified about changes (follow the instruction on the area or issue page)" } 1.87 + end } 1.88 + end 1.89 + end } 1.90 + end } 1.91 + if app.session.member.has_voting_right then 1.92 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.93 + ui.tag{ content = _"I want to vote" } 1.94 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.95 + ui.tag { tag = "li", content = _"check the issues on the right, and click on 'Vote now' to vote on an issue which is in voting phase." } 1.96 + end } 1.97 + end } 1.98 + if not config.disable_delegations then 1.99 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.100 + ui.tag{ content = _"I want to delegate my vote" } 1.101 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.102 + ui.tag { tag = "li", content = _"open the organizational unit, subject area or issue you like to delegate and follow the instruction on that page." } 1.103 + end } 1.104 + end } 1.105 + end 1.106 + end 1.107 + if not config.voting_only and app.session.member.has_initiative_right then 1.108 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.109 + ui.tag{ content = _"I want to start a new initiative" } 1.110 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.111 + ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." } 1.112 + end } 1.113 + end } 1.114 + end 1.115 + if not config.single_unit_id then 1.116 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.117 + ui.tag{ content = _"I want to take a look at other organizational units" } 1.118 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.119 + ui.tag { tag = "li", content = function () 1.120 + ui.link{ 1.121 + module = "unit", view = "list", 1.122 + text = _"show all units" 1.123 + } 1.124 + end } 1.125 + end } 1.126 + end } 1.127 + end 1.128 + if config.download_dir then 1.129 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.130 + ui.tag{ content = _"I want to download all data" } 1.131 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.132 + ui.tag { tag = "li", content = function () 1.133 + ui.link{ 1.134 + module = "index", view = "download", 1.135 + text = _"download database" 1.136 + } 1.137 + end } 1.138 + end } 1.139 + end } 1.140 + end 1.141 + end 1.142 + if not app.session.member then 1.143 + ui.container { attr = { class = "mdl-card__content mdl-card--border" }, content = function () 1.144 + ui.tag{ content = _"You are not entitled to vote in this unit" } 1.145 + ui.tag{ tag = "ul", content = function() 1.146 + ui.tag{ tag = "li", content = function() 1.147 + ui.link{ module = "index", view = "login", content = _"Login" } 1.148 + end } 1.149 + end } 1.150 + end } 1.151 + end 1.152 + if not config.voting_only then 1.153 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.154 + ui.tag{ content = _"I want to learn more about LiquidFeedback" } 1.155 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.156 + ui.tag { tag = "li", content = function() 1.157 + ui.link { module = "help", view = "introduction", content = _"structured discussion" } 1.158 + end } 1.159 + ui.tag { tag = "li", content = function() 1.160 + ui.link { module = "help", view = "introduction", content = _"4 phases of a decision" } 1.161 + end } 1.162 + if not config.disable_delegations then 1.163 + ui.tag { tag = "li", content = function() 1.164 + ui.link { module = "help", view = "introduction", content = _"vote delegation" } 1.165 + end } 1.166 + end 1.167 + ui.tag { tag = "li", content = function() 1.168 + ui.link { module = "help", view = "introduction", content = _"preference voting" } 1.169 + end } 1.170 end } 1.171 - end ) 1.172 + end } 1.173 end 1.174 - end 1.175 - ui.sidebarSection( function() 1.176 - ui.heading { level = 3, content = _"I want to learn more about LiquidFeedback" } 1.177 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.178 - ui.tag { tag = "li", content = function() 1.179 - ui.link { module = "help", view = "introduction", content = _"structured discussion" } 1.180 - end } 1.181 - ui.tag { tag = "li", content = function() 1.182 - ui.link { module = "help", view = "introduction", content = _"4 phases of a decision" } 1.183 - end } 1.184 - ui.tag { tag = "li", content = function() 1.185 - ui.link { module = "help", view = "introduction", content = _"vote delegation" } 1.186 - end } 1.187 - ui.tag { tag = "li", content = function() 1.188 - ui.link { module = "help", view = "introduction", content = _"preference voting" } 1.189 - end } 1.190 - end } 1.191 - end ) 1.192 - 1.193 -end ) 1.194 + end } 1.195 +end }