liquid_feedback_frontend
changeset 3:768faea1096d alpha4
Version alpha4
Members interested in an issue or supporting an initiative have a weight information attached. Browsing the members causing that weight is possible.
Initiatives may provide a link to an external discussion platform
Direct link on every initiative page to create an alternative initiative
Bugfix: No error when clicking "neutral", when "neutral" is currently selected
Members interested in an issue or supporting an initiative have a weight information attached. Browsing the members causing that weight is possible.
Initiatives may provide a link to an external discussion platform
Direct link on every initiative page to create an alternative initiative
Bugfix: No error when clicking "neutral", when "neutral" is currently selected
line diff
1.1 --- a/app/main/_filter/20_session.lua Mon Nov 23 12:00:00 2009 +0100 1.2 +++ b/app/main/_filter/20_session.lua Mon Nov 30 12:00:00 2009 +0100 1.3 @@ -8,6 +8,6 @@ 1.4 1.5 request.set_csrf_secret(app.session.additional_secret) 1.6 1.7 -locale.set{lang = app.session.lang or "en"} 1.8 +locale.set{lang = app.session.lang or "de"} 1.9 1.10 execute.inner()
2.1 --- a/app/main/admin/_action/member_update.lua Mon Nov 23 12:00:00 2009 +0100 2.2 +++ b/app/main/admin/_action/member_update.lua Mon Nov 30 12:00:00 2009 +0100 2.3 @@ -12,7 +12,7 @@ 2.4 member = Member:new() 2.5 end 2.6 2.7 -param.update(member, "login", "admin", "name", "ident_number", "active") 2.8 +param.update(member, "login", "admin", "name", "active") 2.9 2.10 local password = param.get("password") 2.11 if password == "********" or #password == 0 then
3.1 --- a/app/main/admin/member_edit.lua Mon Nov 23 12:00:00 2009 +0100 3.2 +++ b/app/main/admin/member_edit.lua Mon Nov 30 12:00:00 2009 +0100 3.3 @@ -28,7 +28,6 @@ 3.4 ui.field.password{ label = _"Password", name = "password", value = (member and member.password) and "********" or "" } 3.5 ui.field.boolean{ label = _"Admin?", name = "admin" } 3.6 ui.field.boolean{ label = _"Active?", name = "active" } 3.7 - ui.field.text{ label = _"Ident number", name = "ident_number" } 3.8 ui.submit{ text = _"Save" } 3.9 end 3.10 }
4.1 --- a/app/main/contact/_action/add_member.lua Mon Nov 23 12:00:00 2009 +0100 4.2 +++ b/app/main/contact/_action/add_member.lua Mon Nov 30 12:00:00 2009 +0100 4.3 @@ -21,7 +21,7 @@ 4.4 contact:save() 4.5 4.6 if public then 4.7 - slot.put_into("notice", _"Member has been saved as public contact") 4.8 +-- slot.put_into("notice", _"Member has been saved as public contact") 4.9 else 4.10 - slot.put_into("notice", _"Member has been saved as private contact") 4.11 +-- slot.put_into("notice", _"Member has been saved as private contact") 4.12 end
5.1 --- a/app/main/contact/_action/remove_member.lua Mon Nov 23 12:00:00 2009 +0100 5.2 +++ b/app/main/contact/_action/remove_member.lua Mon Nov 30 12:00:00 2009 +0100 5.3 @@ -4,4 +4,4 @@ 5.4 local contact = Contact:by_pk(member.id, other_member.id) 5.5 contact:destroy() 5.6 5.7 -slot.put_into("notice", _"Member has been removed from your contacts") 5.8 +--slot.put_into("notice", _"Member has been removed from your contacts")
6.1 --- a/app/main/index/_action/login.lua Mon Nov 23 12:00:00 2009 +0100 6.2 +++ b/app/main/index/_action/login.lua Mon Nov 30 12:00:00 2009 +0100 6.3 @@ -8,7 +8,7 @@ 6.4 end) 6.5 trace.debug('User authenticated') 6.6 else 6.7 - slot.select("notice", function() 6.8 + slot.select("error", function() 6.9 ui.tag{ content = _'Invalid username or password!' } 6.10 end) 6.11 trace.debug('User NOT authenticated')
7.1 --- a/app/main/index/login.lua Mon Nov 23 12:00:00 2009 +0100 7.2 +++ b/app/main/index/login.lua Mon Nov 30 12:00:00 2009 +0100 7.3 @@ -2,7 +2,7 @@ 7.4 7.5 ui.tag{ 7.6 tag = 'p', 7.7 - content = 'You need to be logged in, to use this system.' 7.8 + content = _'You need to be logged in, to use this system.' 7.9 } 7.10 7.11 ui.form{
8.1 --- a/app/main/initiative/_action/create.lua Mon Nov 23 12:00:00 2009 +0100 8.2 +++ b/app/main/initiative/_action/create.lua Mon Nov 30 12:00:00 2009 +0100 8.3 @@ -23,7 +23,8 @@ 8.4 end 8.5 8.6 initiative.issue_id = issue.id 8.7 -param.update(initiative, "name") 8.8 + 8.9 +param.update(initiative, "name", "discussion_url") 8.10 initiative:save() 8.11 8.12 local draft = Draft:new()
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/app/main/initiative/_action/update.lua Mon Nov 30 12:00:00 2009 +0100 9.3 @@ -0,0 +1,6 @@ 9.4 +local initiative = Initiative:by_id(param.get_id()) 9.5 +param.update(initiative, "discussion_url") 9.6 +initiative:save() 9.7 + 9.8 +slot.put_into("notice", _"Initiative successfully updated") 9.9 +
10.1 --- a/app/main/initiative/_list.lua Mon Nov 23 12:00:00 2009 +0100 10.2 +++ b/app/main/initiative/_list.lua Mon Nov 30 12:00:00 2009 +0100 10.3 @@ -55,7 +55,13 @@ 10.4 columns[#columns+1] = { 10.5 content = function(record) 10.6 if record.issue.accepted and record.issue.closed and record.issue.ranks_available then 10.7 - ui.field.rank{ value = record.rank } 10.8 + ui.field.rank{ attr = { class = "rank" }, value = record.rank } 10.9 + end 10.10 + end 10.11 + } 10.12 + columns[#columns+1] = { 10.13 + content = function(record) 10.14 + if record.issue.accepted and record.issue.closed and record.issue.ranks_available then 10.15 if record.negative_votes and record.positive_votes then 10.16 local max_value = record.issue.voter_count 10.17 ui.bargraph{
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/app/main/initiative/edit.lua Mon Nov 30 12:00:00 2009 +0100 11.3 @@ -0,0 +1,23 @@ 11.4 +local initiative = Initiative:by_id(param.get_id()) 11.5 + 11.6 +slot.put_into("title", _"Edit initiative") 11.7 + 11.8 +ui.form{ 11.9 + record = initiative, 11.10 + module = "initiative", 11.11 + action = "update", 11.12 + id = initiative.id, 11.13 + attr = { class = "vertical" }, 11.14 + routing = { 11.15 + default = { 11.16 + mode = "redirect", 11.17 + module = "initiative", 11.18 + view = "show", 11.19 + id = initiative.id 11.20 + } 11.21 + }, 11.22 + content = function() 11.23 + ui.field.text{ label = _"Discussion URL", name = "discussion_url" } 11.24 + ui.submit{ text = _"Save" } 11.25 + end 11.26 +} 11.27 \ No newline at end of file
12.1 --- a/app/main/initiative/new.lua Mon Nov 23 12:00:00 2009 +0100 12.2 +++ b/app/main/initiative/new.lua Mon Nov 30 12:00:00 2009 +0100 12.3 @@ -39,6 +39,7 @@ 12.4 } 12.5 end 12.6 ui.field.text{ label = _"Name", name = "name" } 12.7 + ui.field.text{ label = _"Discussion URL", name = "discussion_url" } 12.8 ui.field.text{ label = _"Draft", name = "draft", multiline = true, attr = { style = "height: 50ex;" } } 12.9 ui.submit{ text = _"Save" } 12.10 end
13.1 --- a/app/main/initiative/show.lua Mon Nov 23 12:00:00 2009 +0100 13.2 +++ b/app/main/initiative/show.lua Mon Nov 30 12:00:00 2009 +0100 13.3 @@ -1,6 +1,6 @@ 13.4 local initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec() 13.5 13.6 -slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />') 13.7 +--slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />') 13.8 13.9 execute.view{ 13.10 module = "supporter", 13.11 @@ -40,7 +40,9 @@ 13.12 13.13 slot.select("actions", function() 13.14 13.15 - if Initiator:by_pk(initiative.id, app.session.member.id) then 13.16 + local initiator = Initiator:by_pk(initiative.id, app.session.member.id) 13.17 + 13.18 + if initiator then 13.19 ui.link{ 13.20 content = function() 13.21 ui.image{ static = "icons/16/script_add.png" } 13.22 @@ -52,8 +54,41 @@ 13.23 } 13.24 end 13.25 13.26 - ui.twitter("http://example.com/i" .. tostring(initiative.id) .. " " .. initiative.name) 13.27 + if not initiative.issue.fully_frozen and not initiative.issue.closed then 13.28 + ui.link{ 13.29 + attr = { class = "action" }, 13.30 + content = function() 13.31 + ui.image{ static = "icons/16/script_add.png" } 13.32 + slot.put(_"Create alternative initiative" ) 13.33 + end, 13.34 + module = "initiative", 13.35 + view = "new", 13.36 + params = { issue_id = initiative.issue.id } 13.37 + } 13.38 + end 13.39 +-- ui.twitter("http://example.com/i" .. tostring(initiative.id) .. " " .. initiative.name) 13.40 13.41 + if initiative.discussion_url and #initiative.discussion_url > 0 then 13.42 + ui.link{ 13.43 + attr = { 13.44 + target = _"blank", 13.45 + title = initiative.discussion_url 13.46 + }, 13.47 + content = function() 13.48 + ui.image{ static = "icons/16/comments.png" } 13.49 + slot.put(_"External discussion") 13.50 + end, 13.51 + external = initiative.discussion_url 13.52 + } 13.53 + end 13.54 + if initiator then 13.55 + ui.link{ 13.56 + content = _"(change)", 13.57 + module = "initiative", 13.58 + view = "edit", 13.59 + id = initiative.id 13.60 + } 13.61 + end 13.62 end) 13.63 13.64 13.65 @@ -178,7 +213,18 @@ 13.66 name = "supporter", 13.67 label = _"Supporter", 13.68 content = function() 13.69 - execute.view{ module = "member", view = "_list", params = { members_selector = initiative:get_reference_selector("supporting_members") } } 13.70 + execute.view{ 13.71 + module = "member", 13.72 + view = "_list", 13.73 + params = { 13.74 + initiative = initiative, 13.75 + members_selector = initiative:get_reference_selector("supporting_members_snapshot") 13.76 + :join("issue", nil, "issue.id = direct_supporter_snapshot.issue_id") 13.77 + :join("direct_population_snapshot", nil, "direct_population_snapshot.event = issue.latest_snapshot_event AND direct_population_snapshot.issue_id = issue.id AND direct_population_snapshot.member_id = member.id") 13.78 + :add_field("direct_population_snapshot.weight") 13.79 + :add_where("direct_supporter_snapshot.event = issue.latest_snapshot_event") 13.80 + } 13.81 + } 13.82 end 13.83 }, 13.84 {
14.1 --- a/app/main/interest/_show_box.lua Mon Nov 23 12:00:00 2009 +0100 14.2 +++ b/app/main/interest/_show_box.lua Mon Nov 30 12:00:00 2009 +0100 14.3 @@ -22,6 +22,14 @@ 14.4 ui.container{ 14.5 attr = { class = "content", id = "interest_content" }, 14.6 content = function() 14.7 + ui.container{ 14.8 + attr = { 14.9 + class = "close", 14.10 + style = "cursor: pointer;", 14.11 + onclick = "document.getElementById('interest_content').style.display = 'none';" 14.12 + }, 14.13 + content = _"X" 14.14 + } 14.15 if interest then 14.16 ui.link{ 14.17 content = _"Remove my interest", 14.18 @@ -30,6 +38,8 @@ 14.19 params = { issue_id = issue.id, delete = true }, 14.20 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } 14.21 } 14.22 + slot.put("<br />") 14.23 + slot.put("<br />") 14.24 if interest.autoreject then 14.25 ui.field.text{ value = _"Autoreject is on." } 14.26 ui.link{ 14.27 @@ -58,14 +68,6 @@ 14.28 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } 14.29 } 14.30 end 14.31 - ui.container{ 14.32 - attr = { 14.33 - class = "head", 14.34 - style = "cursor: pointer;", 14.35 - onclick = "document.getElementById('interest_content').style.display = 'none';" 14.36 - }, 14.37 - content = _"Click here to close." 14.38 - } 14.39 end 14.40 } 14.41 end)
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 15.2 +++ b/app/main/interest/show_incoming.lua Mon Nov 30 12:00:00 2009 +0100 15.3 @@ -0,0 +1,19 @@ 15.4 +local issue = Issue:by_id(param.get("issue_id", atom.integer)) 15.5 +local member = Member:by_id(param.get("member_id", atom.integer)) 15.6 + 15.7 +local members_selector = Member:new_selector() 15.8 + :join("delegating_interest_snapshot", nil, "delegating_interest_snapshot.member_id = member.id") 15.9 + :add_where{ "delegating_interest_snapshot.issue_id = ?", issue.id } 15.10 + :add_where{ "delegating_interest_snapshot.event = ?", issue.latest_snapshot_event } 15.11 + :add_where{ "delegating_interest_snapshot.delegate_member_ids[1] = ?", member.id } 15.12 + :add_field{ "delegating_interest_snapshot.weight" } 15.13 + 15.14 +execute.view{ 15.15 + module = "member", 15.16 + view = "_list", 15.17 + params = { 15.18 + members_selector = members_selector, 15.19 + issue = issue, 15.20 + trustee = member 15.21 + } 15.22 +} 15.23 \ No newline at end of file
16.1 --- a/app/main/issue/_show_box.lua Mon Nov 23 12:00:00 2009 +0100 16.2 +++ b/app/main/issue/_show_box.lua Mon Nov 30 12:00:00 2009 +0100 16.3 @@ -8,14 +8,14 @@ 16.4 local time_left = issue.state_time_left 16.5 if time_left then 16.6 ui.field.text{ 16.7 - label = "Time left", 16.8 + label = _"Time left", 16.9 value = time_left 16.10 } 16.11 end 16.12 local next_state_names = issue.next_states_names 16.13 if next_state_names then 16.14 ui.field.text{ 16.15 - label = _"Next states", 16.16 + label = _"Next state", 16.17 value = next_state_names 16.18 } 16.19 end
17.1 --- a/app/main/issue/show.lua Mon Nov 23 12:00:00 2009 +0100 17.2 +++ b/app/main/issue/show.lua Mon Nov 30 12:00:00 2009 +0100 17.3 @@ -61,7 +61,7 @@ 17.4 } 17.5 } 17.6 slot.put("<br />") 17.7 - if not issue.frozen and not issue.closed then 17.8 + if not issue.fully_frozen and not issue.closed then 17.9 ui.link{ 17.10 attr = { class = "action" }, 17.11 content = function() 17.12 @@ -88,6 +88,23 @@ 17.13 }, 17.14 --]] 17.15 { 17.16 + name = "interested_members", 17.17 + label = _"Interested members", 17.18 + content = function() 17.19 + execute.view{ 17.20 + module = "member", 17.21 + view = "_list", 17.22 + params = { 17.23 + issue = issue, 17.24 + members_selector = issue:get_reference_selector("interested_members_snapshot") 17.25 + :join("issue", nil, "issue.id = direct_interest_snapshot.issue_id") 17.26 + :add_field("direct_interest_snapshot.weight") 17.27 + :add_where("direct_interest_snapshot.event = issue.latest_snapshot_event") 17.28 + } 17.29 + } 17.30 + end 17.31 + }, 17.32 + { 17.33 name = "delegations", 17.34 label = _"Delegations", 17.35 content = function() 17.36 @@ -110,19 +127,23 @@ 17.37 content = function() 17.38 ui.field.text{ label = _"State", name = "state" } 17.39 ui.field.timestamp{ label = _"Created at", name = "created" } 17.40 - ui.field.text{ label = _"admission_time", value = policy.admission_time } 17.41 - ui.field.integer{ label = _"issue_quorum_num", value = policy.issue_quorum_num } 17.42 - ui.field.integer{ label = _"issue_quorum_den", value = policy.issue_quorum_den } 17.43 - ui.field.timestamp{ label = _"Accepted", name = "accepted" } 17.44 - ui.field.text{ label = _"discussion_time", value = policy.discussion_time } 17.45 + ui.field.text{ label = _"Admission time", value = policy.admission_time } 17.46 + ui.field.text{ 17.47 + label = _"Issue quorum", 17.48 + value = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den) 17.49 + } 17.50 + ui.field.timestamp{ label = _"Accepted at", name = "accepted" } 17.51 + ui.field.text{ label = _"Discussion time", value = policy.discussion_time } 17.52 ui.field.vote_now{ label = _"Vote now", name = "vote_now" } 17.53 ui.field.vote_later{ label = _"Vote later", name = "vote_later" } 17.54 - ui.field.timestamp{ label = _"Half frozen", name = "half_frozen" } 17.55 - ui.field.text{ label = _"verification_time", value = policy.verification_time } 17.56 - ui.field.integer{ label = _"initiative_quorum_num", value = policy.initiative_quorum_num } 17.57 - ui.field.integer{ label = _"initiative_quorum_den", value = policy.initiative_quorum_den } 17.58 - ui.field.timestamp{ label = _"Fully frozen", name = "fully_frozen" } 17.59 - ui.field.text{ label = _"voting_time", value = policy.voting_time } 17.60 + ui.field.timestamp{ label = _"Half frozen at", name = "half_frozen" } 17.61 + ui.field.text{ label = _"Verification time", value = policy.verification_time } 17.62 + ui.field.text{ 17.63 + label = _"Initiative quorum", 17.64 + value = format.percentage(policy.initiative_quorum_num / policy.initiative_quorum_den) 17.65 + } 17.66 + ui.field.timestamp{ label = _"Fully frozen at", name = "fully_frozen" } 17.67 + ui.field.text{ label = _"Voting time", value = policy.voting_time } 17.68 ui.field.timestamp{ label = _"Closed", name = "closed" } 17.69 end 17.70 }
18.1 --- a/app/main/member/_action/update_avatar.lua Mon Nov 23 12:00:00 2009 +0100 18.2 +++ b/app/main/member/_action/update_avatar.lua Mon Nov 30 12:00:00 2009 +0100 18.3 @@ -16,7 +16,7 @@ 18.4 18.5 local data = param.get("avatar") 18.6 18.7 -local data_scaled, err, status = os.pfilter(data, "convert", "-", "-thumbnail", "48x48", "-") 18.8 +local data_scaled, err, status = os.pfilter(data, "convert", "-", "-thumbnail", "48x48", "jpeg:-") 18.9 18.10 if status ~= 0 or data_scaled == nil then 18.11 error("error while converting image")
19.1 --- a/app/main/member/_list.lua Mon Nov 23 12:00:00 2009 +0100 19.2 +++ b/app/main/member/_list.lua Mon Nov 30 12:00:00 2009 +0100 19.3 @@ -1,20 +1,33 @@ 19.4 local members_selector = param.get("members_selector", "table") 19.5 +local initiative = param.get("initiative", "table") 19.6 +local issue = param.get("issue", "table") 19.7 +local trustee = param.get("trustee", "table") 19.8 + 19.9 +local options = { 19.10 + { 19.11 + name = "name", 19.12 + label = _"A-Z", 19.13 + order_by = "name" 19.14 + }, 19.15 + { 19.16 + name = "name_desc", 19.17 + label = _"Z-A", 19.18 + order_by = "name DESC" 19.19 + }, 19.20 +} 19.21 + 19.22 +if initiative then 19.23 + options[#options+1] = { 19.24 + name = "delegations", 19.25 + label = _"Delegations", 19.26 + order_by = "weight DESC" 19.27 + } 19.28 +end 19.29 19.30 ui.order{ 19.31 name = "member_list", 19.32 selector = members_selector, 19.33 - options = { 19.34 - { 19.35 - name = "name", 19.36 - label = _"A-Z", 19.37 - order_by = "name" 19.38 - }, 19.39 - { 19.40 - name = "name_desc", 19.41 - label = _"Z-A", 19.42 - order_by = "name DESC" 19.43 - }, 19.44 - }, 19.45 + options = options, 19.46 content = function() 19.47 ui.paginate{ 19.48 selector = members_selector, 19.49 @@ -23,16 +36,100 @@ 19.50 ui.container{ 19.51 attr = { class = "member_list" }, 19.52 content = function() 19.53 - for i, member in ipairs(members_selector:exec()) do 19.54 + local members = members_selector:exec() 19.55 + local columns = { 19.56 + { 19.57 + label = _"Name", 19.58 + content = function(member) 19.59 + ui.link{ 19.60 + module = "member", 19.61 + view = "show", 19.62 + id = member.id, 19.63 + content = function() 19.64 + ui.image{ 19.65 + attr = { width = 48, height = 48 }, 19.66 + module = "member", 19.67 + view = "avatar", 19.68 + id = member.id, 19.69 + extension = "jpg" 19.70 + } 19.71 + end 19.72 + } 19.73 + end 19.74 + }, 19.75 + { 19.76 + label = _"Name", 19.77 + content = function(member) 19.78 + ui.link{ 19.79 + module = "member", 19.80 + view = "show", 19.81 + id = member.id, 19.82 + content = member.name 19.83 + } 19.84 + if member.admin then 19.85 + ui.image{ 19.86 + attr = { 19.87 + alt = _"Administrator", 19.88 + title = _"Administrator" 19.89 + }, 19.90 + static = "icons/16/cog.png" 19.91 + } 19.92 + end 19.93 + -- TODO performance 19.94 + local contact = Contact:by_pk(app.session.member.id, member.id) 19.95 + if contact then 19.96 + ui.image{ 19.97 + attr = { 19.98 + alt = _"Saved as contact", 19.99 + title = _"Saved as contact" 19.100 + }, 19.101 + static = "icons/16/book_edit.png" 19.102 + } 19.103 + end 19.104 + end 19.105 + } 19.106 + } 19.107 + 19.108 + if initiative then 19.109 + columns[#columns+1] = { 19.110 + label = _"Delegations", 19.111 + field_attr = { style = "text-align: right;" }, 19.112 + content = function(member) 19.113 + if member.weight > 1 then 19.114 + ui.link{ 19.115 + content = member.weight, 19.116 + module = "support", 19.117 + view = "show_incoming", 19.118 + params = { member_id = member.id, initiative_id = initiative.id } 19.119 + } 19.120 + end 19.121 + end 19.122 + } 19.123 + end 19.124 + 19.125 +--[[ ui.list{ 19.126 + records = members, 19.127 + columns = columns 19.128 + } 19.129 +--]] 19.130 +---[[ 19.131 + for i, member in ipairs(members) do 19.132 execute.view{ 19.133 module = "member", 19.134 view = "_show_thumb", 19.135 - params = { member = member } 19.136 + params = { member = member, initiative = initiative, issue = issue, trustee = trustee } 19.137 } 19.138 end 19.139 +---]] 19.140 end 19.141 } 19.142 - slot.put('<br style="clear: left;" />') 19.143 + slot.put('<br style="clear: left;" />') 19.144 + if issue then 19.145 + ui.field.timestamp{ label = _"Last snapshot:", value = issue.snapshot } 19.146 + end 19.147 + if initiative then 19.148 + ui.field.timestamp{ label = _"Last snapshot:", value = initiative.issue.snapshot } 19.149 + end 19.150 end 19.151 } 19.152 end
20.1 --- a/app/main/member/_show.lua Mon Nov 23 12:00:00 2009 +0100 20.2 +++ b/app/main/member/_show.lua Mon Nov 30 12:00:00 2009 +0100 20.3 @@ -5,8 +5,12 @@ 20.4 record = member, 20.5 readonly = true, 20.6 content = function() 20.7 - ui.field.boolean{ label = _"Admin?", name = "admin" } 20.8 - ui.field.boolean{ label = _"Locked?", name = "locked" } 20.9 + if member.admin then 20.10 + ui.field.boolean{ label = _"Admin?", name = "admin" } 20.11 + end 20.12 + if member.locked then 20.13 + ui.field.boolean{ label = _"Locked?", name = "locked" } 20.14 + end 20.15 if member.ident_number then 20.16 ui.field.text{ label = _"Ident number", name = "ident_number" } 20.17 end
21.1 --- a/app/main/member/_show_thumb.lua Mon Nov 23 12:00:00 2009 +0100 21.2 +++ b/app/main/member/_show_thumb.lua Mon Nov 30 12:00:00 2009 +0100 21.3 @@ -1,5 +1,9 @@ 21.4 local member = param.get("member", "table") 21.5 21.6 +local issue = param.get("issue", "table") 21.7 +local initiative = param.get("initiative", "table") 21.8 +local trustee = param.get("trustee", "table") 21.9 + 21.10 local name 21.11 if member.name_highlighted then 21.12 name = encode.highlight(member.name_highlighted) 21.13 @@ -7,19 +11,74 @@ 21.14 name = encode.html(member.name) 21.15 end 21.16 21.17 -ui.link{ 21.18 +ui.container{ 21.19 attr = { class = "member_thumb" }, 21.20 - module = "member", 21.21 - view = "show", 21.22 - id = member.id, 21.23 content = function() 21.24 - ui.image{ 21.25 - attr = { width = 48, height = 48 }, 21.26 - module = "member", 21.27 - view = "avatar", 21.28 - id = member.id, 21.29 - extension = "jpg" 21.30 + ui.container{ 21.31 + attr = { class = "flags" }, 21.32 + content = function() 21.33 + if (issue or initiative) and member.weight > 1 then 21.34 + local module 21.35 + if issue then 21.36 + module = "interest" 21.37 + elseif initiative then 21.38 + module = "supporter" 21.39 + end 21.40 + ui.link{ 21.41 + attr = { title = _"Number of incoming delegations, follow link to see more details" }, 21.42 + content = _("+ #{weight}", { weight = member.weight - 1 }), 21.43 + module = module, 21.44 + view = "show_incoming", 21.45 + params = { 21.46 + member_id = member.id, 21.47 + initiative_id = initiative and initiative.id or nil, 21.48 + issue_id = issue and issue.id or nil 21.49 + } 21.50 + } 21.51 + end 21.52 + if member.admin then 21.53 + ui.image{ 21.54 + attr = { 21.55 + alt = _"Member is administrator", 21.56 + title = _"Member is administrator" 21.57 + }, 21.58 + static = "icons/16/cog.png" 21.59 + } 21.60 + end 21.61 + -- TODO performance 21.62 + local contact = Contact:by_pk(app.session.member.id, member.id) 21.63 + if contact then 21.64 + ui.image{ 21.65 + attr = { 21.66 + alt = _"You have saved this member as contact", 21.67 + title = _"You have saved this member as contact" 21.68 + }, 21.69 + static = "icons/16/bullet_disk.png" 21.70 + } 21.71 + end 21.72 + end 21.73 } 21.74 - slot.put(name) 21.75 + 21.76 + ui.link{ 21.77 + attr = { title = _"Show member" }, 21.78 + module = "member", 21.79 + view = "show", 21.80 + id = member.id, 21.81 + content = function() 21.82 + ui.image{ 21.83 + attr = { width = 48, height = 48 }, 21.84 + module = "member", 21.85 + view = "avatar", 21.86 + id = member.id, 21.87 + extension = "jpg" 21.88 + } 21.89 + ui.container{ 21.90 + attr = { class = "member_name" }, 21.91 + content = function() 21.92 + slot.put(name) 21.93 + end 21.94 + } 21.95 + end 21.96 + } 21.97 end 21.98 -} 21.99 \ No newline at end of file 21.100 +}
22.1 --- a/app/main/member/show.lua Mon Nov 23 12:00:00 2009 +0100 22.2 +++ b/app/main/member/show.lua Mon Nov 30 12:00:00 2009 +0100 22.3 @@ -15,17 +15,49 @@ 22.4 if member.id == app.session.member.id then 22.5 slot.put_into("actions", _"That's me!") 22.6 else 22.7 - slot.select("actions", function() 22.8 - ui.link{ 22.9 - content = function() 22.10 - ui.image{ static = "icons/16/book_add.png" } 22.11 - slot.put(encode.html(_"Add to my contacts")) 22.12 - end, 22.13 - module = "contact", 22.14 - action = "add_member", 22.15 - id = member.id 22.16 - } 22.17 - end) 22.18 + --TODO performance 22.19 + local contact = Contact:by_pk(app.session.member.id, member.id) 22.20 + if contact then 22.21 + slot.select("actions", function() 22.22 + ui.field.text{ value = _"You have saved this member as contact." } 22.23 + ui.link{ 22.24 + text = _"Remove from contacts", 22.25 + module = "contact", 22.26 + action = "remove_member", 22.27 + id = contact.other_member_id, 22.28 + routing = { 22.29 + default = { 22.30 + mode = "redirect", 22.31 + module = request.get_module(), 22.32 + view = request.get_view(), 22.33 + id = param.get_id_cgi(), 22.34 + params = param.get_all_cgi() 22.35 + } 22.36 + } 22.37 + } 22.38 + end) 22.39 + else 22.40 + slot.select("actions", function() 22.41 + ui.link{ 22.42 + content = function() 22.43 + ui.image{ static = "icons/16/book_add.png" } 22.44 + slot.put(encode.html(_"Add to my contacts")) 22.45 + end, 22.46 + module = "contact", 22.47 + action = "add_member", 22.48 + id = member.id, 22.49 + routing = { 22.50 + default = { 22.51 + mode = "redirect", 22.52 + module = request.get_module(), 22.53 + view = request.get_view(), 22.54 + id = param.get_id_cgi(), 22.55 + params = param.get_all_cgi() 22.56 + } 22.57 + } 22.58 + } 22.59 + end) 22.60 + end 22.61 end 22.62 22.63
23.1 --- a/app/main/opinion/_action/update.lua Mon Nov 23 12:00:00 2009 +0100 23.2 +++ b/app/main/opinion/_action/update.lua Mon Nov 30 12:00:00 2009 +0100 23.3 @@ -4,9 +4,11 @@ 23.4 23.5 local opinion = Opinion:by_pk(member_id, suggestion_id) 23.6 23.7 -if opinion and param.get("delete") then 23.8 - opinion:destroy() 23.9 - slot.put_into("notice", _"Your opinion has been updated") 23.10 +if param.get("delete") then 23.11 + if opinion then 23.12 + opinion:destroy() 23.13 + end 23.14 + slot.put_into("notice", _"Your opinion has been deleted") 23.15 return 23.16 end 23.17
24.1 --- a/app/main/suggestion/_list.lua Mon Nov 23 12:00:00 2009 +0100 24.2 +++ b/app/main/suggestion/_list.lua Mon Nov 30 12:00:00 2009 +0100 24.3 @@ -8,7 +8,7 @@ 24.4 records = suggestions_selector:exec(), 24.5 columns = { 24.6 { 24.7 - label = _"Name", 24.8 + label = _"Suggestion", 24.9 content = function(record) 24.10 ui.link{ 24.11 text = record.name, 24.12 @@ -19,7 +19,8 @@ 24.13 end 24.14 }, 24.15 { 24.16 - label = _"Support", 24.17 + label = _"Collective opinion", 24.18 + label_attr = { style = "width: 101px;" }, 24.19 content = function(record) 24.20 if record.minus2_unfulfilled_count then 24.21 local max_value = record.initiative.issue.population 24.22 @@ -39,6 +40,7 @@ 24.23 end 24.24 }, 24.25 { 24.26 + label = _"My opinion", 24.27 content = function(record) 24.28 local degree 24.29 local opinion = Opinion:by_pk(app.session.member.id, record.id) 24.30 @@ -103,6 +105,14 @@ 24.31 end 24.32 }, 24.33 { 24.34 + content = function(record) 24.35 + local opinion = Opinion:by_pk(app.session.member.id, record.id) 24.36 + if opinion and not opinion.fulfilled then 24.37 + ui.image{ static = "icons/16/cross.png" } 24.38 + end 24.39 + end 24.40 + }, 24.41 + { 24.42 label = _"Suggestion currently not implemented", 24.43 label_attr = { style = "width: 101px;" }, 24.44 content = function(record) 24.45 @@ -124,6 +134,14 @@ 24.46 end 24.47 }, 24.48 { 24.49 + content = function(record) 24.50 + local opinion = Opinion:by_pk(app.session.member.id, record.id) 24.51 + if opinion and opinion.fulfilled then 24.52 + ui.image{ static = "icons/16/tick.png" } 24.53 + end 24.54 + end 24.55 + }, 24.56 + { 24.57 label = _"Suggestion currently implemented", 24.58 label_attr = { style = "width: 101px;" }, 24.59 content = function(record) 24.60 @@ -145,6 +163,7 @@ 24.61 end 24.62 }, 24.63 { 24.64 + label_attr = { style = "width: 200px;" }, 24.65 content = function(record) 24.66 local degree 24.67 local opinion = Opinion:by_pk(app.session.member.id, record.id) 24.68 @@ -153,10 +172,15 @@ 24.69 end 24.70 if opinion then 24.71 if not opinion.fulfilled then 24.72 - ui.image{ static = "icons/16/cross.png" } 24.73 + local text = "" 24.74 + if opinion.degree > 0 then 24.75 + text = _"Mark suggestion as implemented and express satisfaction" 24.76 + else 24.77 + text = _"Mark suggestion as implemented and express dissatisfaction" 24.78 + end 24.79 ui.link{ 24.80 attr = { class = "action" }, 24.81 - text = _"set implented", 24.82 + text = text, 24.83 module = "opinion", 24.84 action = "update", 24.85 routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } }, 24.86 @@ -166,10 +190,14 @@ 24.87 } 24.88 } 24.89 else 24.90 - ui.image{ static = "icons/16/tick.png" } 24.91 + if opinion.degree > 0 then 24.92 + text = _"Mark suggestion as not implemented and express dissatisfaction" 24.93 + else 24.94 + text = _"Mark suggestion as not implemented and express satisfaction" 24.95 + end 24.96 ui.link{ 24.97 attr = { class = "action" }, 24.98 - text = _"remove implemented", 24.99 + text = text, 24.100 module = "opinion", 24.101 action = "update", 24.102 routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } }, 24.103 @@ -182,6 +210,18 @@ 24.104 end 24.105 end 24.106 }, 24.107 + { 24.108 + content = function(record) 24.109 + local opinion = Opinion:by_pk(app.session.member.id, record.id) 24.110 + if opinion then 24.111 + if (opinion.fulfilled and opinion.degree > 0) or (not opinion.fulfilled and opinion.degree < 0) then 24.112 + ui.image{ static = "icons/16/thumb_up_green.png" } 24.113 + else 24.114 + ui.image{ static = "icons/16/thumb_down_red.png" } 24.115 + end 24.116 + end 24.117 + end 24.118 + }, 24.119 } 24.120 } 24.121 end
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 25.2 +++ b/app/main/supporter/show_incoming.lua Mon Nov 30 12:00:00 2009 +0100 25.3 @@ -0,0 +1,20 @@ 25.4 +local initiative = Initiative:by_id(param.get("initiative_id", atom.integer)) 25.5 +local issue = initiative.issue 25.6 +local member = Member:by_id(param.get("member_id", atom.integer)) 25.7 + 25.8 +local members_selector = Member:new_selector() 25.9 + :join("delegating_population_snapshot", nil, "delegating_population_snapshot.member_id = member.id") 25.10 + :add_where{ "delegating_population_snapshot.issue_id = ?", issue.id } 25.11 + :add_where{ "delegating_population_snapshot.event = ?", issue.latest_snapshot_event } 25.12 + :add_where{ "delegating_population_snapshot.delegate_member_ids[1] = ?", member.id } 25.13 + :add_field{ "delegating_population_snapshot.weight" } 25.14 + 25.15 +execute.view{ 25.16 + module = "member", 25.17 + view = "_list", 25.18 + params = { 25.19 + members_selector = members_selector, 25.20 + issue = issue, 25.21 + trustee = member 25.22 + } 25.23 +} 25.24 \ No newline at end of file
26.1 --- a/config/default.lua Mon Nov 23 12:00:00 2009 +0100 26.2 +++ b/config/default.lua Mon Nov 30 12:00:00 2009 +0100 26.3 @@ -1,12 +1,12 @@ 26.4 config.app_name = "LiquidFeedback" 26.5 -config.app_version = "alpha3" 26.6 +config.app_version = "alpha4" 26.7 26.8 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)" 26.9 26.10 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany" 26.11 26.12 config.member_image_convert = { 26.13 - avatar = { "convert", "-", "-thumbnail", "48x48", "-" } 26.14 + avatar = { "convert", "-", "-thumbnail", "48x48", "jpeg:-" } 26.15 } 26.16 26.17 -- uncomment the following two lines to use C implementations of chosen
27.1 --- a/locale/translations.de.lua Mon Nov 23 12:00:00 2009 +0100 27.2 +++ b/locale/translations.de.lua Mon Nov 30 12:00:00 2009 +0100 27.3 @@ -1,5 +1,7 @@ 27.4 #!/usr/bin/env lua 27.5 return { 27.6 +["(change)"] = "(ändern)"; 27.7 +["+ #{weight}"] = false; 27.8 ["A-Z"] = false; 27.9 ["About"] = false; 27.10 ["About LiquidFeedback"] = "Über LiquidFeedback"; 27.11 @@ -15,6 +17,7 @@ 27.12 ["Admin"] = "Admin"; 27.13 ["Admin menu"] = "Admin Menü"; 27.14 ["Admin?"] = "Admin?"; 27.15 +["Administrator"] = false; 27.16 ["Admitted"] = "zugelassen"; 27.17 ["Any"] = "Alle"; 27.18 ["Area"] = "Themenbereich"; 27.19 @@ -36,10 +39,12 @@ 27.20 ["Click here to close."] = "Zum Schließen hier klicken"; 27.21 ["Close"] = "Schließen"; 27.22 ["Closed"] = "geschlossen"; 27.23 +["Collective opinion"] = "Meinungsbild"; 27.24 ["Commit suggestion"] = "Anregung speichern"; 27.25 ["Compare"] = "Vergleichen"; 27.26 ["Contacts"] = "Kontakte"; 27.27 ["Content"] = "Inhalt"; 27.28 +["Create alternative initiative"] = "Alternative Initiative hinzufügen"; 27.29 ["Create new area"] = "Neuen Themenbereich anlegen"; 27.30 ["Create new issue"] = "Neues Thema anlegen"; 27.31 ["Created at"] = "Erzeugt am/um"; 27.32 @@ -52,11 +57,15 @@ 27.33 ["Diff"] = false; 27.34 ["Direct member count"] = "Anzahl Direktmitglieder"; 27.35 ["Direct supporter [change]"] = "Direkte Unterstützung [ändern]"; 27.36 +["Discussion"] = "Diskussion"; 27.37 +["Discussion URL"] = "Diskussions-URL"; 27.38 ["Draft"] = "Entwurf"; 27.39 ["Edit"] = "Bearbeiten"; 27.40 ["Edit draft"] = "Entwurf bearbeiten"; 27.41 +["Edit initiative"] = "Initiative bearbeiten"; 27.42 ["Edit my page"] = "Meine Seite bearbeiten"; 27.43 ["Error while updating member, database reported:<br /><br /> (#{errormessage})"] = "Fehler beim aktualisieren des Mitglieds, die Datenbank berichtet folgenden Fehler:<br /><br /> (#{errormessage})"; 27.44 +["External discussion"] = "Externe Diskussion"; 27.45 ["External memberships"] = "Externe Mitgliedschaften"; 27.46 ["External posts"] = "Externe Ämter"; 27.47 ["Filter"] = false; 27.48 @@ -73,12 +82,14 @@ 27.49 ["In discussion"] = "In Diskussion"; 27.50 ["Incoming delegations"] = "Eingehende Delegationen"; 27.51 ["Initiative successfully created"] = "Initiative erfolgreich erzeugt"; 27.52 +["Initiative successfully updated"] = "Initiative erfolgreich aktualisiert"; 27.53 ["Initiative: '#{name}'"] = "Initiative: '#{name}'"; 27.54 ["Initiatives"] = "Initiativen"; 27.55 ["Initiators"] = "Initiatoren"; 27.56 ["Interest not existant"] = "Interesse existiert nicht"; 27.57 ["Interest removed"] = "Interesse entfernt"; 27.58 ["Interest updated"] = "Interesse aktualisiert"; 27.59 +["Interested members"] = "Interessierte Mitglieder"; 27.60 ["Internal posts"] = "Interne Ämter"; 27.61 ["Invalid username or password!"] = "Ungültiger Benutzername oder Kennwort"; 27.62 ["Issue"] = "Thema"; 27.63 @@ -87,6 +98,7 @@ 27.64 ["Issue delegation"] = "Issue-Delegation"; 27.65 ["Issue policy"] = "Regelwerk für Thema"; 27.66 ["Issues"] = "Themen"; 27.67 +["Last snapshot:"] = "Letzte Auszählung:"; 27.68 ["License"] = "Lizenz"; 27.69 ["Locked?"] = "Gesperrt?"; 27.70 ["Logged in as:"] = "Angemeldet als:"; 27.71 @@ -94,10 +106,15 @@ 27.72 ["Login successful!"] = "Anmeldung erfolgreich"; 27.73 ["Logout"] = "Abmelden"; 27.74 ["Logout successful"] = "Abmeldung erfolgreich"; 27.75 +["Mark suggestion as implemented and express dissatisfaction"] = "Anregung als umgesetzt markieren und Unzufriedenheit ausdrücken"; 27.76 +["Mark suggestion as implemented and express satisfaction"] = "Anregung als umgesetzt markieren und Zufriedenheit ausdrücken"; 27.77 +["Mark suggestion as not implemented and express dissatisfaction"] = "Anregung als nicht umgesetzt markieren und Unzufriedenheit ausdrücken"; 27.78 +["Mark suggestion as not implemented and express satisfaction"] = "Anregung als nicht umgesetzt markieren und Zufriedenheit ausdrücken"; 27.79 ["Member '#{member}'"] = "Mitglied '#{member}'"; 27.80 ["Member has been removed from your contacts"] = "Mitglied wurde aus Deinen Kontakten entfernt"; 27.81 ["Member has been saved as private contact"] = "Mitglied wurde als privater Kontakt gespeichert"; 27.82 ["Member has been saved as public contact"] = "Mitglied wurde als öffentlicher Kontakt gespeichert"; 27.83 +["Member is administrator"] = "Mitglied ist Administrator"; 27.84 ["Member is already saved in your contacts!"] = "Mitglied ist schon in Deinen Kontakten!"; 27.85 ["Member list"] = "Mitgliederliste"; 27.86 ["Member login"] = "Mitglied Login"; 27.87 @@ -110,6 +127,7 @@ 27.88 ["Membership removed"] = "Mitgliedschaft entfernt"; 27.89 ["Membership updated"] = "Mitgliedschaft aktualisiert"; 27.90 ["Mobile phone"] = "Mobiltelefon"; 27.91 +["My opinion"] = "Meine Meinung"; 27.92 ["Name"] = "Name"; 27.93 ["New"] = "Neu"; 27.94 ["New draft has been added to initiative"] = "Neuer Entwurf wurde der Initiative hinzugefügt"; 27.95 @@ -118,8 +136,9 @@ 27.96 ["New passwords does not match."] = "Du hast nicht zweimal das gleiche Kennwort eingegeben"; 27.97 ["New passwords is too short."] = "Das neue Kennwort ist zu kurz"; 27.98 ["Newest"] = "Neueste"; 27.99 -["Next states"] = "Nächste Statuse"; 27.100 +["Next state"] = "Nächster Zustand"; 27.101 ["No supporter [change]"] = "Keine Unterstützung (ändern)"; 27.102 +["Number of incoming delegations, follow link to see more details"] = "Anzahl eingehender Delegationen, Link folgen für mehr Details"; 27.103 ["OK"] = "OK"; 27.104 ["Old draft revision"] = "Alte Revision des Entwurfs"; 27.105 ["Old drafts"] = "Alte Entwürfe"; 27.106 @@ -143,6 +162,7 @@ 27.107 ["Register new member"] = "Neues Mitglied registrieren"; 27.108 ["Remove"] = "Entfernen"; 27.109 ["Remove autoreject"] = "Auto-Ablehnen abschalten"; 27.110 +["Remove from contacts"] = "Aus den Kontakten entfernen"; 27.111 ["Remove my interest"] = "Interesse abmelden"; 27.112 ["Remove my membership"] = "Mitgliedschaft aufgeben"; 27.113 ["Remove my support from this initiative"] = "Meine Unterstützung der Initiative entziehen"; 27.114 @@ -150,6 +170,7 @@ 27.115 ["Revoke"] = "Widerrufen"; 27.116 ["Revoked at"] = "Zurückgezogen am/um"; 27.117 ["Save"] = "Speichern"; 27.118 +["Saved as contact"] = "Als Kontakt speichern"; 27.119 ["Search"] = "Suchen"; 27.120 ["Search initiatives"] = "Suche Initiativen"; 27.121 ["Search issues"] = "Suche Themen"; 27.122 @@ -164,9 +185,11 @@ 27.123 ["Show areas not in use"] = "Zeige nicht verwendente Themenbereiche"; 27.124 ["Show diff"] = "Änderungen anzeigen"; 27.125 ["Show locked members"] = "Zeige gesperrte Mitglieder"; 27.126 +["Show member"] = "Mitglied anzeigen"; 27.127 ["Software"] = false; 27.128 ["State"] = "Zustand"; 27.129 ["Statement"] = false; 27.130 +["Suggestion"] = "Anregung"; 27.131 ["Suggestion currently implemented"] = "Anregung zur Zeit umgesetzt"; 27.132 ["Suggestion currently not implemented"] = "Anregung zur Zeit nicht umgesetzt"; 27.133 ["Suggestion for initiative: '#{name}'"] = "Anregung für Initiative '#{name}'"; 27.134 @@ -177,6 +200,7 @@ 27.135 ["Supporter"] = "Unterstützer"; 27.136 ["That's me!"] = "Das bin ich"; 27.137 ["The drafts do not differ"] = "Die Entwürfe unterscheiden sich nicht"; 27.138 +["Time left"] = "Restzeit"; 27.139 ["Trustee"] = "Bevollmächtigter"; 27.140 ["Unknown author"] = "Unbekannter Autor"; 27.141 ["Upload avatar"] = "Avatar hochladen"; 27.142 @@ -195,12 +219,16 @@ 27.143 ["You are not a member. [more]"] = "Du bist kein Mitglied. [mehr]"; 27.144 ["You are not interested. [more]"] = "Du bist nicht interessiert. [mehr]"; 27.145 ["You didn't saved any member as contact yet."] = "Du hast noch kein Mitglied als Kontakt gespeichert!"; 27.146 +["You have saved this member as contact"] = "Du hast das Mitglied als Kontakt gespeichert"; 27.147 +["You have saved this member as contact."] = "Du hast das Mitglied als Kontakt gespeichert."; 27.148 +["You need to be logged in, to use this system."] = "Du musst eingeloggt sein, um das System zu benutzen"; 27.149 ["Your delegation for this area has been deleted."] = "Deine Delegation für dieses Themengebiet wurde gelöscht"; 27.150 ["Your delegation for this area has been updated."] = "Deine Delegation für dieses Themengebiet wurde geändert"; 27.151 ["Your delegation for this issue has been deleted."] = "Deine Delegation für dieses Thema wurde gelöscht"; 27.152 ["Your delegation for this issue has been updated."] = "Deine Delegation für dieses Thema wurde geändert"; 27.153 ["Your global delegation has been deleted."] = "Deine globale Delegation wurde gelöscht"; 27.154 ["Your global delegation has been updated."] = "Deine globale Delegation würde geändert"; 27.155 +["Your opinion has been deleted"] = "Deine Meinung wurde gelöscht"; 27.156 ["Your opinion has been updated"] = "Deine Meinung wurde aktualisiert"; 27.157 ["Your page has been updated"] = "Deine Seite wurde aktualisiert"; 27.158 ["Your password has been updated successfully"] = "Das Kennwort wurde erfolgreich geändert"; 27.159 @@ -211,6 +239,7 @@ 27.160 ["Your vote is delegated. [more]"] = "Deine Stimme ist delegiert. [mehr]"; 27.161 ["Z-A"] = false; 27.162 ["admission_time"] = false; 27.163 +["blank"] = false; 27.164 ["delete<br /><br />"] = false; 27.165 ["discussion_time"] = false; 27.166 ["email"] = false; 27.167 @@ -221,8 +250,6 @@ 27.168 ["must"] = "muss"; 27.169 ["must not"] = "darf nicht"; 27.170 ["neutral"] = "neutral"; 27.171 -["remove implemented"] = "entferne umgesetzt"; 27.172 -["set implented"] = "setze umgesetzt"; 27.173 ["should"] = "soll"; 27.174 ["should not"] = "soll nicht"; 27.175 ["verification_time"] = false;
28.1 --- a/model/initiative.lua Mon Nov 23 12:00:00 2009 +0100 28.2 +++ b/model/initiative.lua Mon Nov 30 12:00:00 2009 +0100 28.3 @@ -91,6 +91,17 @@ 28.4 ref = 'supporting_members' 28.5 } 28.6 28.7 +Initiative:add_reference{ 28.8 + mode = 'mm', 28.9 + to = "Member", 28.10 + this_key = 'id', 28.11 + that_key = 'id', 28.12 + connected_by_table = 'direct_supporter_snapshot', 28.13 + connected_by_this_key = 'initiative_id', 28.14 + connected_by_that_key = 'member_id', 28.15 + ref = 'supporting_members_snapshot' 28.16 +} 28.17 + 28.18 function Initiative:get_search_selector(search_string) 28.19 return self:new_selector() 28.20 :add_field( {'"highlight"("initiative"."name", ?)', search_string }, "name_highlighted")
29.1 --- a/model/issue.lua Mon Nov 23 12:00:00 2009 +0100 29.2 +++ b/model/issue.lua Mon Nov 30 12:00:00 2009 +0100 29.3 @@ -86,10 +86,21 @@ 29.4 ref = 'members' 29.5 } 29.6 29.7 +Issue:add_reference{ 29.8 + mode = 'mm', 29.9 + to = "Member", 29.10 + this_key = 'id', 29.11 + that_key = 'id', 29.12 + connected_by_table = 'direct_interest_snapshot', 29.13 + connected_by_this_key = 'issue_id', 29.14 + connected_by_that_key = 'member_id', 29.15 + ref = 'interested_members_snapshot' 29.16 +} 29.17 + 29.18 function Issue:get_state_name_for_state(value) 29.19 local state_name_table = { 29.20 new = _"New", 29.21 - accepted = _"Accepted", 29.22 + accepted = _"Discussion", 29.23 frozen = _"Frozen", 29.24 voting = _"Voting", 29.25 finished = _"Finished", 29.26 @@ -107,16 +118,16 @@ 29.27 29.28 function Issue.object_get:state() 29.29 if self.accepted then 29.30 - if self.fully_frozen then 29.31 - return "voting" 29.32 - elseif self.half_frozen then 29.33 - return "frozen" 29.34 - elseif self.closed then 29.35 + if self.closed then 29.36 if self.ranks_available then 29.37 return "finished" 29.38 else 29.39 return "cancelled" 29.40 end 29.41 + elseif self.fully_frozen then 29.42 + return "voting" 29.43 + elseif self.half_frozen then 29.44 + return "frozen" 29.45 else 29.46 return "accepted" 29.47 end
30.1 Binary file static/icons/16/bullet_disk.png has changed
31.1 Binary file static/icons/16/comments.png has changed
32.1 --- a/static/style.css Mon Nov 23 12:00:00 2009 +0100 32.2 +++ b/static/style.css Mon Nov 30 12:00:00 2009 +0100 32.3 @@ -637,20 +637,37 @@ 32.4 border: 1px solid #ccc; 32.5 } 32.6 32.7 -.member_thumb:hover { 32.8 - border: 1px solid #000; 32.9 +.member_thumb a:hover div { 32.10 + background-color: #444; 32.11 + color: #fff; 32.12 +} 32.13 + 32.14 +.member_thumb .flags a:hover { 32.15 + background-color: #444; 32.16 + color: #fff; 32.17 } 32.18 32.19 .member_thumb img { 32.20 margin-right: 0.5em; 32.21 vertical-align: bottom; 32.22 + float: left; 32.23 } 32.24 32.25 .member_thumb div { 32.26 display: inline; 32.27 +} 32.28 + 32.29 +.member_thumb .member_name { 32.30 + display: block; 32.31 + margin-top: 3ex; 32.32 margin-right: 0.5em; 32.33 } 32.34 32.35 +.member_thumb .flags { 32.36 + float: right; 32.37 + font-size: 75%; 32.38 +} 32.39 + 32.40 .draft_content { 32.41 background-color: #eee; 32.42 border: 1px solid #ccc; 32.43 @@ -696,4 +713,5 @@ 32.44 border: 2px solid #faa; 32.45 background-color: #fee; 32.46 padding: 1ex; 32.47 -} 32.48 \ No newline at end of file 32.49 +} 32.50 +