liquid_feedback_frontend
changeset 218:7ea52c710503
Some little changes for next generation frontend
author | bsw |
---|---|
date | Sun Mar 13 16:53:33 2011 +0100 (2011-03-13) |
parents | 73dbc9e2bfd4 |
children | 217653875fbb |
files | app/main/_layout/lf2.html app/main/initiative/_action/create.lua app/main/lf2/_filter_view/10_topnav.lua app/main/lf2/_initiative_support.lua app/main/lf2/_issue.lua app/main/lf2/_sidebar_issue.lua app/main/lf2/_sidebar_unit.lua app/main/lf2/delegation.lua app/main/lf2/settings.lua model/issue.lua model/unit.lua static/lf2.css |
line diff
1.1 --- a/app/main/_layout/lf2.html Sat Mar 12 19:22:50 2011 +0100 1.2 +++ b/app/main/_layout/lf2.html Sun Mar 13 16:53:33 2011 +0100 1.3 @@ -9,9 +9,9 @@ 1.4 1.5 <div class="topbox line1"> 1.6 <a>LiquidFeedback</a> 1.7 - <a>Musterorganisation</a> 1.8 + <a>Example organisation</a> 1.9 <div class="right"> 1.10 - <a href="__BASEURL__/lf2/settings.html">Einstellungen</a> 1.11 + <a href="__BASEURL__/lf2/settings.html">Settings</a> 1.12 <a href="__BASEURL__/lf2/">Logout</a> 1.13 </div> 1.14 <br style="clear: both;" /> 1.15 @@ -27,7 +27,7 @@ 1.16 <!-- WEBMCP SLOTNODIV leftright_post --> 1.17 1.18 <div class="layout_trace" id="layout_trace" style="xdisplay: none"> 1.19 - <div id="trace_show" onclick="document.getElementById('trace_content').style.display='block';this.style.display='none';">TRACE</div> 1.20 + <div id="trace_show" style="display: none" onclick="document.getElementById('trace_content').style.display='block';this.style.display='none';">TRACE</div> 1.21 <div id="trace_content" style="display: none;"> 1.22 <tt id="system_error"><!-- WEBMCP SLOT system_error --></tt> 1.23 <div id="trace"> </div><hr />
2.1 --- a/app/main/initiative/_action/create.lua Sat Mar 12 19:22:50 2011 +0100 2.2 +++ b/app/main/initiative/_action/create.lua Sun Mar 13 16:53:33 2011 +0100 2.3 @@ -82,6 +82,7 @@ 2.4 issue = Issue:new() 2.5 issue.area_id = area.id 2.6 issue.policy_id = policy_id 2.7 + issue.state = "admission" 2.8 issue:save() 2.9 end 2.10
3.1 --- a/app/main/lf2/_filter_view/10_topnav.lua Sat Mar 12 19:22:50 2011 +0100 3.2 +++ b/app/main/lf2/_filter_view/10_topnav.lua Sun Mar 13 16:53:33 2011 +0100 3.3 @@ -1,6 +1,11 @@ 3.4 execute.inner() 3.5 3.6 local phase = app.topnav_phase 3.7 + 3.8 +if not phase then 3.9 + return 3.10 +end 3.11 + 3.12 local order = app.topnav_order 3.13 3.14 local area_id = app.topnav_area_id
4.1 --- a/app/main/lf2/_initiative_support.lua Sat Mar 12 19:22:50 2011 +0100 4.2 +++ b/app/main/lf2/_initiative_support.lua Sun Mar 13 16:53:33 2011 +0100 4.3 @@ -23,10 +23,9 @@ 4.4 slot.put(" ") 4.5 ui.tag{ content = _"Your are potential supporter" } 4.6 end 4.7 - end } 4.8 - ui.box_col{ class = "right", content = function() 4.9 + slot.put(" · ") 4.10 ui.link{ 4.11 - text = _"Remove support", 4.12 + text = _"revoke", 4.13 module = "initiative", 4.14 action = "remove_support", 4.15 id = initiative.id,
5.1 --- a/app/main/lf2/_issue.lua Sat Mar 12 19:22:50 2011 +0100 5.2 +++ b/app/main/lf2/_issue.lua Sun Mar 13 16:53:33 2011 +0100 5.3 @@ -74,8 +74,8 @@ 5.4 end } 5.5 5.6 if #trustees > 1 then 5.7 - ui.box_row{ class = "head2", content = function() 5.8 - ui.box_col{ class = "head left", content = function() 5.9 + ui.box_row{ class = "", content = function() 5.10 + ui.box_col{ class = "left", content = function() 5.11 execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 5.12 end } 5.13 end } 5.14 @@ -97,24 +97,16 @@ 5.15 routing = { default = { mode = "redirect", module = "lf2", view = "issue", id = issue.id } } 5.16 } 5.17 end 5.18 - if #trustees == 1 then 5.19 - ui.link{ 5.20 - text = _"Set issue delegation", 5.21 - module = "lf2", view = "delegation", params = { issue_id = issue.id } 5.22 - } 5.23 - end 5.24 slot.put(" · ") 5.25 - if not issue.closed and not issue.fully_frozen then 5.26 - if trustees[1].scope_out == "issue" then 5.27 - text = _"Change or revoke issue delegation" 5.28 - else 5.29 - text = _"Set issue delegation" 5.30 - end 5.31 - ui.link{ 5.32 - text = text, 5.33 - module = "lf2", view = "delegation", params = { issue_id = issue.id } 5.34 - } 5.35 - end 5.36 + if trustees[1].scope_out == "issue" then 5.37 + text = _"Change or revoke issue delegation" 5.38 + else 5.39 + text = _"Set issue delegation" 5.40 + end 5.41 + ui.link{ 5.42 + text = text, 5.43 + module = "lf2", view = "delegation", params = { issue_id = issue.id } 5.44 + } 5.45 end } 5.46 5.47 end } 5.48 @@ -125,7 +117,7 @@ 5.49 ui.link{ 5.50 module = "lf2", view = "index", id = issue.area.unit_id, 5.51 params = { phase = issue.phase }, 5.52 - text = issue.area.unit.name 5.53 + text = issue.area.unit.name_with_path 5.54 } 5.55 end } 5.56 ui.box_col{ class = "policy_name right", content = function()
6.1 --- a/app/main/lf2/_sidebar_issue.lua Sat Mar 12 19:22:50 2011 +0100 6.2 +++ b/app/main/lf2/_sidebar_issue.lua Sun Mar 13 16:53:33 2011 +0100 6.3 @@ -24,47 +24,40 @@ 6.4 ui.box{ class = "issue", content = function() 6.5 6.6 ui.box_row{ class = "issue_id head", content = function() ui.box_col{ class = "head", content = function() 6.7 - if interest then 6.8 - local text 6.9 - if issue.close then 6.10 - text = _"You were interested in this issue" 6.11 - else 6.12 - text = _"You are interested in this issue" 6.13 - end 6.14 - ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_star.png" } 6.15 - slot.put(" ") 6.16 - elseif delegating_interest then 6.17 - local text 6.18 - if issue.closed then 6.19 - text = _"Someone in your delegation chain was interested" 6.20 - else 6.21 - text = _"Someone in your delegation chain is interested" 6.22 - end 6.23 - ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_delegated_star.png" } 6.24 - slot.put(" ") 6.25 - end 6.26 ui.link{ 6.27 module = "lf2", view = "issue", id = issue.id, 6.28 content = _("Issue ##{id}", { id = issue.id }) 6.29 } 6.30 end } end } 6.31 6.32 - if #trustees > 1 then 6.33 - ui.box_row{ class = "delegation", content = function() ui.box_col{ content = function() 6.34 - execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 6.35 - end } end } 6.36 - end 6.37 - 6.38 if not issue.closed then 6.39 ui.box_row{ class = "interest", content = function() ui.box_col{ content = function() 6.40 if interest then 6.41 + local text 6.42 + if issue.close then 6.43 + text = _"You were interested" 6.44 + else 6.45 + text = _"You are interested" 6.46 + end 6.47 + ui.image{ static = "lf2/icon_star.png" } 6.48 + slot.put(" ") 6.49 + ui.tag{ content = text } 6.50 + slot.put(" · ") 6.51 ui.link{ 6.52 module = "interest", action = "update", params = { issue_id = issue.id, delete = true }, 6.53 routing = { default = { 6.54 mode = "redirect", module = "lf2", view = initiative_id and "initiative" or "issue", id = initiative_id or issue.id, 6.55 } }, 6.56 - content = _"Remove my interest" 6.57 + content = _"remove" 6.58 } 6.59 + elseif delegating_interest then 6.60 + local text 6.61 + if issue.closed then 6.62 + text = _"Someone in your delegation chain was interested" 6.63 + else 6.64 + text = _"Someone in your delegation chain is interested" 6.65 + end 6.66 + ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_delegated_star.png" } 6.67 else 6.68 ui.link{ 6.69 module = "interest", action = "update", params = { issue_id = issue.id }, 6.70 @@ -77,18 +70,24 @@ 6.71 end } end } 6.72 end 6.73 6.74 + if #trustees > 1 then 6.75 + ui.box_row{ class = "delegation", content = function() ui.box_col{ content = function() 6.76 + execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 6.77 + end } end } 6.78 + end 6.79 + 6.80 if not issue.closed then 6.81 ui.box_row{ class = "interest", content = function() ui.box_col{ content = function() 6.82 if #trustees > 1 and trustees[1].scope_out == "issue" then 6.83 ui.link{ 6.84 module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 6.85 - content = _"Set issue delegation" 6.86 - } 6.87 + content = _"Change or remove delegation" 6.88 + } 6.89 else 6.90 ui.link{ 6.91 module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 6.92 - content = _"Change or remove delegation" 6.93 - } 6.94 + content = _"Set issue delegation" 6.95 + } 6.96 end 6.97 6.98 end } end }
7.1 --- a/app/main/lf2/_sidebar_unit.lua Sat Mar 12 19:22:50 2011 +0100 7.2 +++ b/app/main/lf2/_sidebar_unit.lua Sun Mar 13 16:53:33 2011 +0100 7.3 @@ -81,7 +81,7 @@ 7.4 if member_areas_selector:count() > 0 then 7.5 ui.box{ content = function() 7.6 ui.box_row{ class = "head", content = function() ui.box_col{ class = "head", content = function() 7.7 - ui.link{ text = _"Areas, you are member of", module = "lf2", view = "index" } 7.8 + ui.link{ text = _"Areas, you are member of", module = "lf2", view = "index", id = unit.id } 7.9 end } end } 7.10 7.11 execute.view{ 7.12 @@ -97,7 +97,8 @@ 7.13 if other_areas_selector:count() > 0 then 7.14 ui.box{ content = function() 7.15 ui.box_row{ class = "head", content = function() ui.box_col{ class = "head", content = function() 7.16 - ui.link{ content = _"Areas", module = "lf2", view = "index" } 7.17 + --ui.link{ content = _"Areas", module = "lf2", view = "index", view = "index", id = unit.id } 7.18 + ui.tag{ content = _"Areas" } 7.19 end } end } 7.20 7.21 execute.view{
8.1 --- a/app/main/lf2/delegation.lua Sat Mar 12 19:22:50 2011 +0100 8.2 +++ b/app/main/lf2/delegation.lua Sun Mar 13 16:53:33 2011 +0100 8.3 @@ -43,7 +43,7 @@ 8.4 mode = "redirect", 8.5 module = "lf2", 8.6 view = area and "area" or initiative and "initiative" or issue and "issue" or "index", 8.7 - id = area and area.id or initiative and initiative.id or issue and issue.id or nil, 8.8 + id = area and area.id or initiative and initiative.id or issue and issue.id or unit.id, 8.9 } 8.10 }, 8.11 content = function()
9.1 --- a/app/main/lf2/settings.lua Sat Mar 12 19:22:50 2011 +0100 9.2 +++ b/app/main/lf2/settings.lua Sun Mar 13 16:53:33 2011 +0100 9.3 @@ -5,24 +5,23 @@ 9.4 9.5 9.6 ui.box{ content = function() 9.7 - ui.box_row{ content = function() 9.8 - ui.box_col{ content = function() 9.9 - ui.link{ module = "lf2", view = "settings_password", text = _"Change your password" } 9.10 - end } 9.11 - ui.box_col{ content = function() 9.12 - ui.link{ module = "lf2", view = "settings_name", text = _"Member name" } 9.13 - end } 9.14 - ui.box_col{ content = function() 9.15 - ui.link{ module = "lf2", view = "settings_email", text = _"Change your email address" } 9.16 - end } 9.17 - ui.box_col{ content = function() 9.18 - ui.link{ module = "lf2", view = "settings_privacy", text = _"Privacy settings" } 9.19 - end } 9.20 - ui.box_col{ content = function() 9.21 - ui.link{ module = "lf2", view = "settings_api", text = _"API settings" } 9.22 - end } 9.23 - ui.box_col{ content = function() 9.24 - ui.link{ module = "lf2", view = "settings_", text = _"" } 9.25 - end } 9.26 - end } 9.27 + ui.box_row{ class = "head", content = function() ui.box_col{ class = "head", content = _"Member settings" } end } 9.28 + ui.box_row{ content = function() ui.box_col{ content = function() 9.29 + ui.link{ module = "lf2", view = "settings_password", text = _"Change password" } 9.30 + end } end } 9.31 + ui.box_row{ content = function() ui.box_col{ content = function() 9.32 + ui.link{ module = "lf2", view = "settings_name", text = _"Change member or login name" } 9.33 + end } end } 9.34 + ui.box_row{ content = function() ui.box_col{ content = function() 9.35 + ui.link{ module = "lf2", view = "settings_email", text = _"Change notification email address" } 9.36 + end } end } 9.37 + ui.box_row{ content = function() ui.box_col{ content = function() 9.38 + ui.link{ module = "lf2", view = "settings_privacy", text = _"Privacy settings" } 9.39 + end } end } 9.40 + ui.box_row{ content = function() ui.box_col{ content = function() 9.41 + ui.link{ module = "lf2", view = "settings_api", text = _"API settings" } 9.42 + end } end } 9.43 + ui.box_row{ content = function() ui.box_col{ content = function() 9.44 + ui.link{ module = "lf2", view = "settings_", text = _"" } 9.45 + end } end } 9.46 end } 9.47 \ No newline at end of file
10.1 --- a/model/issue.lua Sat Mar 12 19:22:50 2011 +0100 10.2 +++ b/model/issue.lua Sun Mar 13 16:53:33 2011 +0100 10.3 @@ -276,12 +276,13 @@ 10.4 10.5 function Issue:get_state_name_for_state(value) 10.6 local state_name_table = { 10.7 - new = _"New", 10.8 + admission = _"New", 10.9 accepted = _"Discussion", 10.10 frozen = _"Frozen", 10.11 voting = _"Voting", 10.12 finished = _"Finished", 10.13 - cancelled = _"Cancelled" 10.14 + cancelled = _"Cancelled", 10.15 + canceled_issue_not_accepted = _"Cancelled" 10.16 } 10.17 return state_name_table[value] or value or '' 10.18 end 10.19 @@ -364,6 +365,7 @@ 10.20 return selector 10.21 end 10.22 10.23 +--[[ 10.24 function Issue.object_get:state() 10.25 if self.closed then 10.26 if self.fully_frozen then 10.27 @@ -382,6 +384,7 @@ 10.28 end 10.29 10.30 end 10.31 +--]] 10.32 10.33 function Issue.object_get:phase() 10.34 local state = self.state 10.35 @@ -400,7 +403,7 @@ 10.36 local state = self.state 10.37 local last_event_time 10.38 local duration 10.39 - if state == "new" then 10.40 + if state == "admission" then 10.41 last_event_time = self.created 10.42 duration = self.admission_time 10.43 elseif state == "accepted" then
11.1 --- a/model/unit.lua Sat Mar 12 19:22:50 2011 +0100 11.2 +++ b/model/unit.lua Sun Mar 13 16:53:33 2011 +0100 11.3 @@ -51,3 +51,12 @@ 11.4 11.5 return list 11.6 end 11.7 + 11.8 +function Unit.object_get:name_with_path() 11.9 + local name = "" 11.10 + if self.parent then 11.11 + name = self.parent.name_with_path .. " / " 11.12 + end 11.13 + name = name .. self.name 11.14 + return name 11.15 +end
12.1 --- a/static/lf2.css Sat Mar 12 19:22:50 2011 +0100 12.2 +++ b/static/lf2.css Sun Mar 13 16:53:33 2011 +0100 12.3 @@ -90,24 +90,29 @@ 12.4 * Margins und paddings 12.5 */ 12.6 12.7 +.topbox { margin: 0 1% 0 1%; } 12.8 + 12.9 +.topbox 12.10 + { margin-bottom: 1ex; } 12.11 + 12.12 .topbox a 12.13 - { margin: 0 0 0 0.5em; padding: 0.7ex 0.5em 0.3ex 0.5em; } 12.14 + { margin: 0 0.5em 0 0; padding: 0.3ex 0.5em 0.3ex 0.5em; } 12.15 12.16 .topbox select 12.17 { margin: 0.5ex 0 0.5ex 0; padding: 0.3ex 0.2em 0.2ex 0.2em;} 12.18 12.19 .topbox .right a, 12.20 .topbox .right span 12.21 - { margin: 0 0.5em 0 0; padding: 0.7ex 0.5em 0.3ex 0.3em; } 12.22 + { margin: 0 0 0 0.5em; padding: 0.3ex 0.5em 0.3ex 0.3em; } 12.23 12.24 .slot_default 12.25 - { margin: 2ex 1% 2ex 32%; } 12.26 + { margin: 0 1% 2ex 32%; } 12.27 12.28 .sidebar_right .slot_default 12.29 - { margin: 2ex 32% 2ex 1%; } 12.30 + { margin: 0 32% 2ex 1%; } 12.31 12.32 .slot_sidebar 12.33 - { margin: 2ex 1% 2ex 1%; } 12.34 + { margin: 0 1% 2ex 1%; } 12.35 12.36 .sidebar_right .slot_sidebar 12.37 { margin: 0 1% 2ex 1%; } 12.38 @@ -130,16 +135,17 @@ 12.39 */ 12.40 12.41 body 12.42 - { background-color: #27C9FF; color: #000 } 12.43 + { background-color: #27C9FF; color: #000; } 12.44 + 12.45 +.topbox.line1 12.46 + { background-color: #444; } 12.47 12.48 .topbox.line1, 12.49 -.topbox.line1 a, 12.50 -.topbox.line1 select 12.51 - { background-color: #444; color: #fff; } 12.52 +.topbox.line1 a 12.53 + { color: #fff; } 12.54 12.55 -.topbox.line2, 12.56 .topbox.line2 a 12.57 - { color: #000; } 12.58 + { background-color: #27C9FF; color: #000; } 12.59 .topbox.line2 span.inactive 12.60 { opacity: 0.2; } 12.61 .topbox a.active 12.62 @@ -154,10 +160,11 @@ 12.63 .box a { color: #068; } 12.64 12.65 .box .row.head, 12.66 -.box .row.head2, 12.67 +.box .row.head2 12.68 + { background-color: #e7f0ff; } 12.69 + 12.70 .box .row.active 12.71 -/* { background-color: #D7F5FF;}*/ 12.72 - { background-color: #e7f0ff;} 12.73 + { background-color: #f1F2F8; } 12.74 12.75 .box .row.head .col.head 12.76 { color: #444; } 12.77 @@ -184,32 +191,34 @@ 12.78 12.79 .box.issue .row.unit_name 12.80 { border-bottom-color: #ccc; } 12.81 - 12.82 + 12.83 12.84 /* 12.85 * Rounded corners 12.86 */ 12.87 12.88 -.box { border-radius: 1ex; -moz-border-radius: 1ex; 12.89 - -webkit-box-shadow: 1px 1px 3px #11576F; -moz-box-shadow: 0 0 2px 1px #444; } 12.90 +.box { border-radius: 0.8ex; -moz-border-radius: 0.8ex; 12.91 + -webkit-box-shadow: 1px 1px 2px #11576F; -moz-box-shadow: 0 0 2px 1px #444; } 12.92 12.93 .box .row:first-child.head, 12.94 .box .row:first-child.head2 12.95 - { border-radius: 1ex 1ex 0 0 ; } 12.96 + { border-radius: 0.8ex 0.8ex 0 0 ; } 12.97 .box .row:last-child 12.98 - { border-radius: 0 0 1ex 1ex; } 12.99 + { border-radius: 0 0 0.8ex 0.8ex; } 12.100 12.101 .box .row:first-child:last-child.head, 12.102 .box .row:first-child:last-child.head2 12.103 - { border-radius: 1ex 1ex 1ex 1ex; } 12.104 + { border-radius: 0.8ex 0.8ex 0.8ex 0.8ex; } 12.105 12.106 -.topbox.line1 12.107 - { -webkit-box-shadow: 0 2px 3px #444; -moz-box-shadow: 0 2px 3px #444; } 12.108 +.topbox.line1 12.109 + { border-radius: 0 0 0.8ex 0.8ex; 12.110 + -webkit-box-shadow: 1px 1px 2px #11576F; -moz-box-shadow: 1px 1px 2px #444; } 12.111 12.112 +.topbox a 12.113 + { border-radius: 0.8ex; } 12.114 + 12.115 .topbox a.active 12.116 - { border-radius: 0 0 1ex 1ex; 12.117 - -webkit-box-shadow: 1px 1px 3px #11576F, inset 0px 7px 3px -5px #444; 12.118 - -moz-box-shadow: 2px 2px 3px 0px #444; 12.119 + { -webkit-box-shadow: 1px 1px 2px #11576F; -moz-box-shadow: 1px 1px 2px 0px #444; 12.120 } 12.121 12.122 /*