liquid_feedback_frontend
changeset 373:76d7eafb3893
Make things work with small screens like mobile devices in portrait mode
author | bsw |
---|---|
date | Sat Mar 03 17:28:55 2012 +0100 (2012-03-03) |
parents | 74f768a162e1 |
children | 178136e66341 |
files | app/main/_filter_view/30_navigation.lua app/main/_filter_view/31_logout_button.lua app/main/_layout/default.html app/main/area/_list.lua app/main/initiative/_list_element.lua env/ui/filters.lua static/style.css |
line diff
1.1 --- a/app/main/_filter_view/30_navigation.lua Thu Mar 01 22:56:35 2012 +0100 1.2 +++ b/app/main/_filter_view/30_navigation.lua Sat Mar 03 17:28:55 2012 +0100 1.3 @@ -96,6 +96,22 @@ 1.4 view = 'about' 1.5 } 1.6 1.7 + if app.session.member_id then 1.8 + ui.link{ 1.9 + -- image = { static = "icons/16/stop.png" }, 1.10 + text = _"Logout", 1.11 + module = 'index', 1.12 + action = 'logout', 1.13 + routing = { 1.14 + default = { 1.15 + mode = "redirect", 1.16 + module = "index", 1.17 + view = "index" 1.18 + } 1.19 + } 1.20 + } 1.21 + end 1.22 + 1.23 if app.session.member.admin then 1.24 1.25 slot.put(" ")
2.1 --- a/app/main/_filter_view/31_logout_button.lua Thu Mar 01 22:56:35 2012 +0100 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,22 +0,0 @@ 2.4 -if app.session.member == nil then 2.5 - execute.inner() 2.6 - return 2.7 -end 2.8 - 2.9 -slot.select('logout_button', function() 2.10 - ui.link{ 2.11 --- image = { static = "icons/16/stop.png" }, 2.12 - text = _"Logout", 2.13 - module = 'index', 2.14 - action = 'logout', 2.15 - routing = { 2.16 - default = { 2.17 - mode = "redirect", 2.18 - module = "index", 2.19 - view = "index" 2.20 - } 2.21 - } 2.22 - } 2.23 -end) 2.24 - 2.25 -execute.inner()
3.1 --- a/app/main/_layout/default.html Thu Mar 01 22:56:35 2012 +0100 3.2 +++ b/app/main/_layout/default.html Sat Mar 03 17:28:55 2012 +0100 3.3 @@ -1,6 +1,7 @@ 3.4 <html> 3.5 <head> 3.6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 3.7 + <meta name="viewport" content="width=device-width" /> 3.8 <title> <!-- WEBMCP SLOTNODIV html_title --></title> 3.9 <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/trace.css" /> 3.10 <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/gregor.js/gregor.css" />
4.1 --- a/app/main/area/_list.lua Thu Mar 01 22:56:35 2012 +0100 4.2 +++ b/app/main/area/_list.lua Sat Mar 03 17:28:55 2012 +0100 4.3 @@ -28,271 +28,147 @@ 4.4 areas_selector:add_field("0", "issues_to_vote_count") 4.5 end 4.6 4.7 -local label_attr = { style = "text-align: right; width: 4em;" } 4.8 -local field_attr = { style = "text-align: right; width: 4em;" } 4.9 + 4.10 +ui.container{ attr = { class = "area_list" }, content = function() 4.11 + 4.12 + for i, area in ipairs(areas_selector:exec()) do 4.13 + 4.14 + ui.container{ attr = { class = "area" }, content = function() 4.15 + 4.16 + ui.container{ attr = { class = "info" }, content = function() 4.17 4.18 -ui.list{ 4.19 - attr = { class = "area_list", style = "width: 100%; table-layout: fixed;" }, 4.20 - records = areas_selector:exec(), 4.21 - columns = { 4.22 - { 4.23 - label_attr = { style = "width: 2em;" }, 4.24 - content = function(record) 4.25 - if record.is_member then 4.26 - local text = _"Member of area" 4.27 - ui.image{ 4.28 - attr = { title = text, alt = text, style = "vertical-align: middle;" }, 4.29 - static = "icons/16/user_gray.png", 4.30 - } 4.31 - end 4.32 - end 4.33 - }, 4.34 - { 4.35 - label_attr = { style = "width: 2em;" }, 4.36 - content = function(record) 4.37 - if record.trustee_member_id then 4.38 - local trustee_member = Member:by_id(record.trustee_member_id) 4.39 - local text = _("Area delegated to '#{name}'", { name = record.trustee_member_name }) 4.40 - execute.view{ 4.41 - module = "member_image", 4.42 - view = "_show", 4.43 - params = { 4.44 - member = trustee_member, 4.45 - image_type = "avatar", 4.46 - show_dummy = true, 4.47 - class = "micro_avatar", 4.48 - popup_text = text 4.49 - } 4.50 - } 4.51 - end 4.52 - end 4.53 - }, 4.54 - { 4.55 - label_attr = { style = "width: 110px" }, 4.56 - content = function(record) 4.57 - if record.member_weight and record.direct_member_count then 4.58 - local max_value = MemberCount:get() 4.59 - ui.bargraph{ 4.60 - max_value = max_value, 4.61 - width = 100, 4.62 - bars = { 4.63 - { color = "#444", value = record.direct_member_count }, 4.64 - { color = "#777", value = record.member_weight - record.direct_member_count }, 4.65 - { color = "#ddd", value = max_value - record.member_weight }, 4.66 + ui.container{ attr = { class = "bar" }, content = function() 4.67 + if area.member_weight and area.direct_member_count then 4.68 + local max_value = MemberCount:get() 4.69 + ui.bargraph{ 4.70 + max_value = max_value, 4.71 + width = 100, 4.72 + bars = { 4.73 + { color = "#444", value = area.direct_member_count }, 4.74 + { color = "#777", value = area.member_weight - area.direct_member_count }, 4.75 + { color = "#ddd", value = max_value - area.member_weight }, 4.76 + } 4.77 } 4.78 - } 4.79 - end 4.80 - end 4.81 - }, 4.82 - { 4.83 - label_attr = { style = "width: 100%" }, 4.84 - content = function(record) 4.85 - ui.link{ 4.86 - text = record.name, 4.87 - module = "area", 4.88 - view = "show", 4.89 - id = record.id 4.90 - } 4.91 - end 4.92 - }, 4.93 - { 4.94 - label = function() 4.95 - local title = _"New" 4.96 - ui.image{ 4.97 - attr = { title = title, alt = title }, 4.98 - static = "icons/16/new.png" 4.99 - } 4.100 - end, 4.101 - field_attr = field_attr, 4.102 - label_attr = label_attr, 4.103 - content = function(record) 4.104 - ui.link{ 4.105 - text = tostring(record.issues_new_count), 4.106 - module = "area", 4.107 - view = "show", 4.108 - id = record.id, 4.109 - params = { filter = "new", tab = "issues" } 4.110 - } 4.111 - end 4.112 - }, 4.113 - { 4.114 - label = function() 4.115 - local title = _"Discussion" 4.116 - ui.image{ 4.117 - attr = { title = title, alt = title }, 4.118 - static = "icons/16/comments.png" 4.119 - } 4.120 - end, 4.121 - field_attr = field_attr, 4.122 - label_attr = label_attr, 4.123 - content = function(record) 4.124 - ui.link{ 4.125 - text = tostring(record.issues_discussion_count), 4.126 - module = "area", 4.127 - view = "show", 4.128 - id = record.id, 4.129 - params = { filter = "accepted", tab = "issues" } 4.130 - } 4.131 - end 4.132 - }, 4.133 - { 4.134 - label = function() 4.135 - local title = _"Frozen" 4.136 - ui.image{ 4.137 - attr = { title = title, alt = title }, 4.138 - static = "icons/16/lock.png" 4.139 - } 4.140 - end, 4.141 - field_attr = field_attr, 4.142 - label_attr = label_attr, 4.143 - content = function(record) 4.144 - ui.link{ 4.145 - text = tostring(record.issues_frozen_count), 4.146 - module = "area", 4.147 - view = "show", 4.148 - id = record.id, 4.149 - params = { filter = "half_frozen", tab = "issues" } 4.150 - } 4.151 - end 4.152 - }, 4.153 - { 4.154 - label = function() 4.155 - local title = _"Voting" 4.156 - ui.image{ 4.157 - attr = { title = title, alt = title }, 4.158 - static = "icons/16/email_open.png" 4.159 + end 4.160 + end } 4.161 + 4.162 + ui.container{ attr = { class = "name" }, content = function() 4.163 + ui.link{ 4.164 + text = area.name, 4.165 + module = "area", 4.166 + view = "show", 4.167 + id = area.id 4.168 + } 4.169 + slot.put(" ") 4.170 + ui.tag{ content = "" } 4.171 + end 4.172 } 4.173 - end, 4.174 - field_attr = field_attr, 4.175 - label_attr = label_attr, 4.176 - content = function(record) 4.177 - ui.link{ 4.178 - text = tostring(record.issues_voting_count), 4.179 - module = "area", 4.180 - view = "show", 4.181 - id = record.id, 4.182 - params = { filter = "frozen", tab = "issues" } 4.183 - } 4.184 - end 4.185 - }, 4.186 - { 4.187 - label = function() 4.188 - local title = _"Finished" 4.189 - ui.image{ 4.190 - attr = { title = title, alt = title }, 4.191 - static = "icons/16/tick.png" 4.192 - } 4.193 - end, 4.194 - field_attr = field_attr, 4.195 - label_attr = label_attr, 4.196 - content = function(record) 4.197 - ui.link{ 4.198 - text = tostring(record.issues_finished_count), 4.199 - module = "area", 4.200 - view = "show", 4.201 - id = record.id, 4.202 - params = { filter = "finished", issue_list = "newest", tab = "issues" } 4.203 - } 4.204 - end 4.205 - }, 4.206 - { 4.207 - label = function() 4.208 - local title = _"Cancelled" 4.209 - ui.image{ 4.210 - attr = { title = title, alt = title }, 4.211 - static = "icons/16/cross.png" 4.212 - } 4.213 - end, 4.214 - field_attr = field_attr, 4.215 - label_attr = label_attr, 4.216 - content = function(record) 4.217 - ui.link{ 4.218 - text = tostring(record.issues_cancelled_count), 4.219 - module = "area", 4.220 - view = "show", 4.221 - id = record.id, 4.222 - params = { filter = "cancelled", issue_list = "newest", tab = "issues" } 4.223 - } 4.224 - end 4.225 - } 4.226 - } 4.227 -} 4.228 ---[[ 4.229 -ui.bargraph_legend{ 4.230 - width = 25, 4.231 - bars = { 4.232 - { color = "#444", label = _"Direct membership" }, 4.233 - { color = "#777", label = _"Membership by delegation" }, 4.234 - { color = "#ddd", label = _"No membership at all" }, 4.235 - } 4.236 -} 4.237 + 4.238 + ui.container{ attr = { class = "membership" }, content = function() 4.239 + if area.is_member then 4.240 + local text = _"Member of area" 4.241 + ui.image{ 4.242 + attr = { title = text, alt = text }, 4.243 + static = "icons/16/user_gray.png", 4.244 + } 4.245 + else 4.246 + slot.put('<img src="null.png" width="16" height="1" />') 4.247 + end 4.248 + end } 4.249 + 4.250 + ui.container{ attr = { class = "delegatee" }, content = function() 4.251 + if area.trustee_member_id then 4.252 + local trustee_member = Member:by_id(area.trustee_member_id) 4.253 + local text = _("Area delegated to '#{name}'", { name = area.trustee_member_name }) 4.254 + local text = _"delegated to" 4.255 + ui.image{ 4.256 + attr = { class = "delegation_arrow", alt = text, title = text }, 4.257 + static = "delegation_arrow_24_horizontal.png" 4.258 + } 4.259 + execute.view{ 4.260 + module = "member_image", 4.261 + view = "_show", 4.262 + params = { 4.263 + member = trustee_member, 4.264 + image_type = "avatar", 4.265 + show_dummy = true, 4.266 + class = "micro_avatar", 4.267 + popup_text = text 4.268 + } 4.269 + } 4.270 + else 4.271 + slot.put('<img src="null.png" width="24" height="1" />') 4.272 + end 4.273 + end } 4.274 + end } 4.275 4.276 -slot.put("<br /> ") 4.277 + ui.container{ attr = { class = "phases" }, content = function() 4.278 + 4.279 + ui.container{ attr = { class = "admission" }, content = function() 4.280 + ui.link{ 4.281 + text = tostring(area.issues_new_count), 4.282 + module = "area", 4.283 + view = "show", 4.284 + id = area.id, 4.285 + params = { filter = "new", tab = "issues" } 4.286 + } 4.287 + end } 4.288 4.289 - 4.290 -if app.session.member_id then 4.291 - ui.image{ 4.292 - attr = { title = title, alt = title }, 4.293 - static = "icons/16/user_gray.png" 4.294 - } 4.295 - slot.put(" ") 4.296 - slot.put(_"Member of area") 4.297 - slot.put(" ") 4.298 + ui.container{ attr = { class = "discussion" }, content = function() 4.299 + ui.link{ 4.300 + text = tostring(area.issues_discussion_count), 4.301 + module = "area", 4.302 + view = "show", 4.303 + id = area.id, 4.304 + params = { filter = "accepted", tab = "issues" } 4.305 + } 4.306 + end } 4.307 4.308 - ui.image{ 4.309 - attr = { title = title, alt = title }, 4.310 - static = "icons/16/link.png" 4.311 - } 4.312 - slot.put(" ") 4.313 - slot.put(_"Area delegated") 4.314 - slot.put(" ") 4.315 -end 4.316 - 4.317 -ui.image{ 4.318 - attr = { title = title, alt = title }, 4.319 - static = "icons/16/new.png" 4.320 -} 4.321 -slot.put(" ") 4.322 -slot.put(_"New") 4.323 -slot.put(" ") 4.324 + ui.container{ attr = { class = "verification" }, content = function() 4.325 + ui.link{ 4.326 + text = tostring(area.issues_frozen_count), 4.327 + module = "area", 4.328 + view = "show", 4.329 + id = area.id, 4.330 + params = { filter = "half_frozen", tab = "issues" } 4.331 + } 4.332 + end } 4.333 4.334 -ui.image{ 4.335 - attr = { title = title, alt = title }, 4.336 - static = "icons/16/comments.png" 4.337 -} 4.338 -slot.put(" ") 4.339 -slot.put(_"Discussion") 4.340 -slot.put(" ") 4.341 - 4.342 -ui.image{ 4.343 - attr = { title = title, alt = title }, 4.344 - static = "icons/16/lock.png" 4.345 -} 4.346 -slot.put(" ") 4.347 -slot.put(_"Frozen") 4.348 -slot.put(" ") 4.349 + ui.container{ attr = { class = "voting" }, content = function() 4.350 + ui.link{ 4.351 + text = tostring(area.issues_voting_count), 4.352 + module = "area", 4.353 + view = "show", 4.354 + id = area.id, 4.355 + params = { filter = "frozen", tab = "issues" } 4.356 + } 4.357 + end } 4.358 4.359 -ui.image{ 4.360 - attr = { title = title, alt = title }, 4.361 - static = "icons/16/email_open.png" 4.362 -} 4.363 -slot.put(" ") 4.364 -slot.put(_"Voting") 4.365 -slot.put(" ") 4.366 + ui.container{ attr = { class = "finished" }, content = function() 4.367 + ui.link{ 4.368 + text = tostring(area.issues_finished_count), 4.369 + module = "area", 4.370 + view = "show", 4.371 + id = area.id, 4.372 + params = { filter = "finished", issue_list = "newest", tab = "issues" } 4.373 + } 4.374 + end } 4.375 4.376 -ui.image{ 4.377 - attr = { title = title, alt = title }, 4.378 - static = "icons/16/tick.png" 4.379 -} 4.380 -slot.put(" ") 4.381 -slot.put(_"Finished") 4.382 -slot.put(" ") 4.383 + ui.container{ attr = { class = "cancelled" }, content = function() 4.384 + ui.link{ 4.385 + text = tostring(area.issues_cancelled_count), 4.386 + module = "area", 4.387 + view = "show", 4.388 + id = area.id, 4.389 + params = { filter = "cancelled", issue_list = "newest", tab = "issues" } 4.390 + } 4.391 + end } 4.392 4.393 -ui.image{ 4.394 - attr = { title = title, alt = title }, 4.395 - static = "icons/16/cross.png" 4.396 -} 4.397 -slot.put(" ") 4.398 -slot.put(_"Cancelled") 4.399 - 4.400 ---]] 4.401 \ No newline at end of file 4.402 + end } 4.403 + 4.404 + slot.put("<br /") 4.405 + end } 4.406 + 4.407 + end 4.408 + 4.409 +end }
5.1 --- a/app/main/initiative/_list_element.lua Thu Mar 01 22:56:35 2012 +0100 5.2 +++ b/app/main/initiative/_list_element.lua Sat Mar 03 17:28:55 2012 +0100 5.3 @@ -1,133 +1,117 @@ 5.4 local initiative = param.get("initiative", "table") 5.5 local selected = param.get("selected", atom.boolean) 5.6 5.7 -ui.list{ 5.8 - attr = { class = "nohover" }, 5.9 - records = { { a = 1} }, 5.10 - columns = { 5.11 - { 5.12 - field_attr = { style = "width: 3em; text-align: center;"}, 5.13 - content = function() 5.14 - if 5.15 - initiative.issue.accepted and initiative.issue.closed 5.16 - and initiative.issue.ranks_available or initiative.admitted == false 5.17 - then 5.18 - ui.field.rank{ attr = { class = "rank" }, value = initiative.rank, eligible = initiative.eligible } 5.19 - else 5.20 - slot.put(" ") 5.21 - end 5.22 - end 5.23 - }, 5.24 + 5.25 +ui.container{ attr = { class = "initiative" }, content = function() 5.26 5.27 - { 5.28 - field_attr = { style = "width: 100px;"}, 5.29 - content = function() 5.30 - if initiative.issue.fully_frozen and initiative.issue.closed then 5.31 - if initiative.issue.ranks_available then 5.32 - if initiative.negative_votes and initiative.positive_votes then 5.33 - local max_value = initiative.issue.voter_count 5.34 - ui.bargraph{ 5.35 - max_value = max_value, 5.36 - width = 100, 5.37 - bars = { 5.38 - { color = "#0a0", value = initiative.positive_votes }, 5.39 - { color = "#aaa", value = max_value - initiative.negative_votes - initiative.positive_votes }, 5.40 - { color = "#a00", value = initiative.negative_votes }, 5.41 - } 5.42 - } 5.43 - else 5.44 - slot.put(" ") 5.45 - end 5.46 - else 5.47 - slot.put(_"Counting of votes") 5.48 - end 5.49 - else 5.50 - local max_value = initiative.issue.population or 0 5.51 + ui.container{ attr = { class = "rank" }, content = function() 5.52 + if initiative.issue.accepted and initiative.issue.closed 5.53 + and initiative.issue.ranks_available or initiative.admitted == false 5.54 + then 5.55 + ui.field.rank{ attr = { class = "rank" }, value = initiative.rank, eligible = initiative.eligible } 5.56 + else 5.57 + slot.put('<img src="null.png" width="28" height="1" />') 5.58 + end 5.59 + end } 5.60 + 5.61 + ui.container{ attr = { class = "bar" }, content = function() 5.62 + if initiative.issue.fully_frozen and initiative.issue.closed then 5.63 + if initiative.issue.ranks_available then 5.64 + if initiative.negative_votes and initiative.positive_votes then 5.65 + local max_value = initiative.issue.voter_count 5.66 ui.bargraph{ 5.67 max_value = max_value, 5.68 width = 100, 5.69 - quorum = max_value * (initiative.issue.policy.initiative_quorum_num / initiative.issue.policy.initiative_quorum_den), 5.70 - quorum_color = "#00F", 5.71 bars = { 5.72 - { color = "#0a0", value = (initiative.satisfied_supporter_count or 0) }, 5.73 - { color = "#bbb", value = (initiative.supporter_count or 0) - (initiative.satisfied_supporter_count or 0) }, 5.74 - { color = "#f7f7f7", value = max_value - (initiative.supporter_count or 0) }, 5.75 + { color = "#0a0", value = initiative.positive_votes }, 5.76 + { color = "#aaa", value = max_value - initiative.negative_votes - initiative.positive_votes }, 5.77 + { color = "#a00", value = initiative.negative_votes }, 5.78 } 5.79 } 5.80 - end 5.81 - end 5.82 - }, 5.83 - { 5.84 - field_attr = { style = "width: 24px;" }, 5.85 - content = function() 5.86 - if initiative.is_initiator then 5.87 - slot.put(" ") 5.88 - local label = _"You are initiator of this initiative" 5.89 - ui.image{ 5.90 - attr = { alt = label, title = label }, 5.91 - static = "icons/16/user_edit.png" 5.92 - } 5.93 - elseif initiative.is_supporter then 5.94 + else 5.95 slot.put(" ") 5.96 - local label = _"You are supporter of this initiative" 5.97 - ui.image{ 5.98 - attr = { alt = label, title = label }, 5.99 - static = "icons/16/thumb_up_green.png" 5.100 - } 5.101 - elseif initiative.is_potential_supporter then 5.102 - slot.put(" ") 5.103 - local label = _"You are potentially supporter of this initiative" 5.104 - ui.image{ 5.105 - attr = { alt = label, title = label }, 5.106 - static = "icons/16/thumb_up.png" 5.107 - } 5.108 - elseif initiative.is_supporter_via_delegation then 5.109 - slot.put(" ") 5.110 - local label = _"You are supporter of this initiative via delegation" 5.111 - ui.image{ 5.112 - attr = { alt = label, title = label }, 5.113 - static = "icons/16/thumb_up_green.png" 5.114 - } 5.115 end 5.116 - 5.117 + else 5.118 + slot.put(_"Counting of votes") 5.119 end 5.120 - }, 5.121 - { 5.122 + else 5.123 + local max_value = initiative.issue.population or 0 5.124 + ui.bargraph{ 5.125 + max_value = max_value, 5.126 + width = 100, 5.127 + quorum = max_value * (initiative.issue.policy.initiative_quorum_num / initiative.issue.policy.initiative_quorum_den), 5.128 + quorum_color = "#00F", 5.129 + bars = { 5.130 + { color = "#0a0", value = (initiative.satisfied_supporter_count or 0) }, 5.131 + { color = "#bbb", value = (initiative.supporter_count or 0) - (initiative.satisfied_supporter_count or 0) }, 5.132 + { color = "#f7f7f7", value = max_value - (initiative.supporter_count or 0) }, 5.133 + } 5.134 + } 5.135 + end 5.136 + end } 5.137 + 5.138 + ui.container{ attr = { class = "interest" }, content = function() 5.139 + if initiative.is_initiator then 5.140 + local label = _"You are initiator of this initiative" 5.141 + ui.image{ 5.142 + attr = { alt = label, title = label }, 5.143 + static = "icons/16/user_edit.png" 5.144 + } 5.145 + elseif initiative.is_supporter then 5.146 + local label = _"You are supporter of this initiative" 5.147 + ui.image{ 5.148 + attr = { alt = label, title = label }, 5.149 + static = "icons/16/thumb_up_green.png" 5.150 + } 5.151 + elseif initiative.is_potential_supporter then 5.152 + local label = _"You are potentially supporter of this initiative" 5.153 + ui.image{ 5.154 + attr = { alt = label, title = label }, 5.155 + static = "icons/16/thumb_up.png" 5.156 + } 5.157 + elseif initiative.is_supporter_via_delegation then 5.158 + local label = _"You are supporter of this initiative via delegation" 5.159 + ui.image{ 5.160 + attr = { alt = label, title = label }, 5.161 + static = "icons/16/thumb_up_green.png" 5.162 + } 5.163 + end 5.164 + end } 5.165 + 5.166 + ui.container{ attr = { class = "name" }, content = function() 5.167 + local link_class = "initiative_link" 5.168 + if initiative.revoked then 5.169 + link_class = "revoked" 5.170 + end 5.171 + if selected then 5.172 + link_class = link_class .. " selected" 5.173 + end 5.174 + if initiative.is_supporter then 5.175 + link_class = link_class .. " supported" 5.176 + end 5.177 + if initiative.is_potential_supporter then 5.178 + link_class = link_class .. " potentially_supported" 5.179 + end 5.180 + if initiative.is_supporter_via_delegation then 5.181 + link_class = link_class .. " supported" 5.182 + end 5.183 + ui.link{ 5.184 + attr = { class = link_class }, 5.185 content = function() 5.186 - local link_class = "initiative_link" 5.187 - if initiative.revoked then 5.188 - link_class = "revoked" 5.189 - end 5.190 - if selected then 5.191 - link_class = link_class .. " selected" 5.192 - end 5.193 - if initiative.is_supporter then 5.194 - link_class = link_class .. " supported" 5.195 - end 5.196 - if initiative.is_potential_supporter then 5.197 - link_class = link_class .. " potentially_supported" 5.198 - end 5.199 - if initiative.is_supporter_via_delegation then 5.200 - link_class = link_class .. " supported" 5.201 + local name 5.202 + if initiative.name_highlighted then 5.203 + name = encode.highlight(initiative.name_highlighted) 5.204 + else 5.205 + name = encode.html(initiative.shortened_name) 5.206 end 5.207 - ui.link{ 5.208 - attr = { class = link_class }, 5.209 - content = function() 5.210 - local name 5.211 - if initiative.name_highlighted then 5.212 - name = encode.highlight(initiative.name_highlighted) 5.213 - else 5.214 - name = encode.html(initiative.shortened_name) 5.215 - end 5.216 - ui.tag{ content = "i" .. initiative.id .. ": " } 5.217 - slot.put(name) 5.218 - end, 5.219 - module = "initiative", 5.220 - view = "show", 5.221 - id = initiative.id 5.222 - } 5.223 - 5.224 - end 5.225 + ui.tag{ content = "i" .. initiative.id .. ": " } 5.226 + slot.put(name) 5.227 + end, 5.228 + module = "initiative", 5.229 + view = "show", 5.230 + id = initiative.id 5.231 } 5.232 - } 5.233 -} 5.234 + 5.235 + end } 5.236 + 5.237 +end } 5.238 \ No newline at end of file
6.1 --- a/env/ui/filters.lua Thu Mar 01 22:56:35 2012 +0100 6.2 +++ b/env/ui/filters.lua Sat Mar 03 17:28:55 2012 +0100 6.3 @@ -112,6 +112,9 @@ 6.4 attr.class = "active" 6.5 option.selector_modifier(args.selector) 6.6 end 6.7 + if idx > 1 then 6.8 + slot.put(" ") 6.9 + end 6.10 ui.link{ 6.11 attr = attr, 6.12 module = request.get_module(),
7.1 --- a/static/style.css Thu Mar 01 22:56:35 2012 +0100 7.2 +++ b/static/style.css Sat Mar 03 17:28:55 2012 +0100 7.3 @@ -1,3 +1,4 @@ 7.4 + 7.5 /* Style reset */ 7.6 html, 7.7 body, 7.8 @@ -63,10 +64,6 @@ 7.9 margin-top: 1ex; 7.10 } 7.11 7.12 -.area_list { 7.13 - line-height: 140%; 7.14 -} 7.15 - 7.16 body, a { 7.17 color: #000; 7.18 } 7.19 @@ -164,9 +161,9 @@ 7.20 color: #fff; 7.21 font-size: 90%; 7.22 line-height: 100%; 7.23 - padding-left: 10px; 7.24 + padding-left: 1%; 7.25 + box-shadow: #aaa 0 0 5px; 7.26 overflow: hidden; 7.27 - box-shadow: #aaa 0 0 5px; 7.28 -mox-box-shadow: #aaa 0 0 5px; 7.29 -webkit-box-shadow: #aaa 0 0 5px; 7.30 } 7.31 @@ -184,35 +181,29 @@ 7.32 color: #000; 7.33 } 7.34 7.35 -.navigation, 7.36 -.logout_button { 7.37 +.navigation { 7.38 line-height: 200%; 7.39 } 7.40 7.41 -.navigation img, 7.42 -.logout_button img { 7.43 +.navigation img { 7.44 margin-right: 0.5em; 7.45 vertical-align: middle; 7.46 } 7.47 7.48 -.navigation a, 7.49 -.logout_button a { 7.50 - padding: 1ex; 7.51 +.navigation a { 7.52 + padding: 0 0.5em; 7.53 + float: left; 7.54 + display: block; 7.55 } 7.56 7.57 form.unit_selector { 7.58 display: inline; 7.59 } 7.60 7.61 -.logout_button { 7.62 - float: right; 7.63 -} 7.64 - 7.65 .searchbox { 7.66 margin: 0; 7.67 padding: 0.1ex 1em 0ex 1em; 7.68 float: right; 7.69 - line-height: 250%; 7.70 } 7.71 7.72 .searchbox form { 7.73 @@ -250,8 +241,8 @@ 7.74 .title2, 7.75 .actions { 7.76 background-color: #f2f2f2; 7.77 - margin-left: 10px; 7.78 - margin-right: 10px; 7.79 + margin-left: 1%; 7.80 + margin-right: 1%; 7.81 } 7.82 7.83 .initiative_head .actions { 7.84 @@ -260,19 +251,11 @@ 7.85 -webkit-box-shadow: none; 7.86 } 7.87 7.88 -.actions { 7.89 - border-radius: 0 0 8px 8px; 7.90 -} 7.91 - 7.92 -.initiative_head .actions { 7.93 - background-color: #fff; 7.94 - margin: 0px; 7.95 -} 7.96 7.97 .slot_initiatives_list { 7.98 margin-top: 1ex; 7.99 - margin-left: 10px; 7.100 - margin-right: 10px; 7.101 + margin-left: 1%; 7.102 + margin-right: 1%; 7.103 background-color: #fcfcfc; 7.104 border-radius: 8px; 7.105 clear: left; 7.106 @@ -289,7 +272,7 @@ 7.107 7.108 .title { 7.109 color: #000; 7.110 - padding: 1.5ex 1em 0 1em; 7.111 + padding: 1.5ex 1ex 0 1ex; 7.112 } 7.113 7.114 .title div { 7.115 @@ -308,7 +291,7 @@ 7.116 } 7.117 7.118 .slot_title2 { 7.119 - padding: 1ex 1em 0 1em; 7.120 + padding: 1ex 1ex 0 1ex; 7.121 } 7.122 7.123 .member_list .member_image_avatar { 7.124 @@ -330,24 +313,38 @@ 7.125 padding-bottom: 1ex; 7.126 } 7.127 7.128 -.interest { 7.129 - margin-left: 1.33em; 7.130 - margin-bottom: 1.33ex; 7.131 +.actions { 7.132 + border-radius: 0 0 8px 8px; 7.133 } 7.134 7.135 -.slot_actions .interest { 7.136 - margin-left: 0em; 7.137 +.actions .interest, 7.138 +.actions .delegation, 7.139 +.actions a { 7.140 + margin-left: 1ex; 7.141 } 7.142 7.143 .actions a { 7.144 - margin-right: 1em; 7.145 - border-radius: 5px; 7.146 + margin-top: 1px; 7.147 + margin-bottom: 1px; 7.148 +} 7.149 + 7.150 +.actions .interest a, 7.151 +.actions .delegation a { 7.152 + margin: 0; 7.153 +} 7.154 + 7.155 +.initiative_head .actions { 7.156 + background-color: #fff; 7.157 + margin: 0px; 7.158 +} 7.159 + 7.160 +.actions a { 7.161 padding-right: 0.3em; 7.162 } 7.163 7.164 .slot_initiative_head { 7.165 - padding-left: 10px; 7.166 - padding-top: 2ex; 7.167 + padding-left: 1%; 7.168 + padding-top: 4ex; 7.169 } 7.170 7.171 .initiative_name { 7.172 @@ -400,7 +397,6 @@ 7.173 .actions .potential_supporter, 7.174 .vote_info .head { 7.175 float: left; 7.176 - margin-right: 1em; 7.177 } 7.178 7.179 .actions .supporter, 7.180 @@ -531,8 +527,8 @@ 7.181 */ 7.182 7.183 .main { 7.184 - margin-left: 10px; 7.185 - margin-right: 10px; 7.186 + margin-left: 1%; 7.187 + margin-right: 1%; 7.188 } 7.189 7.190 /************************************************************************* 7.191 @@ -566,11 +562,6 @@ 7.192 padding: 1ex; 7.193 } 7.194 7.195 -.ui_tabs_content { 7.196 - xborder: 1px solid #444; 7.197 - xpadding: 1ex 1ex 1ex 1ex; 7.198 -} 7.199 - 7.200 .ui_tabs_links a.yellow { 7.201 background-color: #fcc; 7.202 color: #000; 7.203 @@ -611,25 +602,22 @@ 7.204 .ui_filter { 7.205 overflow: hidden; 7.206 margin-bottom: 1ex; 7.207 -} 7.208 - 7.209 -.ui_filter_closed_head, 7.210 -.ui_filter_head { 7.211 - color: #777; 7.212 - margin-top: 1ex; 7.213 - margin-bottom: 1.5ex; 7.214 - font-size: 75%; 7.215 - float: left; 7.216 + margin-right: 1em; 7.217 } 7.218 7.219 .ui_filter_head { 7.220 + color: #777; 7.221 + margin-top: 0.5ex; 7.222 + margin-bottom: 0.5ex; 7.223 + font-size: 75%; 7.224 + float: left; 7.225 + line-height: 200%; 7.226 margin-right: 2em; 7.227 } 7.228 7.229 .ui_filter_head a { 7.230 color: #777; 7.231 padding: 0.5ex; 7.232 - margin-right: 0.2em; 7.233 } 7.234 7.235 .ui_filter_head a.active { 7.236 @@ -850,6 +838,63 @@ 7.237 7.238 7.239 7.240 +/************************************************************************* 7.241 + * Area list 7.242 + */ 7.243 + 7.244 +.area_list { 7.245 +} 7.246 + 7.247 +.area_list .area { 7.248 + line-height: 28px; 7.249 +} 7.250 + 7.251 +.area_list .area img { 7.252 + vertical-align: middle; 7.253 +} 7.254 + 7.255 +.area_list .area .info { 7.256 + float: left; 7.257 + clear: both; 7.258 +} 7.259 + 7.260 +.area_list .area .bar { 7.261 + float: left; 7.262 + padding-top: 6px 7.263 +} 7.264 + 7.265 +.area_list .area .membership, 7.266 +.area_list .area .delegatee { 7.267 + display: inline; 7.268 + width: 24px 7.269 +} 7.270 + 7.271 +.area_list .area .name { 7.272 + display: inline; 7.273 + font-weight: bold; 7.274 +} 7.275 + 7.276 +@media screen and (max-width: 480px) { 7.277 + .area_list .area .name { 7.278 + clear: left; 7.279 + display: block; 7.280 + float: left; 7.281 + margin-left: 0px; 7.282 + } 7.283 + .area_list .area .phases { 7.284 + margin-bottom: 2ex; 7.285 + } 7.286 +} 7.287 + 7.288 +.area_list .area .phases { 7.289 + float: right; 7.290 +} 7.291 + 7.292 +.area_list .area .phases div { 7.293 + float: left; 7.294 + width: 3em; 7.295 + text-align: right; 7.296 +} 7.297 7.298 /************************************************************************* 7.299 * Issues 7.300 @@ -873,7 +918,7 @@ 7.301 } 7.302 7.303 .issues .issue .issue_info { 7.304 - padding: 1ex 1em 0.3ex 1em; 7.305 + padding: 1ex 1ex 0.3ex 1ex; 7.306 line-height: 140%; 7.307 margin-bottom: 1ex; 7.308 } 7.309 @@ -904,6 +949,42 @@ 7.310 font-weight: bold; 7.311 } 7.312 7.313 +.initiative { 7.314 + margin-left: 1ex; 7.315 + margin-bottom: 1ex; 7.316 + line-height: 50%; 7.317 +} 7.318 + 7.319 +.initiative .bar { 7.320 + margin-right: 0.3em; 7.321 +} 7.322 + 7.323 +.initiative .rank, 7.324 +.initiative .bar, 7.325 +.initiative .interest { 7.326 + float: left; 7.327 + margin-right: 0.3em; 7.328 +} 7.329 + 7.330 +.initiative .interest { 7.331 + width: 16px; 7.332 + height: 16px; 7.333 + line-height: 100%; 7.334 +} 7.335 + 7.336 +.initiative .name { 7.337 + line-height: 130%; 7.338 + margin-left: 160px; 7.339 +} 7.340 + 7.341 +@media screen and (max-width: 480px) { 7.342 + .initiative .name { 7.343 + clear: left; 7.344 + margin-left: 0px; 7.345 + } 7.346 +} 7.347 + 7.348 + 7.349 .issue_initiative_list a { 7.350 font-weight: bold; 7.351 } 7.352 @@ -1225,10 +1306,6 @@ 7.353 font-weight: bold; 7.354 } 7.355 7.356 -.heading.member_area_list { 7.357 - position: absolute; 7.358 -} 7.359 - 7.360 .heading.first { 7.361 margin-top: 0; 7.362 }