# HG changeset patch
# User Dinu Gherman
# Date 1268085581 -3600
# Node ID 58beb12bc024ba5d58ac4e6c16ee574f06970245
# Parent b2af739019ba0ee6db3b6ecd6ab1fcc19d3598fb# Parent 1ccbefa729eb7ae9e89dffa503fbeea99c4f01d3
merge
diff -r b2af739019ba -r 58beb12bc024 .hgtags
--- a/.hgtags Mon Mar 08 22:58:57 2010 +0100
+++ b/.hgtags Mon Mar 08 22:59:41 2010 +0100
@@ -15,3 +15,4 @@
0929c483458e992ce2dc25fede9d59311154a904 beta10
b195682957dcdd5c3efa0c8e87711a36d1454d75 beta11
4ae09a588103ef66320fcd0ca92001517e0be650 beta12
+53a45356c107a2abc4a7e1424721389f94b5d807 beta13
diff -r b2af739019ba -r 58beb12bc024 app/main/draft/diff.lua
--- a/app/main/draft/diff.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/draft/diff.lua Mon Mar 08 22:59:41 2010 +0100
@@ -47,11 +47,12 @@
else
slot.put('
')
slot.put('' .. _"Old draft revision" .. ' | ' .. _"New draft revision" .. ' |
')
+
local last_state = "unchanged"
local lines = {}
local removed_lines = nil
- output = output .. " "
- output = output:gsub("[^\n\r]+", function(line)
+
+ local function process_line(line)
local state = "unchanged"
local char = line:sub(1,1)
line = line:sub(2)
@@ -60,13 +61,15 @@
state = "-"
elseif char == "+" then
state = "+"
+ elseif char == "!" then
+ state = "eof"
end
if last_state == "unchanged" then
if state == "unchanged" then
lines[#lines+1] = line
- elseif (state == "-") or (state == "+") then
- local text = table.concat(lines, "
")
- slot.put("", text, " | ", text, " |
")
+ elseif (state == "-") or (state == "+") or (state == "eof") then
+ local text = table.concat(lines, "\n")
+ slot.put("", encode.html_newlines(encode.html(text)), " | ", encode.html_newlines(encode.html(text)), " |
")
lines = { line }
end
elseif last_state == "-" then
@@ -75,29 +78,36 @@
elseif state == "+" then
removed_lines = lines
lines = { line }
- elseif state == "unchanged" then
- local text = table.concat(lines,"
")
- slot.put('', text, " | |
")
+ elseif (state == "unchanged") or (state == "eof") then
+ local text = table.concat(lines,"\n")
+ slot.put('', encode.html_newlines(encode.html(text)), " | |
")
lines = { line }
end
elseif last_state == "+" then
if state == "+" then
lines[#lines+1] = line
- elseif (state == "-") or (state == "unchanged") then
+ elseif (state == "-") or (state == "unchanged") or (state == "eof") then
if removed_lines then
- local text = table.concat(lines, "
")
- local removed_text = table.concat(removed_lines, "
")
- slot.put('', removed_text, ' | ', text, " |
")
+ local text = table.concat(lines, "\n")
+ local removed_text = table.concat(removed_lines, "\n")
+ slot.put('', encode.html_newlines(encode.html(removed_text)), ' | ', encode.html_newlines(encode.html(text)), " |
")
else
- local text = table.concat(lines, "
")
- slot.put(' | ', text, " |
")
+ local text = table.concat(lines, "\n")
+ slot.put(' | ', encode.html_newlines(encode.html(text)), " |
")
end
removed_lines = nil
lines = { line }
end
end
last_state = state
+ end
+
+ output = output .. " "
+ output = output:gsub("[^\n\r]+", function(line)
+ process_line(line)
end)
+ process_line("!")
+
slot.put("
")
end
diff -r b2af739019ba -r 58beb12bc024 app/main/index/index.lua
--- a/app/main/index/index.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/index/index.lua Mon Mar 08 22:59:41 2010 +0100
@@ -197,7 +197,9 @@
end
local initiatives_selector = Initiative:new_selector()
+ :join("issue", "_issue_state", "_issue_state.id = initiative.issue_id")
:join("initiator", nil, { "initiator.initiative_id = initiative.id AND initiator.member_id = ? AND initiator.accepted ISNULL", app.session.member.id })
+ :add_where("_issue_state.closed ISNULL AND _issue_state.half_frozen ISNULL")
if initiatives_selector:count() > 0 then
ui.container{
diff -r b2af739019ba -r 58beb12bc024 app/main/initiative/_show.lua
--- a/app/main/initiative/_show.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/initiative/_show.lua Mon Mar 08 22:59:41 2010 +0100
@@ -72,7 +72,7 @@
}
end
-if initiator and initiator.accepted == nil then
+if initiator and initiator.accepted == nil and not initiative.issue.half_frozen and not initiative.issue.closed then
ui.container{
attr = { class = "initiator_invite_info" },
content = function()
diff -r b2af739019ba -r 58beb12bc024 app/main/initiative/_suggestions.lua
--- a/app/main/initiative/_suggestions.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/initiative/_suggestions.lua Mon Mar 08 22:59:41 2010 +0100
@@ -1,6 +1,6 @@
local initiative = param.get("initiative", "table")
-if not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then
+if not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then
ui.link{
content = function()
ui.image{ static = "icons/16/comment_add.png" }
diff -r b2af739019ba -r 58beb12bc024 app/main/issue/show_tab.lua
--- a/app/main/issue/show_tab.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/issue/show_tab.lua Mon Mar 08 22:59:41 2010 +0100
@@ -18,6 +18,7 @@
local voting_requests_selector = issue:get_reference_selector("interested_members_snapshot")
:join("issue", nil, "issue.id = direct_interest_snapshot.issue_id")
:add_where("direct_interest_snapshot.voting_requested = false")
+ :add_where("direct_interest_snapshot.event = issue.latest_snapshot_event")
local delegations_selector = issue:get_reference_selector("delegations")
diff -r b2af739019ba -r 58beb12bc024 app/main/member/list.lua
--- a/app/main/member/list.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/member/list.lua Mon Mar 08 22:59:41 2010 +0100
@@ -2,8 +2,11 @@
util.help("member.list")
+local members_selector = Member:new_selector()
+ :add_where("active")
+
execute.view{
module = "member",
view = "_list",
- params = { members_selector = Member:new_selector() }
+ params = { members_selector = members_selector }
}
diff -r b2af739019ba -r 58beb12bc024 app/main/suggestion/_action/add.lua
--- a/app/main/suggestion/_action/add.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/suggestion/_action/add.lua Mon Mar 08 22:59:41 2010 +0100
@@ -25,8 +25,8 @@
if issue.closed then
slot.put_into("error", _"This issue is already closed.")
return false
-elseif issue.fully_frozen then
- slot.put_into("error", _"Voting for this issue has already begun.")
+elseif issue.half_frozen then
+ slot.put_into("error", _"This issue is already frozen.")
return false
end
diff -r b2af739019ba -r 58beb12bc024 app/main/timeline/index.lua
--- a/app/main/timeline/index.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/app/main/timeline/index.lua Mon Mar 08 22:59:41 2010 +0100
@@ -300,7 +300,7 @@
:add_field("max(timeline.occurrence)", "occurrence")
:add_field("timeline.event", nil, { "grouped" })
:add_field("timeline.issue_id", nil, { "grouped" })
- :add_field("timeline.initiative_id", nil, { "grouped" })
+ :add_field("draft.initiative_id", nil, { "grouped" })
:add_field("max(timeline.draft_id)", "draft_id")
:add_field("timeline.suggestion_id", nil, { "grouped" })
:add_field("COUNT(*)", "count")
diff -r b2af739019ba -r 58beb12bc024 config/default.lua
--- a/config/default.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/config/default.lua Mon Mar 08 22:59:41 2010 +0100
@@ -1,5 +1,5 @@
config.app_name = "LiquidFeedback"
-config.app_version = "beta12.2"
+config.app_version = "beta13"
config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
diff -r b2af739019ba -r 58beb12bc024 locale/translations.de.lua
--- a/locale/translations.de.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/locale/translations.de.lua Mon Mar 08 22:59:41 2010 +0100
@@ -447,7 +447,7 @@
["This member has rejected to become initiator of this initiative"] = "Dieses Mitglied hat die Einladung, Initiator zu werden, abgelehnt";
["This member is already initiator of this initiative"] = "Dieses Mitglied ist bereits Initiator dieser Initiative";
["This member is already invited to become initiator of this initiative"] = "Dieses Mitglied ist bereits eingeladen Initiator dieser Initiative zu werden";
-["This member is participating, the rest of delegation chain is suspended while discussing"] = "Dieses Mitglied partizipiert, Rest der Delegationskette ausgesetzt.";
+["This member is participating, the rest of delegation chain is suspended while discussing"] = "Dieses Mitglied partizipiert, Rest der Delegationskette während der Diskussion ausgesetzt.";
["This name is already taken, please choose another one!"] = "Dieser Name ist bereits vergeben, bitte wähle einen anderen!";
["This name is really too short!"] = "Dieser Name ist wirklich zu kurz!";
["This name is too short!"] = "Dieser Name ist zu kurz!";
diff -r b2af739019ba -r 58beb12bc024 locale/translations.eo.lua
--- a/locale/translations.eo.lua Mon Mar 08 22:58:57 2010 +0100
+++ b/locale/translations.eo.lua Mon Mar 08 22:59:41 2010 +0100
@@ -23,7 +23,7 @@
["Accordion (first expanded)"] = "Akordiono (unua apertaj)";
["Accordion (none expanded)"] = "Akordiono (neniu apertaj)";
["Active?"] = "Ĉu aktiva?";
-["Add alternative initiative to issue"] = "Aldoni alternativan iniciaton al la temo";
+["Add alternative initiative to issue"] = "Aldoni alternativan iniciaton al la temo";
["Add my interest"] = "Anonci mian intereson";
["Add new suggestion"] = "Aldoni novan sugeston";
["Add to my contacts"] = "Aldoni al miaj kontaktoj";