liquid_feedback_frontend
changeset 45:58beb12bc024
merge
author | Dinu Gherman |
---|---|
date | Mon Mar 08 22:59:41 2010 +0100 (2010-03-08) |
parents | b2af739019ba 1ccbefa729eb |
children | aaba4d28dd53 |
files | locale/translations.eo.lua |
line diff
1.1 --- a/.hgtags Mon Mar 08 22:58:57 2010 +0100 1.2 +++ b/.hgtags Mon Mar 08 22:59:41 2010 +0100 1.3 @@ -15,3 +15,4 @@ 1.4 0929c483458e992ce2dc25fede9d59311154a904 beta10 1.5 b195682957dcdd5c3efa0c8e87711a36d1454d75 beta11 1.6 4ae09a588103ef66320fcd0ca92001517e0be650 beta12 1.7 +53a45356c107a2abc4a7e1424721389f94b5d807 beta13
2.1 --- a/app/main/draft/diff.lua Mon Mar 08 22:58:57 2010 +0100 2.2 +++ b/app/main/draft/diff.lua Mon Mar 08 22:59:41 2010 +0100 2.3 @@ -47,11 +47,12 @@ 2.4 else 2.5 slot.put('<table class="diff">') 2.6 slot.put('<tr><th width="50%">' .. _"Old draft revision" .. '</th><th width="50%">' .. _"New draft revision" .. '</th></tr>') 2.7 + 2.8 local last_state = "unchanged" 2.9 local lines = {} 2.10 local removed_lines = nil 2.11 - output = output .. " " 2.12 - output = output:gsub("[^\n\r]+", function(line) 2.13 + 2.14 + local function process_line(line) 2.15 local state = "unchanged" 2.16 local char = line:sub(1,1) 2.17 line = line:sub(2) 2.18 @@ -60,13 +61,15 @@ 2.19 state = "-" 2.20 elseif char == "+" then 2.21 state = "+" 2.22 + elseif char == "!" then 2.23 + state = "eof" 2.24 end 2.25 if last_state == "unchanged" then 2.26 if state == "unchanged" then 2.27 lines[#lines+1] = line 2.28 - elseif (state == "-") or (state == "+") then 2.29 - local text = table.concat(lines, "<br />") 2.30 - slot.put("<tr><td>", text, "</td><td>", text, "</td></tr>") 2.31 + elseif (state == "-") or (state == "+") or (state == "eof") then 2.32 + local text = table.concat(lines, "\n") 2.33 + slot.put("<tr><td>", encode.html_newlines(encode.html(text)), "</td><td>", encode.html_newlines(encode.html(text)), "</td></tr>") 2.34 lines = { line } 2.35 end 2.36 elseif last_state == "-" then 2.37 @@ -75,29 +78,36 @@ 2.38 elseif state == "+" then 2.39 removed_lines = lines 2.40 lines = { line } 2.41 - elseif state == "unchanged" then 2.42 - local text = table.concat(lines,"<br />") 2.43 - slot.put('<tr><td class="removed">', text, "</td><td></td></tr>") 2.44 + elseif (state == "unchanged") or (state == "eof") then 2.45 + local text = table.concat(lines,"\n") 2.46 + slot.put('<tr><td class="removed">', encode.html_newlines(encode.html(text)), "</td><td></td></tr>") 2.47 lines = { line } 2.48 end 2.49 elseif last_state == "+" then 2.50 if state == "+" then 2.51 lines[#lines+1] = line 2.52 - elseif (state == "-") or (state == "unchanged") then 2.53 + elseif (state == "-") or (state == "unchanged") or (state == "eof") then 2.54 if removed_lines then 2.55 - local text = table.concat(lines, "<br />") 2.56 - local removed_text = table.concat(removed_lines, "<br />") 2.57 - slot.put('<tr><td class="removed">', removed_text, '</td><td class="added">', text, "</td></tr>") 2.58 + local text = table.concat(lines, "\n") 2.59 + local removed_text = table.concat(removed_lines, "\n") 2.60 + slot.put('<tr><td class="removed">', encode.html_newlines(encode.html(removed_text)), '</td><td class="added">', encode.html_newlines(encode.html(text)), "</td></tr>") 2.61 else 2.62 - local text = table.concat(lines, "<br />") 2.63 - slot.put('<tr><td></td><td class="added">', text, "</td></tr>") 2.64 + local text = table.concat(lines, "\n") 2.65 + slot.put('<tr><td></td><td class="added">', encode.html_newlines(encode.html(text)), "</td></tr>") 2.66 end 2.67 removed_lines = nil 2.68 lines = { line } 2.69 end 2.70 end 2.71 last_state = state 2.72 + end 2.73 + 2.74 + output = output .. " " 2.75 + output = output:gsub("[^\n\r]+", function(line) 2.76 + process_line(line) 2.77 end) 2.78 + process_line("!") 2.79 + 2.80 slot.put("</table>") 2.81 end 2.82
3.1 --- a/app/main/index/index.lua Mon Mar 08 22:58:57 2010 +0100 3.2 +++ b/app/main/index/index.lua Mon Mar 08 22:59:41 2010 +0100 3.3 @@ -197,7 +197,9 @@ 3.4 end 3.5 3.6 local initiatives_selector = Initiative:new_selector() 3.7 + :join("issue", "_issue_state", "_issue_state.id = initiative.issue_id") 3.8 :join("initiator", nil, { "initiator.initiative_id = initiative.id AND initiator.member_id = ? AND initiator.accepted ISNULL", app.session.member.id }) 3.9 + :add_where("_issue_state.closed ISNULL AND _issue_state.half_frozen ISNULL") 3.10 3.11 if initiatives_selector:count() > 0 then 3.12 ui.container{
4.1 --- a/app/main/initiative/_show.lua Mon Mar 08 22:58:57 2010 +0100 4.2 +++ b/app/main/initiative/_show.lua Mon Mar 08 22:59:41 2010 +0100 4.3 @@ -72,7 +72,7 @@ 4.4 } 4.5 end 4.6 4.7 -if initiator and initiator.accepted == nil then 4.8 +if initiator and initiator.accepted == nil and not initiative.issue.half_frozen and not initiative.issue.closed then 4.9 ui.container{ 4.10 attr = { class = "initiator_invite_info" }, 4.11 content = function()
5.1 --- a/app/main/initiative/_suggestions.lua Mon Mar 08 22:58:57 2010 +0100 5.2 +++ b/app/main/initiative/_suggestions.lua Mon Mar 08 22:59:41 2010 +0100 5.3 @@ -1,6 +1,6 @@ 5.4 local initiative = param.get("initiative", "table") 5.5 5.6 -if not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then 5.7 +if not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then 5.8 ui.link{ 5.9 content = function() 5.10 ui.image{ static = "icons/16/comment_add.png" }
6.1 --- a/app/main/issue/show_tab.lua Mon Mar 08 22:58:57 2010 +0100 6.2 +++ b/app/main/issue/show_tab.lua Mon Mar 08 22:59:41 2010 +0100 6.3 @@ -18,6 +18,7 @@ 6.4 local voting_requests_selector = issue:get_reference_selector("interested_members_snapshot") 6.5 :join("issue", nil, "issue.id = direct_interest_snapshot.issue_id") 6.6 :add_where("direct_interest_snapshot.voting_requested = false") 6.7 + :add_where("direct_interest_snapshot.event = issue.latest_snapshot_event") 6.8 6.9 local delegations_selector = issue:get_reference_selector("delegations") 6.10
7.1 --- a/app/main/member/list.lua Mon Mar 08 22:58:57 2010 +0100 7.2 +++ b/app/main/member/list.lua Mon Mar 08 22:59:41 2010 +0100 7.3 @@ -2,8 +2,11 @@ 7.4 7.5 util.help("member.list") 7.6 7.7 +local members_selector = Member:new_selector() 7.8 + :add_where("active") 7.9 + 7.10 execute.view{ 7.11 module = "member", 7.12 view = "_list", 7.13 - params = { members_selector = Member:new_selector() } 7.14 + params = { members_selector = members_selector } 7.15 }
8.1 --- a/app/main/suggestion/_action/add.lua Mon Mar 08 22:58:57 2010 +0100 8.2 +++ b/app/main/suggestion/_action/add.lua Mon Mar 08 22:59:41 2010 +0100 8.3 @@ -25,8 +25,8 @@ 8.4 if issue.closed then 8.5 slot.put_into("error", _"This issue is already closed.") 8.6 return false 8.7 -elseif issue.fully_frozen then 8.8 - slot.put_into("error", _"Voting for this issue has already begun.") 8.9 +elseif issue.half_frozen then 8.10 + slot.put_into("error", _"This issue is already frozen.") 8.11 return false 8.12 end 8.13
9.1 --- a/app/main/timeline/index.lua Mon Mar 08 22:58:57 2010 +0100 9.2 +++ b/app/main/timeline/index.lua Mon Mar 08 22:59:41 2010 +0100 9.3 @@ -300,7 +300,7 @@ 9.4 :add_field("max(timeline.occurrence)", "occurrence") 9.5 :add_field("timeline.event", nil, { "grouped" }) 9.6 :add_field("timeline.issue_id", nil, { "grouped" }) 9.7 - :add_field("timeline.initiative_id", nil, { "grouped" }) 9.8 + :add_field("draft.initiative_id", nil, { "grouped" }) 9.9 :add_field("max(timeline.draft_id)", "draft_id") 9.10 :add_field("timeline.suggestion_id", nil, { "grouped" }) 9.11 :add_field("COUNT(*)", "count")
10.1 --- a/config/default.lua Mon Mar 08 22:58:57 2010 +0100 10.2 +++ b/config/default.lua Mon Mar 08 22:59:41 2010 +0100 10.3 @@ -1,5 +1,5 @@ 10.4 config.app_name = "LiquidFeedback" 10.5 -config.app_version = "beta12.2" 10.6 +config.app_version = "beta13" 10.7 10.8 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)" 10.9
11.1 --- a/locale/translations.de.lua Mon Mar 08 22:58:57 2010 +0100 11.2 +++ b/locale/translations.de.lua Mon Mar 08 22:59:41 2010 +0100 11.3 @@ -447,7 +447,7 @@ 11.4 ["This member has rejected to become initiator of this initiative"] = "Dieses Mitglied hat die Einladung, Initiator zu werden, abgelehnt"; 11.5 ["This member is already initiator of this initiative"] = "Dieses Mitglied ist bereits Initiator dieser Initiative"; 11.6 ["This member is already invited to become initiator of this initiative"] = "Dieses Mitglied ist bereits eingeladen Initiator dieser Initiative zu werden"; 11.7 -["This member is participating, the rest of delegation chain is suspended while discussing"] = "Dieses Mitglied partizipiert, Rest der Delegationskette ausgesetzt."; 11.8 +["This member is participating, the rest of delegation chain is suspended while discussing"] = "Dieses Mitglied partizipiert, Rest der Delegationskette während der Diskussion ausgesetzt."; 11.9 ["This name is already taken, please choose another one!"] = "Dieser Name ist bereits vergeben, bitte wähle einen anderen!"; 11.10 ["This name is really too short!"] = "Dieser Name ist wirklich zu kurz!"; 11.11 ["This name is too short!"] = "Dieser Name ist zu kurz!";
12.1 --- a/locale/translations.eo.lua Mon Mar 08 22:58:57 2010 +0100 12.2 +++ b/locale/translations.eo.lua Mon Mar 08 22:59:41 2010 +0100 12.3 @@ -23,7 +23,7 @@ 12.4 ["Accordion (first expanded)"] = "Akordiono (unua apertaj)"; 12.5 ["Accordion (none expanded)"] = "Akordiono (neniu apertaj)"; 12.6 ["Active?"] = "Ĉu aktiva?"; 12.7 -["Add alternative initiative to issue"] = "Aldoni alternativan iniciaton al la temo"; 12.8 +["Add alternative initiative to issue"] = "Aldoni alternativan iniciaton al la temo"; 12.9 ["Add my interest"] = "Anonci mian intereson"; 12.10 ["Add new suggestion"] = "Aldoni novan sugeston"; 12.11 ["Add to my contacts"] = "Aldoni al miaj kontaktoj";