liquid_feedback_frontend
changeset 217:73dbc9e2bfd4
Cummulative patch for enhancements at next generation frontend
line diff
1.1 --- a/app/main/_layout/lf2.html Mon Mar 07 12:15:22 2011 +0100 1.2 +++ b/app/main/_layout/lf2.html Sat Mar 12 19:22:50 2011 +0100 1.3 @@ -2,11 +2,21 @@ 1.4 1.5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 1.6 <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/lf2.css" /> 1.7 + <script src="__BASEURL__/static/lf2/jquery.js"></script> 1.8 <title>LiquidFeedback</title> 1.9 1.10 </head><body> 1.11 1.12 - <div class="tab1"> 1.13 + <div class="topbox line1"> 1.14 + <a>LiquidFeedback</a> 1.15 + <a>Musterorganisation</a> 1.16 + <div class="right"> 1.17 + <a href="__BASEURL__/lf2/settings.html">Einstellungen</a> 1.18 + <a href="__BASEURL__/lf2/">Logout</a> 1.19 + </div> 1.20 + <br style="clear: both;" /> 1.21 + </div> 1.22 + <div class="topbox line2"> 1.23 <!-- WEBMCP SLOT topnav --> 1.24 <br style="clear: both;" /> 1.25 </div>
2.1 --- a/app/main/delegation/_action/update.lua Mon Mar 07 12:15:22 2011 +0100 2.2 +++ b/app/main/delegation/_action/update.lua Sat Mar 12 19:22:50 2011 +0100 2.3 @@ -2,15 +2,19 @@ 2.4 2.5 local trustee_id = param.get("trustee_id", atom.integer) 2.6 2.7 +local unit_id = param.get("unit_id", atom.integer) 2.8 + 2.9 local area_id = param.get("area_id", atom.integer) 2.10 2.11 local issue_id = param.get("issue_id", atom.integer) 2.12 2.13 if issue_id then 2.14 area_id = nil 2.15 +elseif area_id then 2.16 + unit_id = nil 2.17 end 2.18 2.19 -local delegation = Delegation:by_pk(truster_id, area_id, issue_id) 2.20 +local delegation = Delegation:by_pk(truster_id, unit_id, area_id, issue_id) 2.21 2.22 if param.get("delete") or trustee_id == -1 then 2.23 2.24 @@ -22,8 +26,10 @@ 2.25 slot.put_into("notice", _"Your delegation for this issue has been deleted.") 2.26 elseif area_id then 2.27 slot.put_into("notice", _"Your delegation for this area has been deleted.") 2.28 + elseif unit_id then 2.29 + slot.put_into("notice", _"Your delegation for this unit has been deleted.") 2.30 else 2.31 - slot.put_into("notice", _"Your global delegation has been deleted.") 2.32 + error("shouldn't happen") 2.33 end 2.34 2.35 end 2.36 @@ -33,14 +39,17 @@ 2.37 if not delegation then 2.38 delegation = Delegation:new() 2.39 delegation.truster_id = truster_id 2.40 + delegation.unit_id = unit_id 2.41 delegation.area_id = area_id 2.42 delegation.issue_id = issue_id 2.43 if issue_id then 2.44 delegation.scope = "issue" 2.45 elseif area_id then 2.46 delegation.scope = "area" 2.47 + elseif unit_id then 2.48 + delegation.scope = "unit" 2.49 else 2.50 - delegation.scope = "global" 2.51 + error("should'nt happen") 2.52 end 2.53 end 2.54 if trustee_id == 0 then 2.55 @@ -55,8 +64,10 @@ 2.56 slot.put_into("notice", _"Your delegation for this issue has been updated.") 2.57 elseif area_id then 2.58 slot.put_into("notice", _"Your delegation for this area has been updated.") 2.59 + elseif unit_id then 2.60 + slot.put_into("notice", _"Your delegation for this unit has been updated.") 2.61 else 2.62 - slot.put_into("notice", _"Your global delegation has been updated.") 2.63 + error("shouldn't happen") 2.64 end 2.65 2.66 end
3.1 --- a/app/main/lf2/_area.lua Mon Mar 07 12:15:22 2011 +0100 3.2 +++ b/app/main/lf2/_area.lua Sat Mar 12 19:22:50 2011 +0100 3.3 @@ -4,48 +4,46 @@ 3.4 3.5 local trustees = Member:new_selector() 3.6 :add_field("delegation_chain.*") 3.7 - :join("delegation_chain(" .. app.session.member_id .. ", " .. area.id .. ", NULL)", "delegation_chain", "member.id = delegation_chain.member_id") 3.8 + :join({ "delegation_chain(?, null, ?, null)", app.session.member_id, area.id }, "delegation_chain", "member.id = delegation_chain.member_id") 3.9 :add_order_by("index") 3.10 :exec() 3.11 3.12 + 3.13 ui.box{ class = "area", content = function() 3.14 - 3.15 ui.box_row{ class = "head", content = function() 3.16 - ui.box_col{ class = "head left name", content = area.name } 3.17 + ui.box_col{ class = "head left name", content = function() 3.18 + if membership then 3.19 + local text = _"You are member of this area" 3.20 + ui.image{ attr = { title = text, alt = text }, static = "lf2/icon_star.png" } 3.21 + else 3.22 + end 3.23 + slot.put(" ") 3.24 + ui.tag{ content = area.name } 3.25 + end } 3.26 ui.box_col{ class = "right", content = _("#{direct_count}+#{delegated_count} members", { 3.27 direct_count = area.direct_member_count, 3.28 delegated_count = area.member_weight - area.direct_member_count 3.29 } ) } 3.30 end } 3.31 3.32 - if area.description and #area.description > 0 then 3.33 - ui.box_row{ class = "description", content = function() ui.box_col{ content = area.description } end } 3.34 - end 3.35 - 3.36 if #trustees > 1 then 3.37 ui.box_row{ content = function() 3.38 ui.box_col{ class = "left", content = function() 3.39 execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small" } } 3.40 end } 3.41 - if trustees[1].scope_out == "area" then 3.42 - text = _"Change or revoke area delegation" 3.43 - else 3.44 - text = _"Set area delegation" 3.45 - end 3.46 - ui.box_col{ class = "right", content = function() 3.47 - ui.link{ 3.48 - text = text, 3.49 - module = "lf2", view = "delegation", params = { area_id = area.id } 3.50 - } 3.51 - end } 3.52 end } 3.53 end 3.54 3.55 ui.box_row{ content = function() 3.56 ui.box_col{ class = "left", content = function() 3.57 if membership then 3.58 - ui.image{ static = "lf2/icon_star.png" } 3.59 - slot.put(" ", _"You are member of this area") 3.60 + ui.link{ 3.61 + module = "membership", action = "update", params = { area_id = area.id, delete = true }, 3.62 + routing = { default = { 3.63 + mode = "redirect", module = "lf2", view = "area", id = area.id 3.64 + } }, 3.65 + text = _"Give up area membership" 3.66 + } 3.67 else 3.68 ui.link{ 3.69 module = "membership", action = "update", params = { area_id = area.id }, 3.70 @@ -55,27 +53,21 @@ 3.71 text = _"Become a member of this area" 3.72 } 3.73 end 3.74 - end } 3.75 - ui.box_col{ class = "right", content = function() 3.76 - if membership then 3.77 - ui.link{ 3.78 - module = "membership", action = "update", params = { area_id = area.id, delete = true }, 3.79 - routing = { default = { 3.80 - mode = "redirect", module = "lf2", view = "area", id = area.id 3.81 - } }, 3.82 - text = _"Give up membership" 3.83 - } 3.84 - end 3.85 - if #trustees == 1 then 3.86 - if membership then 3.87 - slot.put(" · ") 3.88 - end 3.89 - ui.link{ 3.90 - text = _"Set area delegation", 3.91 - module = "lf2", view = "delegation", params = { area_id = area.id } 3.92 - } 3.93 - end 3.94 + slot.put(" · ") 3.95 + if trustees[1].scope_out == "area" then 3.96 + text = _"Change or revoke area delegation" 3.97 + else 3.98 + text = _"Set area delegation" 3.99 + end 3.100 + ui.link{ 3.101 + text = text, 3.102 + module = "lf2", view = "delegation", params = { area_id = area.id } 3.103 + } 3.104 end } 3.105 end } 3.106 3.107 + if area.description and #area.description > 0 then 3.108 +-- ui.box_row{ class = "description", content = function() ui.box_col{ content = area.description } end } 3.109 + end 3.110 + 3.111 end } 3.112 \ No newline at end of file
4.1 --- a/app/main/lf2/_avatars.lua Mon Mar 07 12:15:22 2011 +0100 4.2 +++ b/app/main/lf2/_avatars.lua Sat Mar 12 19:22:50 2011 +0100 4.3 @@ -11,9 +11,9 @@ 4.4 end 4.5 local image 4.6 local text 4.7 - if member.scope_in == "global" then 4.8 - image = "lf2/icon_delegation_global.png" 4.9 - text = _"Global delegation" 4.10 + if member.scope_in == "unit" then 4.11 + image = "lf2/icon_delegation_unit.png" 4.12 + text = _"Unit delegation" 4.13 elseif member.scope_in == "area" then 4.14 image = "lf2/icon_delegation_area.png" 4.15 text = _"Area delegation"
5.1 --- a/app/main/lf2/_draft.lua Mon Mar 07 12:15:22 2011 +0100 5.2 +++ b/app/main/lf2/_draft.lua Sat Mar 12 19:22:50 2011 +0100 5.3 @@ -1,5 +1,3 @@ 5.4 local draft = param.get("draft", "table") 5.5 5.6 -ui.container{ attr = { class = "draft" }, content = function() 5.7 - slot.put(format.wiki_text(draft.content, draft.formatting_engine)) 5.8 -end } 5.9 +slot.put(format.wiki_text(draft.content, draft.formatting_engine))
6.1 --- a/app/main/lf2/_filter_view/10_topnav.lua Mon Mar 07 12:15:22 2011 +0100 6.2 +++ b/app/main/lf2/_filter_view/10_topnav.lua Sat Mar 12 19:22:50 2011 +0100 6.3 @@ -1,20 +1,11 @@ 6.4 execute.inner() 6.5 6.6 -local phase 6.7 -if app.topnav_phase then 6.8 - phase = app.topnav_phase 6.9 -else 6.10 - phase = param.get("phase") 6.11 -end 6.12 +local phase = app.topnav_phase 6.13 +local order = app.topnav_order 6.14 6.15 -local area_id 6.16 -if app.topnav_area_id then 6.17 - area_id = app.topnav_area_id 6.18 -else 6.19 - area_id = param.get_all_cgi()["area_id"] 6.20 -end 6.21 +local area_id = app.topnav_area_id 6.22 +local unit_id = app.topnav_unit_id 6.23 6.24 -local order = param.get("order") 6.25 6.26 local view 6.27 local id 6.28 @@ -23,6 +14,7 @@ 6.29 id = area_id 6.30 else 6.31 view = "index" 6.32 + id = unit_id 6.33 end 6.34 6.35 slot.select("topnav", function() 6.36 @@ -49,18 +41,31 @@ 6.37 } 6.38 6.39 ui.container{ attr = { class = "right" }, content = function() 6.40 - ui.link{ 6.41 - attr = { class = order == "last_change" and "active" or nil }, 6.42 - text = _"Last change", module = "lf2", view = view, id = id, params = { order = "last_change", state = state } 6.43 - } 6.44 - ui.link{ 6.45 - attr = { class = order == "time_left" and "active" or nil }, 6.46 - text = _"Time left", module = "lf2", view = view, id = id, params = { order = "time_left", state = state } 6.47 - } 6.48 - ui.link{ 6.49 - attr = { class = order == "interest" and "active" or nil }, 6.50 - text = _"Interest", module = "lf2", view = view, id = id, params = { order = "interest", state = state } 6.51 - } 6.52 + if not order then 6.53 + ui.tag{ attr = { class = "inactive" }, content = _"↕ Interest" } 6.54 + else 6.55 + ui.link{ 6.56 + attr = { class = order == "interest" and "active" or nil }, 6.57 + text = _"↕ Interest", module = "lf2", view = view, id = id, params = { phase = phase, order = "interest", state = state } 6.58 + } 6.59 + end 6.60 + 6.61 + if not order or phase == "closed" then 6.62 + ui.tag{ attr = { class = "inactive" }, content = _"↕ Time left" } 6.63 + else 6.64 + ui.link{ 6.65 + attr = { class = order == "time_left" and "active" or "" }, 6.66 + text = _"↕ Time left", module = "lf2", view = view, id = id, params = { phase = phase, order = "time_left", state = state } 6.67 + } 6.68 + end 6.69 + if not order then 6.70 + ui.tag{ attr = { class = "inactive" }, content = _"↕ Last change" } 6.71 + else 6.72 + ui.link{ 6.73 + attr = { class = order == "last_change" and "active" or nil }, 6.74 + text = _"↕ Last change", module = "lf2", view = view, id = id, params = { phase = phase, order = "last_change", state = state } 6.75 + } 6.76 + end 6.77 end } 6.78 6.79 end)
7.1 --- a/app/main/lf2/_interested.lua Mon Mar 07 12:15:22 2011 +0100 7.2 +++ b/app/main/lf2/_interested.lua Sat Mar 12 19:22:50 2011 +0100 7.3 @@ -1,13 +0,0 @@ 7.4 -local interested_members = param.get("interested_members", "table") 7.5 -local issue_id = param.get("issue_id", atom.integer) 7.6 -ui.box{ row_count = 2, content = function() 7.7 - ui.box_row{ class = "head interested", content = function() 7.8 - ui.box_col{ class = "head left", content = _"Members, interested in this issue" } 7.9 - ui.box_col{ class = "right", content = _("#{count} members", { count = #interested_members }) } 7.10 - end } 7.11 - ui.box_row{ class = "interested", content = function() 7.12 - ui.box_col{ class = "", content = function() 7.13 - execute.view{ module = "lf2", view = "_avatars", params = { members = interested_members, issue_id = issue_id } } 7.14 - end } 7.15 - end } 7.16 -end }
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/app/main/lf2/_issue.lua Sat Mar 12 19:22:50 2011 +0100 8.3 @@ -0,0 +1,178 @@ 8.4 +local issue = param.get("issue", "table") 8.5 +local for_list = param.get("for_list", atom.boolean) 8.6 + 8.7 +local initiatives = issue.initiatives 8.8 + 8.9 +local interested_members = issue.interested_members 8.10 + 8.11 +-- prepare interest of current user 8.12 +local interest = issue.interest 8.13 + 8.14 +-- prepare trustees 8.15 +local trustees = Member:new_selector() 8.16 + :add_field("delegation_chain.*") 8.17 + :join({ "delegation_chain(?, null, null, " .. tostring(issue.id or "NULL") .. ")", app.session.member.id }, "delegation_chain", "member.id = delegation_chain.member_id") 8.18 + :add_order_by("index") 8.19 + :exec() 8.20 + 8.21 +local global_delegation 8.22 +local area_delegation 8.23 +local issue_delegation 8.24 + 8.25 +for i, delegation in ipairs(issue.outgoing_delegations) do 8.26 + if delegation.scope == "global" then global_delegation = delegation 8.27 + elseif delegation.scope == "area" then area_delegation = delegation 8.28 + elseif delegation.scope == "issue" then issue_delegation = delegation 8.29 + end 8.30 +end 8.31 + 8.32 +local delegation = issue_delegation or area_delegation or global_delegation 8.33 + 8.34 +local delegating_interest = issue.delegating_interest 8.35 +--[[ 8.36 +local current_delegating_interest = false 8.37 + 8.38 +for i, trustee in ipairs(trustees) do 8.39 + if i > 1 and trustee.participation then 8.40 + delegating_interest = true 8.41 + end 8.42 +end 8.43 +--]] 8.44 +local row_count = #initiatives + 3 8.45 +if #trustees > 1 then 8.46 + row_count = row_count + 1 8.47 +end 8.48 + 8.49 +ui.box{ class = "issue", content = function() 8.50 + ui.box_row{ class = "head", content = function() 8.51 + 8.52 + ui.box_col{ class = "issue_id left head", content = function() 8.53 + if interest then 8.54 + local text 8.55 + if issue.close then 8.56 + text = _"You were interested in this issue" 8.57 + else 8.58 + text = _"You are interested in this issue" 8.59 + end 8.60 + ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_star.png" } 8.61 + elseif delegating_interest then 8.62 + local text 8.63 + if issue.closed then 8.64 + text = _"Someone in your delegation chain was interested" 8.65 + else 8.66 + text = _"Someone in your delegation chain is interested" 8.67 + end 8.68 + ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_delegated_star.png" } 8.69 + end 8.70 + slot.put(" ") 8.71 + ui.link{ 8.72 + module = "lf2", view = "issue", id = issue.id, 8.73 + content = _("Issue ##{id}", { id = issue.id }) 8.74 + } 8.75 + end } 8.76 + 8.77 + end } 8.78 + 8.79 + if #trustees > 1 then 8.80 + ui.box_row{ class = "head2", content = function() 8.81 + ui.box_col{ class = "head left", content = function() 8.82 + execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 8.83 + end } 8.84 + end } 8.85 + end 8.86 + 8.87 + if not issue.closed and not issue.fully_frozen then 8.88 + ui.box_row{ content = function() 8.89 + ui.box_col{ class = "head", content = function() 8.90 + if interest then 8.91 + ui.link{ 8.92 + text = _"Remove interest", 8.93 + module = "interest", action = "update", params = { issue_id = issue.id, delete = true }, 8.94 + routing = { default = { mode = "redirect", module = "lf2", view = "issue", id = issue.id } } 8.95 + } 8.96 + elseif not issue.closed and not issue.fully_frozen then 8.97 + ui.link{ 8.98 + text = _"Add my interest", 8.99 + module = "interest", action = "update", params = { issue_id = issue.id }, 8.100 + routing = { default = { mode = "redirect", module = "lf2", view = "issue", id = issue.id } } 8.101 + } 8.102 + end 8.103 + if #trustees == 1 then 8.104 + ui.link{ 8.105 + text = _"Set issue delegation", 8.106 + module = "lf2", view = "delegation", params = { issue_id = issue.id } 8.107 + } 8.108 + end 8.109 + slot.put(" · ") 8.110 + if not issue.closed and not issue.fully_frozen then 8.111 + if trustees[1].scope_out == "issue" then 8.112 + text = _"Change or revoke issue delegation" 8.113 + else 8.114 + text = _"Set issue delegation" 8.115 + end 8.116 + ui.link{ 8.117 + text = text, 8.118 + module = "lf2", view = "delegation", params = { issue_id = issue.id } 8.119 + } 8.120 + end 8.121 + end } 8.122 + 8.123 + end } 8.124 + end 8.125 + 8.126 + ui.box_row{ content = function() 8.127 + ui.box_col{ class = "unit_name left", content = function() 8.128 + ui.link{ 8.129 + module = "lf2", view = "index", id = issue.area.unit_id, 8.130 + params = { phase = issue.phase }, 8.131 + text = issue.area.unit.name 8.132 + } 8.133 + end } 8.134 + ui.box_col{ class = "policy_name right", content = function() 8.135 + ui.link{ 8.136 + module = "lf2", view = "policy", id = issue.policy_id, 8.137 + content = issue.policy.name 8.138 + } 8.139 + end } 8.140 + end } 8.141 + 8.142 + ui.box_row{ content = function() 8.143 + ui.box_col{ class = "area_name left", content = function() 8.144 + ui.link{ 8.145 + module = "lf2", view = "area", id = issue.area_id, 8.146 + params = { phase = issue.phase }, 8.147 + text = issue.area.name 8.148 + } 8.149 + end } 8.150 + ui.box_col{ class = "state_time_left right", content = function() 8.151 + ui.tag{ content = issue.state_name } 8.152 + slot.put(" · ") 8.153 + ui.tag{ content = issue.closed and _("since #{date}", { date = format.date(issue.closed.date) }) or _("#{time_left} left", { time_left = issue.state_time_left }) } 8.154 + end } 8.155 + end } 8.156 + 8.157 + 8.158 + ui.box_row{ class = "subhead", content = function() 8.159 + ui.box_col{ class = "head", content = _"Initiatives" } 8.160 + end } 8.161 + 8.162 + for i, initiative in ipairs(issue.initiatives) do 8.163 + ui.box_row{ class = "initiative", content = function() ui.box_col { content = function() 8.164 + execute.view{ module = "lf2", view = "_initiative", params = { initiative = initiative } } 8.165 + end } end } 8.166 + end 8.167 + if not for_list then 8.168 + -- TODO bugfix for not working reference loader 8.169 + interested_members = issue:get_reference_selector("interested_members_snapshot"):exec() 8.170 + 8.171 + ui.box_row{ class = "subhead", content = function() 8.172 + ui.box_col{ class = "head left", content = _"Members, interested in this issue" } 8.173 + ui.box_col{ class = "right", content = _("#{count} members", { count = #interested_members }) } 8.174 + end } 8.175 + ui.box_row{ class = "interested", content = function() 8.176 + ui.box_col{ class = "", content = function() 8.177 + execute.view{ module = "lf2", view = "_avatars", params = { members = interested_members, issue_id = issue.id } } 8.178 + end } 8.179 + end } 8.180 + end 8.181 +end } 8.182 \ No newline at end of file
9.1 --- a/app/main/lf2/_issues.lua Mon Mar 07 12:15:22 2011 +0100 9.2 +++ b/app/main/lf2/_issues.lua Sat Mar 12 19:22:50 2011 +0100 9.3 @@ -1,161 +1,5 @@ 9.4 local issues = param.get("issues", "table") 9.5 9.6 for i, issue in ipairs(issues) do 9.7 - local initiatives = issue.initiatives 9.8 - 9.9 - local interested_members = issue.interested_members 9.10 - 9.11 - -- prepare interest of current user 9.12 - local interest = issue.interest 9.13 - 9.14 - -- prepare trustees 9.15 - local trustees = Member:new_selector() 9.16 - :add_field("delegation_chain.*") 9.17 - :join("delegation_chain(" .. tostring(app.session.member.id) .. ", NULL, " .. tostring(issue.id or "NULL") .. ")", "delegation_chain", "member.id = delegation_chain.member_id") 9.18 - :add_order_by("index") 9.19 - :exec() 9.20 - 9.21 - local global_delegation 9.22 - local area_delegation 9.23 - local issue_delegation 9.24 - 9.25 - for i, delegation in ipairs(issue.outgoing_delegations) do 9.26 - if delegation.scope == "global" then global_delegation = delegation 9.27 - elseif delegation.scope == "area" then area_delegation = delegation 9.28 - elseif delegation.scope == "issue" then issue_delegation = delegation 9.29 - end 9.30 - end 9.31 - 9.32 - local delegation = issue_delegation or area_delegation or global_delegation 9.33 - 9.34 - local delegating_interest = issue.delegating_interest 9.35 - --[[ 9.36 - local current_delegating_interest = false 9.37 - 9.38 - for i, trustee in ipairs(trustees) do 9.39 - if i > 1 and trustee.participation then 9.40 - delegating_interest = true 9.41 - end 9.42 - end 9.43 - --]] 9.44 - local row_count = #initiatives + 3 9.45 - if #trustees > 1 then 9.46 - row_count = row_count + 1 9.47 - end 9.48 - 9.49 - ui.box{ class = "issue", row_count = row_count, content = function() 9.50 - 9.51 - ui.box_row{ class = "head2", content = function() 9.52 - 9.53 - ui.box_col{ class = "issue_id left head", content = function() 9.54 - ui.link{ 9.55 - module = "lf2", view = "issue", id = issue.id, 9.56 - content = _("Issue ##{id}", { id = issue.id }) 9.57 - } 9.58 - end } 9.59 - 9.60 - ui.box_col{ class = "policy_name right", content = function() 9.61 - ui.link{ 9.62 - module = "lf2", view = "policy", id = issue.policy_id, 9.63 - content = issue.policy.name 9.64 - } 9.65 - end } 9.66 - 9.67 - end } 9.68 - 9.69 - ui.box_row{ class = "head2", content = function() 9.70 - 9.71 - ui.box_col{ class = "state_name left", content = function() 9.72 - ui.tag{ content = issue.state_name } 9.73 - end } 9.74 - ui.box_col{ class = "state_time_left right", content = function() 9.75 - ui.tag{ content = issue.closed and _("since #{date}", { date = format.date(issue.closed.date) }) or _("#{time_left} left", { time_left = issue.state_time_left }) } 9.76 - end } 9.77 - end } 9.78 - 9.79 - if #trustees > 1 then 9.80 - local class = "head" 9.81 - if not issue.closed and not issue.fully_frozen then 9.82 - class = "head2" 9.83 - end 9.84 - ui.box_row{ class = "head2", content = function() 9.85 - ui.box_col{ class = "left", content = function() 9.86 - execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 9.87 - end } 9.88 - if not issue.closed and not issue.fully_frozen then 9.89 - if trustees[1].scope_out == "issue" then 9.90 - text = _"Change or revoke issue delegation" 9.91 - else 9.92 - text = _"Set issue delegation" 9.93 - end 9.94 - ui.box_col{ class = "right", content = function() 9.95 - ui.link{ 9.96 - text = text, 9.97 - module = "lf2", view = "delegation", params = { issue_id = issue.id } 9.98 - } 9.99 - end } 9.100 - end 9.101 - end } 9.102 - end 9.103 - 9.104 - if not issue.closed and not issue.fully_frozen then 9.105 - ui.box_row{ class = "head", content = function() 9.106 - ui.box_col{ class = "interest left", content = function() 9.107 - if interest then 9.108 - ui.image{ static = "lf2/icon_star.png" } 9.109 - if issue.close then 9.110 - slot.put(" ", _"You were interested in this issue") 9.111 - else 9.112 - slot.put(" ", _"You are interested in this issue") 9.113 - end 9.114 - elseif delegating_interest then 9.115 - ui.image{ static = "lf2/icon_delegated_star.png" } 9.116 - if issue.closed then 9.117 - slot.put(" ", _"Someone in your delegation chain was interested") 9.118 - else 9.119 - slot.put(" ", _"Someone in your delegation chain is interested") 9.120 - end 9.121 - elseif not issue.closed and not issue.fully_frozen then 9.122 - ui.link{ 9.123 - text = _"Add my interest", 9.124 - module = "interest", action = "update", params = { issue_id = issue.id }, 9.125 - routing = { default = { mode = "redirect", module = "lf2", view = "issue", id = issue.id } } 9.126 - } 9.127 - end 9.128 - end } 9.129 - 9.130 - ui.box_col{ class = "right", content = function() 9.131 - if interest then 9.132 - ui.link{ 9.133 - text = _"Remove interest", 9.134 - module = "interest", action = "update", params = { issue_id = issue.id, delete = true }, 9.135 - routing = { default = { mode = "redirect", module = "lf2", view = "issue", id = issue.id } } 9.136 - } 9.137 - slot.put(" · ") 9.138 - elseif delegating_interest then 9.139 - ui.link{ 9.140 - text = _"Add my interest", 9.141 - module = "interest", action = "update", params = { issue_id = issue.id }, 9.142 - routing = { default = { mode = "redirect", module = "lf2", view = "issue", id = issue.id } } 9.143 - } 9.144 - slot.put(" · ") 9.145 - end 9.146 - if #trustees == 1 then 9.147 - ui.link{ 9.148 - text = _"Set issue delegation", 9.149 - module = "lf2", view = "delegation", params = { issue_id = issue.id } 9.150 - } 9.151 - end 9.152 - end } 9.153 - end } 9.154 - 9.155 - end 9.156 - 9.157 - for i, initiative in ipairs(issue.initiatives) do 9.158 - ui.box_row{ class = "initiative", content = function() ui.box_col { content = function() 9.159 - execute.view{ module = "lf2", view = "_initiative", params = { initiative = initiative } } 9.160 - end } end } 9.161 - end 9.162 - 9.163 - end } 9.164 -end 9.165 \ No newline at end of file 9.166 + execute.view{ module = "lf2", view = "_issue", params = { issue = issue, for_list = true } } 9.167 +end
10.1 --- a/app/main/lf2/_sidebar_issue.lua Mon Mar 07 12:15:22 2011 +0100 10.2 +++ b/app/main/lf2/_sidebar_issue.lua Sat Mar 12 19:22:50 2011 +0100 10.3 @@ -15,7 +15,7 @@ 10.4 10.5 local trustees = Member:new_selector() 10.6 :add_field("delegation_chain.*") 10.7 - :join("delegation_chain(" .. tostring(app.session.member.id) .. ", NULL, " .. tostring(issue.id or "NULL") .. ")", "delegation_chain", "member.id = delegation_chain.member_id") 10.8 + :join("delegation_chain(" .. tostring(app.session.member.id) .. ", NULL, NULL, " .. tostring(issue.id or "NULL") .. ")", "delegation_chain", "member.id = delegation_chain.member_id") 10.9 :add_order_by("index") 10.10 :exec() 10.11 10.12 @@ -23,27 +23,91 @@ 10.13 10.14 ui.box{ class = "issue", content = function() 10.15 10.16 - ui.box_row{ class = "unit_name head2x", content = function() ui.box_col{ content = function() 10.17 + ui.box_row{ class = "issue_id head", content = function() ui.box_col{ class = "head", content = function() 10.18 + if interest then 10.19 + local text 10.20 + if issue.close then 10.21 + text = _"You were interested in this issue" 10.22 + else 10.23 + text = _"You are interested in this issue" 10.24 + end 10.25 + ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_star.png" } 10.26 + slot.put(" ") 10.27 + elseif delegating_interest then 10.28 + local text 10.29 + if issue.closed then 10.30 + text = _"Someone in your delegation chain was interested" 10.31 + else 10.32 + text = _"Someone in your delegation chain is interested" 10.33 + end 10.34 + ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_delegated_star.png" } 10.35 + slot.put(" ") 10.36 + end 10.37 + ui.link{ 10.38 + module = "lf2", view = "issue", id = issue.id, 10.39 + content = _("Issue ##{id}", { id = issue.id }) 10.40 + } 10.41 + end } end } 10.42 + 10.43 + if #trustees > 1 then 10.44 + ui.box_row{ class = "delegation", content = function() ui.box_col{ content = function() 10.45 + execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 10.46 + end } end } 10.47 + end 10.48 + 10.49 + if not issue.closed then 10.50 + ui.box_row{ class = "interest", content = function() ui.box_col{ content = function() 10.51 + if interest then 10.52 + ui.link{ 10.53 + module = "interest", action = "update", params = { issue_id = issue.id, delete = true }, 10.54 + routing = { default = { 10.55 + mode = "redirect", module = "lf2", view = initiative_id and "initiative" or "issue", id = initiative_id or issue.id, 10.56 + } }, 10.57 + content = _"Remove my interest" 10.58 + } 10.59 + else 10.60 + ui.link{ 10.61 + module = "interest", action = "update", params = { issue_id = issue.id }, 10.62 + routing = { default = { 10.63 + mode = "redirect", module = "lf2", view = initiative_id and "initiative" or "issue", id = initiative_id or issue.id, 10.64 + } }, 10.65 + content = _"Add my interest" 10.66 + } 10.67 + end 10.68 + end } end } 10.69 + end 10.70 + 10.71 + if not issue.closed then 10.72 + ui.box_row{ class = "interest", content = function() ui.box_col{ content = function() 10.73 + if #trustees > 1 and trustees[1].scope_out == "issue" then 10.74 + ui.link{ 10.75 + module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 10.76 + content = _"Set issue delegation" 10.77 + } 10.78 + else 10.79 + ui.link{ 10.80 + module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 10.81 + content = _"Change or remove delegation" 10.82 + } 10.83 + end 10.84 + 10.85 + end } end } 10.86 + end 10.87 + 10.88 + ui.box_row{ class = "unit_name", content = function() ui.box_col{ content = function() 10.89 ui.link{ 10.90 module = "lf2", view = "index", id = 1, 10.91 content = "DE / Berlin / Friedrichshain-Kreuzberg" 10.92 } 10.93 end } end } 10.94 10.95 - ui.box_row{ class = "area_name head2x", content = function() ui.box_col{ content = function() 10.96 + ui.box_row{ class = "area_name", content = function() ui.box_col{ content = function() 10.97 ui.link{ 10.98 module = "lf2", view = "area", id = issue.area_id, 10.99 content = issue.area.name 10.100 } 10.101 end } end } 10.102 10.103 - ui.box_row{ class = "issue_id subhead", content = function() ui.box_col{ class = "head", content = function() 10.104 - ui.link{ 10.105 - module = "lf2", view = "issue", id = issue.id, 10.106 - content = _("Issue ##{id}", { id = issue.id }) 10.107 - } 10.108 - end } end } 10.109 - 10.110 ui.box_row{ class = "policy_name", content = function() ui.box_col{ content = function() 10.111 ui.link{ 10.112 module = "lf2", view = "policy", id = issue.policy_id, 10.113 @@ -58,143 +122,14 @@ 10.114 ui.tag{ content = issue.closed and _("since #{date}", { date = format.date(issue.closed.date) }) or _("#{time_left} left", { time_left = issue.state_time_left }) } 10.115 end } 10.116 end } 10.117 - 10.118 - ui.box_row{ class = "interest hoverbutton_container", content = function() ui.box_col{ content = function() 10.119 - if interest then 10.120 - ui.image{ static = "lf2/icon_star.png" } 10.121 - if issue.closed then 10.122 - slot.put(" ", _"You were interested in this issue") 10.123 - else 10.124 - slot.put(" ", _"You are interested in this issue") 10.125 - end 10.126 - else 10.127 - if not issue.closed and not issue.fully_frozen then 10.128 - ui.image{ static = "lf2/icon_star_grey.png" } 10.129 - end 10.130 - slot.put(" ", _"You are not interested in this issue") 10.131 - end 10.132 - 10.133 - if issue.closed then 10.134 - ui.container{ attr = { class = "hoverbutton noaction"}, content = function() 10.135 - ui.container{ attr = { class = "content"}, content = function() 10.136 - slot.put(" ", encode.html(_"This issue is closed")) 10.137 - end } 10.138 - end } 10.139 - elseif issue.fully_frozen then 10.140 - ui.container{ attr = { class = "hoverbutton noaction"}, content = function() 10.141 - ui.container{ attr = { class = "content"}, content = function() 10.142 - slot.put(" ", encode.html(_"This issue is in voting")) 10.143 - end } 10.144 - end } 10.145 - else 10.146 - if interest then 10.147 - ui.link{ 10.148 - module = "interest", action = "update", params = { issue_id = issue.id, delete = true }, 10.149 - routing = { default = { 10.150 - mode = "redirect", module = "lf2", view = initiative_id and "initiative" or "issue", id = initiative_id or issue.id, 10.151 - } }, 10.152 - attr = { class = "hoverbutton red"}, 10.153 - content = function() 10.154 - ui.container{ attr = { class = "content"}, content = function() 10.155 - ui.image{ static = "lf2/icon_star_crossed.png" } 10.156 - slot.put(" ", encode.html(_"Remove my interest")) 10.157 - end } 10.158 - end 10.159 - } 10.160 - 10.161 - else 10.162 - ui.link{ 10.163 - module = "interest", action = "update", params = { issue_id = issue.id }, 10.164 - routing = { default = { 10.165 - mode = "redirect", module = "lf2", view = initiative_id and "initiative" or "issue", id = initiative_id or issue.id, 10.166 - } }, 10.167 - attr = { class = "hoverbutton green"}, 10.168 - content = function() 10.169 - ui.container{ attr = { class = "content"}, content = function() 10.170 - ui.image{ static = "lf2/icon_star.png" } 10.171 - slot.put(" ", encode.html(_"Add my interest")) 10.172 - end 10.173 - } 10.174 - end } 10.175 - 10.176 - end 10.177 - end 10.178 - end } end } 10.179 - 10.180 - ui.box_row{ class = "delegation hoverbutton_container", content = function() ui.box_col{ content = function() 10.181 - if trustees[1].scope_out then 10.182 - ui.image{ static = "lf2/icon_delegation.png" } 10.183 - slot.put(" ") 10.184 - if trustees[1].disabled_out == false then 10.185 - if trustees[1].scope_out == "issue" then 10.186 - slot.put(encode.html(_"Issue is delegated")) 10.187 - elseif trustees[1].scope_out == "area" then 10.188 - slot.put(encode.html(_"Area is delegated")) 10.189 - elseif trustees[1].scope_out == "global" then 10.190 - slot.put(encode.html(_"Unit wide delegated")) 10.191 - end 10.192 - else 10.193 - if trustees[1].scope_out == "issue" then 10.194 - slot.put(encode.html(_"Issue delegation abandoned")) 10.195 - elseif trustees[1].scope_out == "area" then 10.196 - slot.put(encode.html(_"Area delegation abandoned")) 10.197 - elseif trustees[1].scope_out == "global" then 10.198 - slot.put(encode.html(_"Global delegation abandoned")) 10.199 - end 10.200 - end 10.201 - else 10.202 - slot.put(encode.html(_"No delegation active")) 10.203 - end 10.204 - 10.205 - if issue.closed then 10.206 - ui.container{ attr = { class = "hoverbutton noaction"}, content = function() 10.207 - ui.container{ attr = { class = "content"}, content = function() 10.208 - slot.put(" ", encode.html(_"This issue is closed")) 10.209 - end } 10.210 - end } 10.211 - elseif issue.fully_frozen then 10.212 - ui.container{ attr = { class = "hoverbutton noaction"}, content = function() 10.213 - ui.container{ attr = { class = "content"}, content = function() 10.214 - slot.put(" ", encode.html(_"This issue is in voting")) 10.215 - end } 10.216 - end } 10.217 - else 10.218 - if #trustees > 1 and trustees[1].scope_out == "issue" then 10.219 - ui.link{ 10.220 - module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 10.221 - attr = { class = "hoverbutton red"}, content = function() 10.222 - ui.container{ attr = { class = "content"}, content = function() 10.223 - slot.put(" ", encode.html(_"Change issue delegation")) 10.224 - end } 10.225 - end } 10.226 - 10.227 - else 10.228 - ui.link{ 10.229 - module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 10.230 - attr = { class = "hoverbutton green"}, content = function() 10.231 - ui.container{ attr = { class = "content"}, content = function() 10.232 - slot.put(" ", encode.html(_"Set issue delegation")) 10.233 - 10.234 - end } 10.235 - end } 10.236 - 10.237 - end 10.238 - end 10.239 - 10.240 - end } end } 10.241 - 10.242 - if #trustees > 1 then 10.243 - ui.box_row{ class = "delegation", content = function() ui.box_col{ content = function() 10.244 - execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 10.245 - end } end } 10.246 - end 10.247 10.248 ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Initiatives" } end } 10.249 ui.box_row{ class = "initiatives last", content = function() 10.250 - ui.box_col{ class = "scrolled", content = function() 10.251 + ui.box_col{ id = "resizable", class = "scrolled", content = function() 10.252 execute.view{ module = "lf2", view = "_issue_initiatives", params = { initiatives = alternative_initiatives, current_initiative_id = initiative_id } } 10.253 end } 10.254 end } 10.255 10.256 + ui.script{ script = "$(function() { $( '#resizable' ).resizable(); });" } 10.257 10.258 end }
11.1 --- a/app/main/lf2/_sidebar_unit.lua Mon Mar 07 12:15:22 2011 +0100 11.2 +++ b/app/main/lf2/_sidebar_unit.lua Sat Mar 12 19:22:50 2011 +0100 11.3 @@ -1,57 +1,86 @@ 11.4 +local unit = param.get("unit", "table") 11.5 + 11.6 local current_area_id = param.get("current_area_id", atom.integer) 11.7 local current_phase = param.get_all_cgi()["phase"] 11.8 11.9 -local member_areas_selector = Area:build_selector{ 11.10 - member_id = app.session.member_id, 11.11 - order = "name" 11.12 -} 11.13 -local other_areas_selector = Area:build_selector{ 11.14 - not_member_id = app.session.member_id, 11.15 - order = "name" 11.16 +local records = { 11.17 + { id = 0, name = _"All units" }, 11.18 + { id = "disabled", name = "" }, 11.19 + { id = "disabled", name = _"Units, you are member of:" }, 11.20 } 11.21 11.22 -local unit = {} 11.23 - 11.24 -local trustees = Member:new_selector() 11.25 - :add_field("delegation_chain.*") 11.26 - :join("delegation_chain(" .. tostring(app.session.member.id) .. ", NULL, NULL)", "delegation_chain", "member.id = delegation_chain.member_id") 11.27 - :add_order_by("index") 11.28 - :exec() 11.29 - 11.30 -local row_count = member_areas_selector:count() + other_areas_selector:count() + 4 11.31 -if #trustees > 1 then 11.32 - row_count = row_count + 1 11.33 + 11.34 +for i, unit in ipairs(Unit:get_flattened_tree()) do 11.35 + records[#records+1] = { id = unit.id, name = unit.flattened_tree_name } 11.36 end 11.37 11.38 -ui.box{ row_count = row_count, content = function() 11.39 +records[#records+1] = { id = "disabled", name = "" } 11.40 +records[#records+1] = { id = -1, name = _"Other units..." } 11.41 + 11.42 +ui.box{ content = function() 11.43 ui.box_row{ class = "head", content = function() 11.44 - ui.box_col{ class = "head", content = _"DE / Berlin / Friedrichshain-Kreuzberg" } 11.45 + ui.box_col{ class = "head", content = function() 11.46 + ui.form{ 11.47 + method = "GET", 11.48 + module = "lf2", view = "index", 11.49 + content = function() 11.50 + ui.field.select{ 11.51 + attr = { onchange = "this.form.submit();" }, 11.52 + name = "_webmcp_id", 11.53 + foreign_records = records, 11.54 + foreign_id = "id", 11.55 + foreign_name = "name", 11.56 + disabled_records = { disabled = true }, 11.57 + value = unit and unit.id or 0 11.58 + } 11.59 + end 11.60 + } 11.61 + end } 11.62 end } 11.63 - 11.64 - if #trustees > 1 then 11.65 + 11.66 + if unit then 11.67 + local trustees = Member:new_selector() 11.68 + :add_field("delegation_chain.*") 11.69 + :join({ "delegation_chain(?, ?, NULL, NULL)", app.session.member.id, unit.id }, "delegation_chain", "member.id = delegation_chain.member_id") 11.70 + :add_order_by("index") 11.71 + :exec() 11.72 + 11.73 + if #trustees > 1 then 11.74 + ui.box_row{ content = function() ui.box_col{ content = function() 11.75 + execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small" } } 11.76 + end } end } 11.77 + end 11.78 + 11.79 ui.box_row{ content = function() ui.box_col{ content = function() 11.80 - execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small" } } 11.81 + if trustees[1].scope_out == "global" then 11.82 + text = _"Change or revoke unit delegation" 11.83 + else 11.84 + text = _"Set unit delegation" 11.85 + end 11.86 + ui.link{ 11.87 + text = text, 11.88 + module = "lf2", view = "delegation", params = { unit_id = unit.id } 11.89 + } 11.90 end } end } 11.91 end 11.92 - 11.93 - ui.box_row{ content = function() ui.box_col{ content = function() 11.94 - if trustees[1].scope_out == "global" then 11.95 - text = _"Change or revoke unit delegation" 11.96 - else 11.97 - text = _"Set unit delegation" 11.98 - end 11.99 - ui.link{ 11.100 - text = text, 11.101 - module = "lf2", view = "delegation", params = { unit_id = unit.id } 11.102 - } 11.103 - end } end } 11.104 - 11.105 - 11.106 - ui.form{ 11.107 - method = "get", 11.108 - content = function() 11.109 - 11.110 - ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = function() 11.111 + 11.112 +end } 11.113 + 11.114 +if unit then 11.115 + local member_areas_selector = Area:build_selector{ 11.116 + unit_id = unit.id, 11.117 + member_id = app.session.member_id, 11.118 + order = "name" 11.119 + } 11.120 + local other_areas_selector = Area:build_selector{ 11.121 + unit_id = unit.id, 11.122 + not_member_id = app.session.member_id, 11.123 + order = "name" 11.124 + } 11.125 + 11.126 + if member_areas_selector:count() > 0 then 11.127 + ui.box{ content = function() 11.128 + ui.box_row{ class = "head", content = function() ui.box_col{ class = "head", content = function() 11.129 ui.link{ text = _"Areas, you are member of", module = "lf2", view = "index" } 11.130 end } end } 11.131 11.132 @@ -62,9 +91,13 @@ 11.133 current_phase = current_phase 11.134 } 11.135 } 11.136 + end } 11.137 + end 11.138 11.139 - ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = function() 11.140 - ui.link{ content = _"Other areas", module = "lf2", view = "index" } 11.141 + if other_areas_selector:count() > 0 then 11.142 + ui.box{ content = function() 11.143 + ui.box_row{ class = "head", content = function() ui.box_col{ class = "head", content = function() 11.144 + ui.link{ content = _"Areas", module = "lf2", view = "index" } 11.145 end } end } 11.146 11.147 execute.view{ 11.148 @@ -74,10 +107,8 @@ 11.149 current_phase = current_phase 11.150 } 11.151 } 11.152 - 11.153 - end 11.154 - } 11.155 - 11.156 -end } 11.157 + end } 11.158 + end 11.159 +end 11.160 11.161 execute.view{ module = "lf2", view = "_search", params = { area = area } }
12.1 --- a/app/main/lf2/area.lua Mon Mar 07 12:15:22 2011 +0100 12.2 +++ b/app/main/lf2/area.lua Sat Mar 12 19:22:50 2011 +0100 12.3 @@ -1,18 +1,12 @@ 12.4 local area = Area:by_id(param.get_id()) 12.5 12.6 -slot.set_layout("lf2") 12.7 - 12.8 -slot.select("sidebar", function() 12.9 - execute.view{ module = "lf2", view = "_sidebar_unit", params = { current_area_id = area.id } } 12.10 -end) 12.11 - 12.12 -execute.view{ module = "lf2", view = "_area", params = { area = area } } 12.13 - 12.14 +local current_phase = param.get("phase") or "closed" 12.15 +local current_order = param.get("order") or "last_change" 12.16 12.17 local issues_selector = Issue:build_selector{ 12.18 area_id = area.id, 12.19 - phase = param.get("phase"), 12.20 - order = param.get("order") 12.21 + phase = current_phase, 12.22 + order = current_order 12.23 }:limit(25) 12.24 12.25 local issues = issues_selector:exec() 12.26 @@ -21,7 +15,18 @@ 12.27 issues:load("interest_for_member", { member_id = app.session.member_id }, "interest") 12.28 issues:load("outgoing_delegations_for_member", { member_id = app.session.member_id }, "outgoing_delegations") 12.29 12.30 +app.topnav_order = current_order 12.31 +app.topnav_phase = current_phase 12.32 +app.topnav_area_id = area.id 12.33 +app.topnav_unit_id = area.unit_id 12.34 12.35 -app.topnav_area_id = area.id 12.36 + 12.37 +slot.set_layout("lf2") 12.38 + 12.39 +slot.select("sidebar", function() 12.40 + execute.view{ module = "lf2", view = "_sidebar_unit", params = { unit = area.unit, current_area_id = area.id } } 12.41 +end) 12.42 + 12.43 +execute.view{ module = "lf2", view = "_area", params = { area = area } } 12.44 12.45 execute.view{ module = "lf2", view = "_issues", params = { issues = issues } }
13.1 --- a/app/main/lf2/delegation.lua Mon Mar 07 12:15:22 2011 +0100 13.2 +++ b/app/main/lf2/delegation.lua Sat Mar 12 19:22:50 2011 +0100 13.3 @@ -2,6 +2,10 @@ 13.4 13.5 local area = Area:by_id(param.get("area_id", atom.integer)) 13.6 local issue = Issue:by_id(param.get("issue_id", atom.integer)) 13.7 +local unit = Unit:by_id(param.get("unit_id", atom.integer)) 13.8 + 13.9 +local delegation = Delegation:by_pk(app.session.member_id, unit and unit.id or nil, area and area.id or nil, issue and issue.id or nil) 13.10 + 13.11 local initiative = Initiative:by_id(param.get("initiative_id", atom.integer)) 13.12 13.13 local contact_members = Member:build_selector{ 13.14 @@ -10,15 +14,15 @@ 13.15 }:exec() 13.16 13.17 if area then 13.18 - title = _"Set delegation for Area '#{name}'":gsub("#{name}", area.name) 13.19 + title = _("Set delegation for area '#{name}'", { name = area.name }) 13.20 end 13.21 13.22 if issue then 13.23 - title = _"Set delegation for Issue ##{number} in Area '#{area_name}'":gsub("#{number}", issue.id):gsub("#{area_name}", issue.area.name) 13.24 + title = _("Set delegation for issue ##{number} in area '#{area_name}'", { number = issue.id, area_name = issue.area.name }) 13.25 end 13.26 13.27 if not area and not issue then 13.28 - title = _"Set unit delegation" 13.29 + title = _("Set delegation for unit #{name}", { name = unit.name }) 13.30 end 13.31 13.32 ui.box{ content = function() 13.33 @@ -30,6 +34,7 @@ 13.34 module = "delegation", 13.35 action = "update", 13.36 params = { 13.37 + unit_id = unit and unit.id or nil, 13.38 area_id = area and area.id or nil, 13.39 issue_id = issue and issue.id or nil, 13.40 }, 13.41 @@ -121,12 +126,13 @@ 13.42 13.43 ui.box_row{ content = function() ui.box_col{ content = function() 13.44 ui.field.select{ 13.45 - label = _"Trustee", 13.46 + label = _"Delegate", 13.47 name = "trustee_id", 13.48 foreign_records = records, 13.49 foreign_id = "id", 13.50 foreign_name = "name", 13.51 - disabled_records = disabled_records 13.52 + disabled_records = disabled_records, 13.53 + value = delegation and delegation.trustee_id or nil 13.54 } 13.55 end } end } 13.56
14.1 --- a/app/main/lf2/index.lua Mon Mar 07 12:15:22 2011 +0100 14.2 +++ b/app/main/lf2/index.lua Sat Mar 12 19:22:50 2011 +0100 14.3 @@ -1,9 +1,23 @@ 14.4 slot.set_layout("lf2") 14.5 14.6 -local current_phase = param.get("phase") 14.7 -local current_order = param.get("order") 14.8 +local unit = Unit:by_id(param.get_id()) 14.9 + 14.10 +local current_phase = param.get("phase") or "closed" 14.11 +local current_order = param.get("order") or "last_change" 14.12 + 14.13 +if current_phase == "closed" and current_order == "time_left" then 14.14 + current_order = "last_change" 14.15 +end 14.16 + 14.17 +app.topnav_phase = current_phase 14.18 +app.topnav_order = current_order 14.19 +if unit then 14.20 + app.topnav_unit_id = unit.id 14.21 +end 14.22 + 14.23 14.24 local issues_selector = Issue:build_selector{ 14.25 + unit_id = unit and unit.id or nil, 14.26 phase = current_phase, 14.27 order = current_order 14.28 }:limit(25) 14.29 @@ -16,7 +30,7 @@ 14.30 14.31 14.32 slot.select("sidebar", function() 14.33 - execute.view{ module = "lf2", view = "_sidebar_unit" } 14.34 + execute.view{ module = "lf2", view = "_sidebar_unit", params = { unit = unit } } 14.35 end) 14.36 14.37 execute.view{ module = "lf2", view = "_issues", params = { issues = issues } }
15.1 --- a/app/main/lf2/initiative.lua Mon Mar 07 12:15:22 2011 +0100 15.2 +++ b/app/main/lf2/initiative.lua Sat Mar 12 19:22:50 2011 +0100 15.3 @@ -27,7 +27,8 @@ 15.4 local support = Supporter:by_pk(initiative.id, app.session.member.id) 15.5 15.6 app.topnav_phase = issue.phase 15.7 - 15.8 +app.topnav_area_id = issue.area_id 15.9 +app.topnav_unit_id = issue.area.unit_id 15.10 15.11 slot.select("sidebar", function() 15.12 15.13 @@ -44,12 +45,12 @@ 15.14 ui.box{ 15.15 content = function() 15.16 15.17 - ui.box_row{ class = "initiative head2", content = function() ui.box_col { content = function() 15.18 + ui.box_row{ class = "initiative head", content = function() ui.box_col { content = function() 15.19 execute.view{ module = "lf2", view = "_initiative", params = { initiative = initiative } } 15.20 end } end } 15.21 15.22 - ui.box_row{ class = "head", content = function() ui.box_col{ content = function() 15.23 - if initiative.issue.closed then 15.24 + if initiative.issue.closed then 15.25 + ui.box_row{ content = function() ui.box_col{ content = function() 15.26 if initiative.issue.accepted then 15.27 if initiative.admitted then 15.28 if initiative.agreed then 15.29 @@ -65,30 +66,35 @@ 15.30 else 15.31 ui.image{ static = "lf2/icon_cross.png" } 15.32 slot.put(" ") 15.33 - ui.tag{ content = _"Initiative not approved" } 15.34 + ui.tag{ content = _"Initiative not approved (no majority)" } 15.35 end 15.36 + slot.put(" · ") 15.37 + ui.tag{ class = "yes_count", content = _("#{count} Yes", { count = initiative.positive_votes }) } 15.38 + slot.put(" · ") 15.39 + ui.tag{ class = "no_count", content = _("#{count} No", { count = initiative.negative_votes }) } 15.40 + slot.put(" · ") 15.41 + ui.tag{ class = "abstention_count", content = _("#{count} Abstention", { count = initiative.issue.voter_count - initiative.positive_votes - initiative.negative_votes }) } 15.42 + 15.43 else 15.44 ui.image{ static = "lf2/icon_cross.png" } 15.45 slot.put(" ") 15.46 - ui.tag{ content = _"Initiative not admitted" } 15.47 + ui.tag{ content = _"Initiative not admitted (quorum failed)" } 15.48 end 15.49 else 15.50 ui.image{ static = "lf2/icon_cross.png" } 15.51 slot.put(" ") 15.52 - ui.tag{ content = _"Issue not accepted" } 15.53 + ui.tag{ content = _"Issue not accepted (quorum failed)" } 15.54 end 15.55 - slot.put(" ") 15.56 - end 15.57 - 15.58 + end } end } 15.59 + end 15.60 + 15.61 + ui.box_row{ class = "", content = function() ui.box_col{ content = function() 15.62 if initiative.issue.fully_frozen and initiative.issue.closed then 15.63 if initiative.admitted and initiative.issue.ranks_available then 15.64 - slot.put(" · ") 15.65 ui.link{ external = "#votes", text = _("#{vote_count}+#{delegated_weight} votes", { vote_count = #voting_members, delegated_weight = initiative.issue.voter_count - #voting_members }) } 15.66 + slot.put(" · ") 15.67 end 15.68 end 15.69 - if initiative.issue.closed then 15.70 - slot.put(" · ") 15.71 - end 15.72 ui.link{ external = "#suggestions", text = _("#{suggestion_count} suggestions", { suggestion_count = 23 }) } 15.73 slot.put(" · ") 15.74 ui.link{ external = "#supporters", text = _("#{supporter_count}+#{delegated_weight} supporters", { supporter_count = #supporting_members, delegated_weight = initiative.supporter_count - #supporting_members }) } 15.75 @@ -99,7 +105,7 @@ 15.76 } } 15.77 15.78 ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Current draft" } end } 15.79 - ui.box_row{ class = "member_content", content = function() ui.box_col{ content = function() 15.80 + ui.box_row{ class = "member_content", content = function() ui.box_col{ class = "draft", content = function() 15.81 execute.view{ module = "lf2", view = "_draft", params = { draft = draft } } 15.82 end } end } 15.83
16.1 --- a/app/main/lf2/interest.lua Mon Mar 07 12:15:22 2011 +0100 16.2 +++ b/app/main/lf2/interest.lua Sat Mar 12 19:22:50 2011 +0100 16.3 @@ -90,16 +90,21 @@ 16.4 end } end } 16.5 end 16.6 16.7 - ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Statement about issue" } end } 16.8 - 16.9 - ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Supported initiatives" } end } 16.10 - execute.view{ module = "lf2", view = "_initiatives", params = { initiatives = supported_initiatives } } 16.11 - 16.12 - ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Incoming delegations" } end } 16.13 - ui.box_row{ content = function() ui.box_col{ content = function() 16.14 - execute.view{ module = "lf2", view = "_avatars", params = { members = issue.trusters, size = "small", issue_id = issue.id } } 16.15 - end } end } 16.16 - 16.17 + if statement then 16.18 + ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Statement about issue" } end } 16.19 + end 16.20 + 16.21 + if #supported_initiatives > 0 then 16.22 + ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Supported initiatives" } end } 16.23 + execute.view{ module = "lf2", view = "_initiatives", params = { initiatives = supported_initiatives } } 16.24 + end 16.25 + 16.26 + if #(issue.trusters) > 0 then 16.27 + ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Incoming delegations" } end } 16.28 + ui.box_row{ content = function() ui.box_col{ content = function() 16.29 + execute.view{ module = "lf2", view = "_avatars", params = { members = issue.trusters, size = "small", issue_id = issue.id } } 16.30 + end } end } 16.31 + end 16.32 16.33 end } 16.34
17.1 --- a/app/main/lf2/issue.lua Mon Mar 07 12:15:22 2011 +0100 17.2 +++ b/app/main/lf2/issue.lua Sat Mar 12 19:22:50 2011 +0100 17.3 @@ -12,7 +12,6 @@ 17.4 17.5 local initiatives = issue.initiatives 17.6 17.7 -local interested_members = issue.interested_members 17.8 17.9 local interest = issue.interest 17.10 17.11 @@ -20,7 +19,7 @@ 17.12 17.13 local trustees = Member:new_selector() 17.14 :add_field("delegation_chain.*") 17.15 - :join("delegation_chain(" .. tostring(app.session.member.id) .. ", " .. tostring(area_id or "NULL") .. ", " .. tostring(issue_id or "NULL") .. ")", "delegation_chain", "member.id = delegation_chain.member_id") 17.16 + :join({ "delegation_chain(?, null, ?, ?)", app.session.member_id, not issue.id and area.id or nil, issue.id}, "delegation_chain", "member.id = delegation_chain.member_id") 17.17 :add_order_by("index") 17.18 :exec() 17.19 17.20 @@ -43,17 +42,13 @@ 17.21 app.topnav_area_id = issue.area_id 17.22 17.23 slot.select("sidebar", function() 17.24 - execute.view{ module = "lf2", view = "_sidebar_unit", params = { current_area_id = issue.area_id } } 17.25 + execute.view{ module = "lf2", view = "_sidebar_unit", params = { 17.26 + unit = issue.area.unit, 17.27 + current_area_id = issue.area_id 17.28 + } } 17.29 end) 17.30 17.31 execute.view{ module = "lf2", view = "_area", params = { area = area } } 17.32 - 17.33 -execute.view{ module = "lf2", view = "_issues", params = { issues = { issue } } } 17.34 +execute.view{ module = "lf2", view = "_issue", params = { issue = issue } } 17.35 17.36 --- TODO bugfix for not working reference loader 17.37 -interested_members = issue:get_reference_selector("interested_members_snapshot"):exec() 17.38 17.39 -execute.view{ module = "lf2", view = "_interested", params = { 17.40 - interested_members = interested_members, issue_id = issue.id 17.41 -} } 17.42 -
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 18.2 +++ b/app/main/lf2/settings.lua Sat Mar 12 19:22:50 2011 +0100 18.3 @@ -0,0 +1,28 @@ 18.4 +slot.set_layout("lf2") 18.5 + 18.6 +slot.put_into("leftright_pre", '<div class="sidebar_right">') 18.7 +slot.put_into("leftright_post", '</div>') 18.8 + 18.9 + 18.10 +ui.box{ content = function() 18.11 + ui.box_row{ content = function() 18.12 + ui.box_col{ content = function() 18.13 + ui.link{ module = "lf2", view = "settings_password", text = _"Change your password" } 18.14 + end } 18.15 + ui.box_col{ content = function() 18.16 + ui.link{ module = "lf2", view = "settings_name", text = _"Member name" } 18.17 + end } 18.18 + ui.box_col{ content = function() 18.19 + ui.link{ module = "lf2", view = "settings_email", text = _"Change your email address" } 18.20 + end } 18.21 + ui.box_col{ content = function() 18.22 + ui.link{ module = "lf2", view = "settings_privacy", text = _"Privacy settings" } 18.23 + end } 18.24 + ui.box_col{ content = function() 18.25 + ui.link{ module = "lf2", view = "settings_api", text = _"API settings" } 18.26 + end } 18.27 + ui.box_col{ content = function() 18.28 + ui.link{ module = "lf2", view = "settings_", text = _"" } 18.29 + end } 18.30 + end } 18.31 +end } 18.32 \ No newline at end of file
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 19.2 +++ b/app/main/lf2/units.lua Sat Mar 12 19:22:50 2011 +0100 19.3 @@ -0,0 +1,15 @@ 19.4 +slot.set_layout("lf2") 19.5 + 19.6 +local units = Unit:new_selector():exec() 19.7 + 19.8 +ui.box{ content = function() 19.9 + ui.box_row{ class = "head", content = function() ui.box_col{ class = "head", content = _"Units" } end } 19.10 + for i, unit in ipairs(units) do 19.11 + 19.12 + ui.box_row{ content = function() ui.box_col{ content = function() 19.13 + ui.link{ text = unit.name, module = "lf2", view = "unit", id = unit.id } 19.14 + end } end } 19.15 + 19.16 + end 19.17 + 19.18 +end } 19.19 \ No newline at end of file
20.1 --- a/config/development.lua Mon Mar 07 12:15:22 2011 +0100 20.2 +++ b/config/development.lua Sat Mar 12 19:22:50 2011 +0100 20.3 @@ -1,4 +1,4 @@ 20.4 -config.absolute_base_url = "http://10.8.33.34/lf/" 20.5 +config.absolute_base_url = "http://lqfb/lf/" 20.6 20.7 execute.config("default") 20.8
21.1 --- a/env/ui/box_col.lua Mon Mar 07 12:15:22 2011 +0100 21.2 +++ b/env/ui/box_col.lua Sat Mar 12 19:22:50 2011 +0100 21.3 @@ -1,5 +1,5 @@ 21.4 function ui.box_col(args) 21.5 local class = "col" 21.6 if args.class then class = class .. " " .. args.class end 21.7 - ui.container{ attr = { class = class }, content = args.content } 21.8 + ui.container{ attr = { class = class, id = args.id }, content = args.content } 21.9 end
22.1 --- a/locale/translations.de.lua Mon Mar 07 12:15:22 2011 +0100 22.2 +++ b/locale/translations.de.lua Sat Mar 12 19:22:50 2011 +0100 22.3 @@ -3,15 +3,16 @@ 22.4 ["##{id}"] = "##{id}"; 22.5 ["##{issue_id}.#{id} #{name}"] = "##{issue_id}.#{id} #{name}"; 22.6 ["#{author} at #{date}"] = "#{author} am #{date}"; 22.7 -["#{direct_count}+#{delegated_count} Mitglieder"] = false; 22.8 +["#{count} members"] = "#{count} Mitglieder"; 22.9 +["#{direct_count}+#{delegated_count} members"] = "#{direct_count}+#{delegated_count} Mitglieder"; 22.10 ["#{interested_issues_to_vote_count} issue(s) you are interested in"] = "#{interested_issues_to_vote_count} Themen, die Dich interessieren"; 22.11 ["#{issues_to_vote_count} issue(s)"] = "#{issues_to_vote_count} Themen"; 22.12 ["#{number} Image(s) has been deleted"] = "Es wurde(n) #{number} Bild(er) gelöscht"; 22.13 ["#{number} Image(s) has been updated"] = "Es wurde(n) #{number} Bild(er) aktualisiert"; 22.14 ["#{suggestion_count} suggestions"] = "#{suggestion_count} Anregungen"; 22.15 -["#{supporter_count} supporters"] = "#{supporter_count} Unterstützer"; 22.16 +["#{supporter_count}+#{delegated_weight} supporters"] = "#{supporter_count}+#{delegated_weight} Unterstützer"; 22.17 ["#{time_left} left"] = "noch #{time_left}"; 22.18 -["#{vote_count} votes"] = "#{vote_count} Stimmzettel"; 22.19 +["#{vote_count}+#{delegated_weight} votes"] = "#{vote_count}+#{delegated_weight} Stimmen"; 22.20 ["(#{more_count} duplicates removed)"] = "(#{more_count} Duplikate entfernt)"; 22.21 ["(change URL)"] = "(URL ändern)"; 22.22 ["(new window)"] = "(neues Fenster)"; 22.23 @@ -23,6 +24,8 @@ 22.24 ["API key has been updated"] = "API-Schlüssel wurde aktualisiert"; 22.25 ["Abandon global and area delegations for this issue"] = "Globale und Themenbereichs-Delegation für dieses Thema aussetzen"; 22.26 ["Abandon global delegation for this area"] = "Globale Delegation für diesen Themenbereich aussetzen"; 22.27 +["Abandon unit and area delegations for this issue"] = "Gliederungs- und Themengebiets-Delegation für dieses Thema aussetzen"; 22.28 +["Abandon unit delegation for this area"] = "Gliederungs-Delegation für dieses Themengebiet aussetzen"; 22.29 ["About"] = "About"; 22.30 ["About / Impressum"] = false; 22.31 ["About LiquidFeedback"] = "Über LiquidFeedback"; 22.32 @@ -49,6 +52,8 @@ 22.33 ["Any"] = "Alle"; 22.34 ["Apply global delegation for this area (Currently: #{delegate_name} [#{scope}])"] = "Globale Delegation für dieses Themengebiet anwenden (Zur Zeit: #{delegate_name} [#{scope}])"; 22.35 ["Apply global or area delegation for this issue (Currently: #{delegate_name} [#{scope}])"] = "Globale oder Themengebiets-Delegation für dieses Thema anwenden (Zur Zeit: #{delegate_name} [#{scope}])"; 22.36 +["Apply unit delegation for this area (Currently: #{delegate_name} [#{scope}])"] = "Gliederungs-Delegation für dieses Themengebiet anwenden(Zur Zeit: #{delegate_name} [#{scope}])"; 22.37 +["Apply unit or area delegation for this issue (Currently: #{delegate_name} [#{scope}])"] = "Gliederungs- oder Themengebiets-Delegation für dieses Thema anwenden (Currently: #{delegate_name} [#{scope}])"; 22.38 ["Approval (#th preference) [many entries]"] = "Zustimmung (#.-Wünsche)"; 22.39 ["Approval (#th preference) [single entry]"] = "Zustimmung (#.-Wunsch)"; 22.40 ["Approval (first preference) [many entries]"] = "Zustimmung (Erstwünsche)"; 22.41 @@ -64,12 +69,13 @@ 22.42 ["Area"] = "Themenbereich"; 22.43 ["Area '#{name}'"] = "Themenbereich '#{name}'"; 22.44 ["Area delegation"] = "Delegation für Themenbereich"; 22.45 +["Area delegation abandoned"] = "Themengebiets-Delegation ausgesetzt"; 22.46 ["Area delegation active"] = "Delegation für Themenbereich aktiv"; 22.47 +["Area is delegated"] = "Themengebiet ist delegiert"; 22.48 ["Area list"] = "Liste der Themenbereiche"; 22.49 ["Area successfully updated"] = "Themenbereich erfolgreich aktualisiert"; 22.50 ["Areas"] = "Themenbereiche"; 22.51 -["Areas, you are member of"] = false; 22.52 -["Areas, you are not member of"] = "Nicht Mitglied in:"; 22.53 +["Areas, you are member of"] = "Deine Themengebiete"; 22.54 ["Author"] = "Autor"; 22.55 ["Auto support is now disabled"] = false; 22.56 ["Auto support is now enabled"] = false; 22.57 @@ -96,7 +102,6 @@ 22.58 ["Cancelled"] = "Abgebrochen"; 22.59 ["Change API key"] = "API-Schlüssel ändern"; 22.60 ["Change area delegation"] = "Delegation für Themenbereich ändern"; 22.61 -["Change delegation..."] = "Delegation ändern..."; 22.62 ["Change display settings"] = "Anzeige-Einstellungen ändern"; 22.63 ["Change email"] = "E-Mail-Adresse ändern"; 22.64 ["Change email address"] = "E-Mail-Adresse ändern"; 22.65 @@ -105,6 +110,9 @@ 22.66 ["Change issue delegation"] = "Delegation für Thema ändern"; 22.67 ["Change login"] = "Login ändern"; 22.68 ["Change name"] = "Name ändern"; 22.69 +["Change or revoke area delegation"] = "Themengebiets-Delegation ändern"; 22.70 +["Change or revoke issue delegation"] = "Themen-Delegation ändern"; 22.71 +["Change or revoke unit delegation"] = "Gliederungs-Delegation ändern"; 22.72 ["Change order"] = "Sortierung ändern"; 22.73 ["Change password"] = "Kennwort ändern"; 22.74 ["Change vote"] = "Abstimmung ändern"; 22.75 @@ -115,7 +123,7 @@ 22.76 ["Choose initiator"] = "Initiator auswählen"; 22.77 ["Choose member"] = "Mitglied auswählen"; 22.78 ["Click for details"] = "Klicke für Details"; 22.79 -["Closed"] = "geschlossen"; 22.80 +["Closed"] = "Geschlossen"; 22.81 ["Closed since #{date}"] = "Geschlossen seit #{date}"; 22.82 ["Collective opinion of supporters"] = "Meinungsbild der Unterstützer"; 22.83 ["Commit suggestion"] = "Anregung speichern"; 22.84 @@ -145,8 +153,6 @@ 22.85 ["Date format is not valid. Please use following format: YYYY-MM-DD"] = "Datumsformat nicht korrekt. Bitte verwende: JJJJ-MM-TT, also z.B. 1945-05-23"; 22.86 ["Default Policy"] = "Standard-Regelwerk"; 22.87 ["Degree"] = "Grad"; 22.88 -["Delegate area..."] = "Themengebiet delegieren..."; 22.89 -["Delegate issue"] = "Thema delegieren"; 22.90 ["Delegation abandoned"] = "Delegation ausgesetzt"; 22.91 ["Delegation problems"] = "Delegationsprobleme"; 22.92 ["Delegation turned off for area"] = "Delegation für Themengebiet ausgesetzt"; 22.93 @@ -210,6 +216,7 @@ 22.94 ["Generate API key"] = "API-Schlüssel erzeugen"; 22.95 ["Give up membership"] = "Mitgliedschaft aufgeben"; 22.96 ["Global delegation"] = "Globale Delegation"; 22.97 +["Global delegation abandoned"] = "Globale Delegation ausgesetzt"; 22.98 ["Global delegation active"] = "Globale Delegation aktiv"; 22.99 ["Go up"] = "Nach oben"; 22.100 ["Half frozen at"] = "Halb eingefroren am/um"; 22.101 @@ -239,7 +246,7 @@ 22.102 ["Initiative events"] = "Initiativen-Ereignisse"; 22.103 ["Initiative is revoked now"] = "Initiative ist jetzt zurückgezogen"; 22.104 ["Initiative not admitted"] = "Initiative nicht zugelassen"; 22.105 -["Initiative not agreed"] = "Initiative abgelehnt"; 22.106 +["Initiative not approved"] = "Initiative nicht angenommen"; 22.107 ["Initiative quorum"] = "Quorum Inititive"; 22.108 ["Initiative quorum denumerator"] = "Initiativ-Quorum Zähler"; 22.109 ["Initiative quorum numerator"] = "Initiativ-Quorum Nenner"; 22.110 @@ -257,7 +264,6 @@ 22.111 ["Initiator"] = "Initiator"; 22.112 ["Initiator invites"] = "Einladungen"; 22.113 ["Initiators"] = "Initiatoren"; 22.114 -["Interest"] = "Interesse"; 22.115 ["Interest not existant"] = "Interesse existiert nicht"; 22.116 ["Interest removed"] = "Interesse entfernt"; 22.117 ["Interest updated"] = "Interesse aktualisiert"; 22.118 @@ -265,7 +271,7 @@ 22.119 ["Interested members"] = "Interessierte Mitglieder"; 22.120 ["Internal posts"] = "Interne Ämter"; 22.121 ["Interval format:"] = "Intervall-Format"; 22.122 -["Invalid query"] = false; 22.123 +["Invalid query"] = "Ungültige Anfrage"; 22.124 ["Invalid username or password!"] = "Ungültiger Benutzername oder Kennwort"; 22.125 ["Invitation has been refused"] = "Einladung wurde widerrufen"; 22.126 ["Invite an initiator to initiative"] = "Initiator zur Initiative einladen"; 22.127 @@ -277,11 +283,13 @@ 22.128 ["Issue accepted"] = "Thema akzeptiert"; 22.129 ["Issue canceled"] = "Thema abgebrochen"; 22.130 ["Issue delegation"] = "Issue-Delegation"; 22.131 +["Issue delegation abandoned"] = "Themen-Delegation ausgesetzt"; 22.132 ["Issue delegation active"] = "Delegation für Thema aktiv"; 22.133 ["Issue events"] = "Themen-Ereignisse"; 22.134 ["Issue finished"] = "Thema abgeschlossen"; 22.135 ["Issue finished without voting"] = "Thema ohne Abstimmung abgeschlossen"; 22.136 ["Issue frozen"] = "Thema eingefroren"; 22.137 +["Issue is delegated"] = "Thema delegiert"; 22.138 ["Issue not accepted"] = "Thema nicht zugelassen"; 22.139 ["Issue policy"] = "Regelwerk für Thema"; 22.140 ["Issue quorum"] = "Quorum Thema"; 22.141 @@ -290,7 +298,6 @@ 22.142 ["Issues"] = "Themen"; 22.143 ["JavaScript is disabled or not available."] = "JavaScript ist abgeschaltet oder nicht verfügbar."; 22.144 ["Last author"] = "Letzter Autor"; 22.145 -["Last change"] = "Letzte Änderung"; 22.146 ["Last login (updated daily)"] = "Letzte Anmeldung (täglich aktualisiert)"; 22.147 ["Last snapshot:"] = "Letzte Auszählung:"; 22.148 ["Legend:"] = "Legende:"; 22.149 @@ -316,6 +323,8 @@ 22.150 ["Member is administrator"] = "Mitglied ist Administrator"; 22.151 ["Member is already saved in your contacts!"] = "Mitglied ist schon in Deinen Kontakten!"; 22.152 ["Member is deactivated"] = "Mitglied ist deaktiviert"; 22.153 +["Member is interested in this issue"] = "Mitglied ist an diesem Thema interessiert"; 22.154 +["Member is not interested"] = "Mitglied ist nicht interessiert"; 22.155 ["Member is now invited to be initiator"] = "Mitglied ist jetzt als Initiator eingeladen"; 22.156 ["Member list"] = "Mitgliederliste"; 22.157 ["Member name"] = "Mitglied Name"; 22.158 @@ -327,6 +336,7 @@ 22.159 ["Member voting"] = "Abstimmungsverhalten"; 22.160 ["Member: '#{login}' (#{name})"] = "Mitlied: '#{login}' (#{name})"; 22.161 ["Members"] = "Mitglieder"; 22.162 +["Members, interested in this issue"] = "Am Thema interessierte Mitglieder"; 22.163 ["Membership by delegation"] = "Mitgliedschaft durch Delegation"; 22.164 ["Membership not existant"] = "Mitgliedschaft exisitert nicht"; 22.165 ["Membership removed"] = "Mitgliedschaft entfernt"; 22.166 @@ -389,6 +399,7 @@ 22.167 ["Opinions"] = "Meinungen"; 22.168 ["Order by"] = "Sortieren nach"; 22.169 ["Organizational unit"] = "Organisationseinheit"; 22.170 +["Other areas"] = "Andere Themenbereiche"; 22.171 ["Outgoing delegations"] = "Ausgehende Delegationen"; 22.172 ["Password"] = "Kennwort"; 22.173 ["Password (repeat)"] = "Kennwort (wiederholen)"; 22.174 @@ -412,6 +423,7 @@ 22.175 ["Please enter your email address. This address will be used for automatic notifications (if you request them) and in case you've lost your password. This address will not be published. After registration you will receive an email with a confirmation link."] = "Bitte gib Deine E-Mail-Adresse ein. Diese Adresse wird für automatische Benachrichtigungen (wenn Du diese anforderst) sowie zum Zurücksetzen des Kennworts verwendet. Diese Adresse wird nicht veröffentlicht. Nach Abschluß der Registration wirst Du eine E-Mail mit einem Link zum Bestätigen der Adresse erhalten."; 22.176 ["Please enter your login name. You will receive an email with a link to reset your password."] = "Bitte gib Deinen Anmeldenamen ein. Du wirst eine E-Mail mit einem Link zum Zurücksetzen des Kennworts erhalten."; 22.177 ["Please enter your new password twice."] = "Bitte gib Dein neues Kennwort zweimal ein:"; 22.178 +["Please note: Member, interest and supporter counts are calculated periodically, therefore it can take some time until your changes become effective everywhere."] = false; 22.179 ["Policies"] = "Regelwerke"; 22.180 ["Policy"] = "Regelwerk"; 22.181 ["Policy '#{name}'"] = "Regelwerk '#{name}'"; 22.182 @@ -443,10 +455,12 @@ 22.183 ["Remove from contacts"] = "Aus den Kontakten entfernen"; 22.184 ["Remove initiator"] = "Initiator entfernen"; 22.185 ["Remove initiator from initiative"] = "Initiator von der Initiative entfernen"; 22.186 +["Remove interest"] = "Interesse abmelden"; 22.187 ["Remove my interest"] = "Interesse abmelden"; 22.188 ["Remove my membership"] = "Mitgliedschaft aufgeben"; 22.189 ["Remove my request to vote later"] = "Meinen Wunsch später abzustimmen zurückziehen"; 22.190 ["Remove my support from this initiative"] = "Meine Unterstützung der Initiative entziehen"; 22.191 +["Remove support"] = "Unterstützung widerrufen"; 22.192 ["Rendered"] = "Formatiert"; 22.193 ["Repeat new password"] = "Neues Kennwort wiederholen"; 22.194 ["Request password reset link"] = "Link zum Rücksetzen des Kennworts anfordern"; 22.195 @@ -465,7 +479,7 @@ 22.196 ["Saved as contact"] = "Als Kontakt gespeichert"; 22.197 ["Saved contacts"] = "Gespeicherte Kontakte"; 22.198 ["Search"] = "Suchen"; 22.199 -["Search in initiatives for text:"] = "In Initiative nach Text suchen:"; 22.200 +["Search in initiatives"] = "In Initiativen suchen"; 22.201 ["Search initiatives"] = "Suche Initiativen"; 22.202 ["Search issues"] = "Suche Themen"; 22.203 ["Search members"] = "Suche Mitglieder"; 22.204 @@ -476,9 +490,11 @@ 22.205 ["Set autoreject"] = "Auto-Ablehnen anschalten"; 22.206 ["Set delegation for Area '#{name}'"] = "Delegation für Themenbereich '#{name}' festlegen"; 22.207 ["Set delegation for Issue ##{number} in Area '#{area_name}'"] = "Delegation für Thema ##{number} im Themenbereich '#{area_name}' festlegen"; 22.208 +["Set delegation for Unit #{name}"] = "Delegation für Glieder #{name} festlegen"; 22.209 ["Set global delegation"] = "Globale Delegation festlegen"; 22.210 ["Set issue delegation"] = "Delegation für Thema festlegen"; 22.211 ["Set new password"] = "Neues Kennwort setzen"; 22.212 +["Set unit delegation"] = "Gliederungs-Delegation setzen"; 22.213 ["Settings"] = "Einstellungen"; 22.214 ["Show"] = "Zeige"; 22.215 ["Show active members"] = "Zeige aktive Mitglieder"; 22.216 @@ -499,6 +515,9 @@ 22.217 ["So I'm"] = "Also bin ich"; 22.218 ["Software"] = "Software"; 22.219 ["Some JavaScript based functions (voting in particular) will not work.\nFor this beta, please use a current version of Firefox, Safari, Opera(?), Konqueror or another (more) standard compliant browser.\nAlternative access without JavaScript will be available soon."] = "Einige auf JavaScript basierende Funktionen (insbesondere der Abstimmung) sind nicht benutzbar.\nFür diese Beta verwende bitte eine aktuelle Version von Firefox, Safari, Opera(?), Konqueror oder einen anderen (mehr) den Standards entsprechenden Browser.\nEin alternativer Zugriff ohne JavaScript wird bald zur Verfügung stehen."; 22.220 +["Someone in members delegation chain is interested"] = "In der Delegationskette des Mitglieds ist jemand interessiert"; 22.221 +["Someone in your delegation chain is interested"] = "Jemand in deiner Delegationskette ist interessiert"; 22.222 +["Someone in your delegation chain was interested"] = "Jemand in deiner Delegationskette war interessiert"; 22.223 ["Sorry, but there is not confirmed email address for your account. Please contact the administrator or support."] = "Sorry, aber für diesen Account ist keine bestätigte E-Mail-Adresse hinterlegt. Bitte wende Dich an den Administrator oder den Support."; 22.224 ["Sorry, but you are currently not invited"] = "Sorry, aber Du bist zur Zeit nicht eingeladen"; 22.225 ["Sorry, it was not possible to verify your OpenID."] = "Sorry, es war nicht möglich deine OpenID zu verifizieren."; 22.226 @@ -507,6 +526,7 @@ 22.227 ["Source"] = "Quelltext"; 22.228 ["State"] = "Zustand"; 22.229 ["Statement"] = "Statement"; 22.230 +["Statement about issue"] = "Statement zum Thema"; 22.231 ["Status"] = "Status"; 22.232 ["Step 1/5: Invite code"] = "Schritt 1/5: Invite-Code"; 22.233 ["Step 2/5: Email address"] = "Schritt 2/5: E-Mail-Adresse"; 22.234 @@ -540,7 +560,6 @@ 22.235 ["The draft of this initiative has been updated!"] = "Der Entwurfstext der Initiative wurde aktualisiert!"; 22.236 ["The drafts do not differ"] = "Die Entwürfe unterscheiden sich nicht"; 22.237 ["The initiators suggest to support the following initiative:"] = "Die Initiatoren empfehlen folgende Initiative zu unterstützen:"; 22.238 -["The interested members are updated after some time."] = false; 22.239 ["There are no more alternative initiatives currently."] = "Es gibt zur Zeit keine weiteren alternative Initiative."; 22.240 ["There were no more alternative initiatives."] = "Es gab keine weiteren alternativen Initiativen."; 22.241 ["This email address is too short!"] = "Diese E-Mail-Adresse ist zu kurz!"; 22.242 @@ -586,6 +605,8 @@ 22.243 ["Turn on autoreject for issue"] = "Auto-Ablehnen für dieses Thema einschalten"; 22.244 ["Type of tabs"] = "Tabulatortyp"; 22.245 ["Unconfirmed address"] = "Unbestätigte E-Mail"; 22.246 +["Unit wide delegated"] = "Gliederungsweit delegiert"; 22.247 +["Units"] = "Gliederungen"; 22.248 ["Unknown author"] = "Unbekannter Autor"; 22.249 ["Updated drafts"] = "Neue Entwürfe"; 22.250 ["Upload images"] = "Bilder hochladen"; 22.251 @@ -598,7 +619,7 @@ 22.252 ["Voted no"] = "Mit Nein gestimmt"; 22.253 ["Voted proposal"] = "Abgestimmte Vorlage"; 22.254 ["Voted yes"] = "Mit Ja gestimmt"; 22.255 -["Votes"] = "Stimmzettel"; 22.256 +["Voters"] = "Abstimmende"; 22.257 ["Voting"] = "Abstimmung"; 22.258 ["Voting details"] = "Abstimmdetails"; 22.259 ["Voting for this issue has already begun."] = "Die Abstimmung für dieses Thema hat schon begonnen."; 22.260 @@ -635,16 +656,12 @@ 22.261 ["You didn't confirmed your email address '#{email}' within 7 days."] = "Du hast die E-Mail-Adresse '#{email}' nicht innerhalb von 7 Tagen bestätigt."; 22.262 ["You didn't confirmed your email address '#{email}'. You have received an email with an activation link."] = "Du hast die E-Mail-Adresse '#{email}' nicht bestätigt. Du hast hierzu eine E-Mail mit einem Aktivierungslink erhalten."; 22.263 ["You didn't saved any member as contact yet."] = "Du hast noch kein Mitglied als Kontakt gespeichert!"; 22.264 -["You have delegated globally"] = "Du hast global delegiert"; 22.265 -["You have delegated this area"] = "Du hast das Themengebiet delegiert"; 22.266 -["You have delegated this issue"] = "Du hast das Thema delegiert"; 22.267 ["You have saved this member as contact"] = "Du hast das Mitglied als Kontakt gespeichert"; 22.268 ["You have saved this member as contact."] = "Du hast das Mitglied als Kontakt gespeichert."; 22.269 ["You have to mark 'Are you sure' to revoke!"] = "Zum Zurückziehen musst Du 'Sicher?' auswählen"; 22.270 ["You need to be logged in, to use all features of this system."] = "Du musst eingeloggt sein, um alle Funktionen dieses Systems nutzen zu können."; 22.271 ["You want to vote later"] = "Du willst später abstimmen"; 22.272 ["You were interested in this issue"] = "Du warst am Thema interessiert"; 22.273 -["You were interested in this issue by delegation"] = "Du warst am Thema durch Delegation interessiert"; 22.274 ["You've successfully registered and you can login now with your login and password!"] = "Du hast Dich erfolgreich registriert und kannst Dich jetzt mit Deinen Benutzernamen und Kennwort anmelden!"; 22.275 ["Your API key:"] = "Dein API-Schlüssel:"; 22.276 ["Your are interested"] = "Du bist interessiert"; 22.277 @@ -673,16 +690,6 @@ 22.278 ["Your vote has been discarded. Delegation rules apply if set."] = "Deine Abstimmung wurde zurückgezogen. Delegationsregeln gelten sofern gesetzt."; 22.279 ["Your web browser is not fully supported yet."] = "Dein Web-Browser wird noch nicht vollständig unterstützt."; 22.280 ["Z-A"] = "Z-A"; 22.281 -["[Change] or [revoke] area delegation [change]"] = false; 22.282 -["[Change] or [revoke] area delegation [midpart]"] = false; 22.283 -["[Change] or [revoke] area delegation [prefix]"] = false; 22.284 -["[Change] or [revoke] area delegation [revoke]"] = false; 22.285 -["[Change] or [revoke] area delegation [suffix]"] = false; 22.286 -["[Change] or [revoke] global delegation [change]"] = false; 22.287 -["[Change] or [revoke] global delegation [midpart]"] = false; 22.288 -["[Change] or [revoke] global delegation [prefix]"] = false; 22.289 -["[Change] or [revoke] global delegation [revoke]"] = false; 22.290 -["[Change] or [revoke] global delegation [suffix]"] = false; 22.291 ["[Registered members only]"] = "[nur für Registrierte]"; 22.292 ["[not displayed public]"] = "[nicht öffentlich]"; 22.293 ["a bit unsatisfied"] = "etwas unzufrieden"; 22.294 @@ -714,6 +721,10 @@ 22.295 ["should not"] = "soll nicht"; 22.296 ["since #{date}"] = "seit #{date}"; 22.297 ["to reset your password please click on the following link:\n\n"] = "um Dein Kennwort zurückzusetzen klicke bitte den folgenden Link an:\n\n"; 22.298 +["unit"] = "Gliederung"; 22.299 ["until"] = "bis"; 22.300 ["xmpp"] = "Jabber (XMPP)"; 22.301 +["↕ Interest"] = "↕ Interesse"; 22.302 +["↕ Last change"] = "↕ Letzte Änderung"; 22.303 +["↕ Time left"] = "↕ Restzeit"; 22.304 }
23.1 --- a/model/area.lua Mon Mar 07 12:15:22 2011 +0100 23.2 +++ b/model/area.lua Sat Mar 12 19:22:50 2011 +0100 23.3 @@ -29,6 +29,14 @@ 23.4 } 23.5 23.6 Area:add_reference{ 23.7 + mode = 'm1', 23.8 + to = "Unit", 23.9 + this_key = 'unit_id', 23.10 + that_key = 'id', 23.11 + ref = 'unit', 23.12 +} 23.13 + 23.14 +Area:add_reference{ 23.15 mode = 'mm', 23.16 to = "Member", 23.17 this_key = 'id', 23.18 @@ -95,6 +103,9 @@ 23.19 if args.active ~= nil then 23.20 selector:add_where{ "active = ?", args.active } 23.21 end 23.22 + if args.unit_id then 23.23 + selector:add_where{ "unit_id = ?", args.unit_id } 23.24 + end 23.25 if args.member_id then 23.26 selector:join("membership", nil, { "membership.area_id = area.id AND membership.member_id = ?", args.member_id }) 23.27 end 23.28 @@ -102,5 +113,8 @@ 23.29 selector:left_join("membership", nil, { "membership.area_id = area.id AND membership.member_id = ?", args.not_member_id }) 23.30 selector:add_where{ "membership.member_id ISNULL" } 23.31 end 23.32 + if args.order == "name" then 23.33 + selector:add_order_by("area.name") 23.34 + end 23.35 return selector 23.36 end
24.1 --- a/model/delegation.lua Mon Mar 07 12:15:22 2011 +0100 24.2 +++ b/model/delegation.lua Sat Mar 12 19:22:50 2011 +0100 24.3 @@ -33,9 +33,14 @@ 24.4 ref = 'issue', 24.5 } 24.6 24.7 -function Delegation:by_pk(truster_id, area_id, issue_id) 24.8 +function Delegation:by_pk(truster_id, unit_id, area_id, issue_id) 24.9 local selector = self:new_selector():optional_object_mode() 24.10 selector:add_where{ "truster_id = ?", truster_id } 24.11 + if unit_id then 24.12 + selector:add_where{ "unit_id = ?", unit_id } 24.13 + else 24.14 + selector:add_where("unit_id ISNULL") 24.15 + end 24.16 if area_id then 24.17 selector:add_where{ "area_id = ?", area_id } 24.18 else
25.1 --- a/model/issue.lua Mon Mar 07 12:15:22 2011 +0100 25.2 +++ b/model/issue.lua Sat Mar 12 19:22:50 2011 +0100 25.3 @@ -335,6 +335,10 @@ 25.4 25.5 function Issue:build_selector(args) 25.6 local selector = self:new_selector() 25.7 + if args.unit_id then 25.8 + selector:join("area", nil, "area.id = issue.area_id") 25.9 + selector:add_where{ "area.unit_id = ?", args.unit_id } 25.10 + end 25.11 if args.area_id then 25.12 selector:add_where{ "issue.area_id = ?", args.area_id } 25.13 end
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 26.2 +++ b/model/unit.lua Sat Mar 12 19:22:50 2011 +0100 26.3 @@ -0,0 +1,53 @@ 26.4 +Unit = mondelefant.new_class() 26.5 +Unit.table = 'unit' 26.6 + 26.7 +function Unit:get_flattened_tree() 26.8 + local units = Unit:new_selector():exec() 26.9 + local tmp_list = {} 26.10 + for i, unit in ipairs(units) do 26.11 + tmp_list[unit.id] = unit 26.12 + end 26.13 + 26.14 + local function get_depth(unit) 26.15 + local depth 26.16 + if unit.parent_id then 26.17 + local parent = tmp_list[unit.parent_id] 26.18 + depth = get_depth(parent) + 1 26.19 + else 26.20 + depth = 0 26.21 + end 26.22 + return depth 26.23 + end 26.24 + 26.25 + 26.26 + for i, unit in ipairs(units) do 26.27 + local depth = get_depth(unit) 26.28 + local name = "" 26.29 + for i = 1, depth do 26.30 + if i < depth then 26.31 + name = name .. " " 26.32 + else 26.33 + name = name .. " ‣ " 26.34 + end 26.35 + end 26.36 + unit.flattened_tree_name = name .. unit.name 26.37 + end 26.38 + 26.39 + local function recurse(units) 26.40 + local list = {} 26.41 + for i, unit in ipairs(units) do 26.42 + list[#list+1] = tmp_list[unit.id] 26.43 + for i, item in ipairs(recurse( 26.44 + Unit:new_selector() 26.45 + :add_where{ "parent_id = ?", unit.id }:add_order_by("name"):exec() 26.46 + )) do 26.47 + list[#list+1] = tmp_list[item.id] 26.48 + end 26.49 + end 26.50 + return list 26.51 + end 26.52 + 26.53 + local list = recurse(Unit:new_selector():add_where("parent_id ISNULL"):add_order_by("name"):exec()) 26.54 + 26.55 + return list 26.56 +end
27.1 --- a/static/lf2.css Mon Mar 07 12:15:22 2011 +0100 27.2 +++ b/static/lf2.css Sat Mar 12 19:22:50 2011 +0100 27.3 @@ -54,10 +54,13 @@ 27.4 * Positioning 27.5 */ 27.6 27.7 -.tab1 .right 27.8 +.topbox .right 27.9 { float: right; } 27.10 27.11 -.tab1 a { float: left; } 27.12 +.topbox a, 27.13 +.topbox span, 27.14 +.topbox select 27.15 + { float: left; } 27.16 27.17 .slot_default 27.18 { position: relative; width: 67%; } 27.19 @@ -83,15 +86,19 @@ 27.20 .box .row .col.right 27.21 { float: right; } 27.22 27.23 - 27.24 /* 27.25 * Margins und paddings 27.26 */ 27.27 27.28 -.tab1 a 27.29 - { margin: 0 0 0 0.5em; padding: 0.5ex 0.5em 0.5ex 0.5em; } 27.30 -.tab1 .right a 27.31 - { margin: 0 0.5em 0 0; } 27.32 +.topbox a 27.33 + { margin: 0 0 0 0.5em; padding: 0.7ex 0.5em 0.3ex 0.5em; } 27.34 + 27.35 +.topbox select 27.36 + { margin: 0.5ex 0 0.5ex 0; padding: 0.3ex 0.2em 0.2ex 0.2em;} 27.37 + 27.38 +.topbox .right a, 27.39 +.topbox .right span 27.40 + { margin: 0 0.5em 0 0; padding: 0.7ex 0.5em 0.3ex 0.3em; } 27.41 27.42 .slot_default 27.43 { margin: 2ex 1% 2ex 32%; } 27.44 @@ -118,18 +125,26 @@ 27.45 .box .row.subhead .col 27.46 { margin-top: 2ex; } 27.47 27.48 - 27.49 /* 27.50 * Colors 27.51 */ 27.52 27.53 -body, 27.54 -.tab1 a.active 27.55 -/* { background-color: #7df; color: #000 }*/ 27.56 +body 27.57 { background-color: #27C9FF; color: #000 } 27.58 27.59 -.tab1, 27.60 -.tab1 a { background-color: #444; color: #fff; } 27.61 +.topbox.line1, 27.62 +.topbox.line1 a, 27.63 +.topbox.line1 select 27.64 + { background-color: #444; color: #fff; } 27.65 + 27.66 +.topbox.line2, 27.67 +.topbox.line2 a 27.68 + { color: #000; } 27.69 +.topbox.line2 span.inactive 27.70 + { opacity: 0.2; } 27.71 +.topbox a.active 27.72 +/* { background-color: #B2ECFF; color: #000; }*/ 27.73 + { background-color: #e7f0ff; color: #000; } 27.74 27.75 27.76 .box { background-color: #fff; } 27.77 @@ -141,7 +156,8 @@ 27.78 .box .row.head, 27.79 .box .row.head2, 27.80 .box .row.active 27.81 - { background-color: #D7F5FF;} 27.82 +/* { background-color: #D7F5FF;}*/ 27.83 + { background-color: #e7f0ff;} 27.84 27.85 .box .row.head .col.head 27.86 { color: #444; } 27.87 @@ -151,7 +167,7 @@ 27.88 { color: #777; } 27.89 27.90 .member_content 27.91 - { background-color: #fec; } 27.92 + { background-color: #FFF4DC; } 27.93 27.94 /* 27.95 * Borders 27.96 @@ -168,13 +184,14 @@ 27.97 27.98 .box.issue .row.unit_name 27.99 { border-bottom-color: #ccc; } 27.100 + 27.101 27.102 /* 27.103 * Rounded corners 27.104 */ 27.105 27.106 .box { border-radius: 1ex; -moz-border-radius: 1ex; 27.107 - -webkit-box-shadow: 2px 2px 3px 0px #444; -moz-box-shadow: 2px 2px 3px 0px #444; } 27.108 + -webkit-box-shadow: 1px 1px 3px #11576F; -moz-box-shadow: 0 0 2px 1px #444; } 27.109 27.110 .box .row:first-child.head, 27.111 .box .row:first-child.head2 27.112 @@ -182,6 +199,19 @@ 27.113 .box .row:last-child 27.114 { border-radius: 0 0 1ex 1ex; } 27.115 27.116 +.box .row:first-child:last-child.head, 27.117 +.box .row:first-child:last-child.head2 27.118 + { border-radius: 1ex 1ex 1ex 1ex; } 27.119 + 27.120 +.topbox.line1 27.121 + { -webkit-box-shadow: 0 2px 3px #444; -moz-box-shadow: 0 2px 3px #444; } 27.122 + 27.123 +.topbox a.active 27.124 + { border-radius: 0 0 1ex 1ex; 27.125 + -webkit-box-shadow: 1px 1px 3px #11576F, inset 0px 7px 3px -5px #444; 27.126 + -moz-box-shadow: 2px 2px 3px 0px #444; 27.127 + } 27.128 + 27.129 /* 27.130 * Text Formatting 27.131 */ 27.132 @@ -191,11 +221,15 @@ 27.133 font-size: 100%; 27.134 } 27.135 27.136 -.tab1 a { 27.137 - font-weight: bold; 27.138 - text-decoration: none; 27.139 +.topbox { 27.140 + line-height: 135%; 27.141 } 27.142 27.143 +.topbox a, 27.144 +.topbox span 27.145 + { font-weight: bold; 27.146 + text-decoration: none; } 27.147 + 27.148 .box a { text-decoration: none; } 27.149 27.150 .box .row .col 27.151 @@ -210,69 +244,8 @@ 27.152 27.153 27.154 27.155 -/* 27.156 - * Sidebar hover button 27.157 - */ 27.158 - 27.159 -.hoverbutton_container { 27.160 - position: relative; 27.161 -} 27.162 - 27.163 - 27.164 -.hoverbutton { 27.165 - /* position */ 27.166 - display: none; 27.167 - position: absolute; 27.168 - top: 0px; 27.169 - left: 0px; 27.170 - height: 100%; 27.171 - width: 100%; 27.172 - 27.173 - /* color */ 27.174 - background-color: #fff; 27.175 - 27.176 - /* text format */ 27.177 - font-weight: bold; 27.178 - 27.179 - /* cursor */ 27.180 - cursor: pointer; 27.181 -} 27.182 - 27.183 -.hoverbutton_container:hover .hoverbutton { 27.184 - /* position */ 27.185 - display: block; 27.186 -} 27.187 - 27.188 -.hoverbutton_container:hover .hoverbutton img { 27.189 - /* text format */ 27.190 - vertical-align: middle; 27.191 -} 27.192 - 27.193 -.hoverbutton_container:hover .hoverbutton.noaction { 27.194 - /* color */ 27.195 - background-color: #ccc; 27.196 - 27.197 - /* cursor */ 27.198 - cursor: default; 27.199 -} 27.200 - 27.201 -.hoverbutton_container:hover .hoverbutton.green { 27.202 - background-color: #cfc; 27.203 -} 27.204 - 27.205 -.hoverbutton_container:hover .hoverbutton.red { 27.206 - background-color: #fcc; 27.207 -} 27.208 - 27.209 -.hoverbutton .content { 27.210 - /* position */ 27.211 - padding: 0.5ex 0.2em 0.5ex 0.5em; 27.212 -} 27.213 - 27.214 -.box .row.last-child .hoverbutton { 27.215 - border-radius: 0 0 1ex 1ex; 27.216 -} 27.217 - 27.218 +.box .row.head .col.head select 27.219 + { font-weight: bold; width: 100%; } 27.220 27.221 /* 27.222 * Scrolled col 27.223 @@ -331,10 +304,7 @@ 27.224 27.225 .avatars.normal .avatar { 27.226 width: 100px; 27.227 - -webkit-box-shadow: 1px 1px 1px #000; 27.228 - background-color: #eee; 27.229 - border-radius: 1ex; 27.230 - -moz-border-radius: 1ex; 27.231 + text-align: center; 27.232 } 27.233 27.234 .avatars.small .avatar { 27.235 @@ -434,10 +404,14 @@ 27.236 * Draft 27.237 */ 27.238 27.239 -.initiative .draft { 27.240 +.member_content .draft { 27.241 line-height: 135%; 27.242 } 27.243 27.244 +.draft h1 { 27.245 + font-size: 135%; 27.246 +} 27.247 + 27.248 .draft h2 { 27.249 font-size: 135%; 27.250 font-weight: bold;
28.1 Binary file static/lf2/back.jpg has changed
29.1 Binary file static/lf2/icon_delegation_global.png has changed
30.1 Binary file static/lf2/icon_delegation_unit.png has changed