# HG changeset patch # User bsw # Date 1345417580 -7200 # Node ID fe39c1fb541b825eb1f7886c18d6a84a3adc4699 # Parent ea3d3757ddc34715a29c871694c30eb6ab9573e5 Do not save voting comment changed timestamp if issue is still in voting diff -r ea3d3757ddc3 -r fe39c1fb541b app/main/vote/_action/update.lua --- a/app/main/vote/_action/update.lua Mon Aug 20 01:00:09 2012 +0200 +++ b/app/main/vote/_action/update.lua Mon Aug 20 01:06:20 2012 +0200 @@ -73,12 +73,16 @@ if #comment > 0 then direct_voter.formatting_engine = formatting_engine direct_voter.comment = comment - direct_voter.comment_changed = 'now' + if issue.closed then + direct_voter.comment_changed = 'now' + end direct_voter:render_content(true) else direct_voter.formatting_engine = null direct_voter.comment = null - direct_voter.comment_changed = 'now' + if issue.closed then + direct_voter.comment_changed = 'now' + end end end direct_voter:save() diff -r ea3d3757ddc3 -r fe39c1fb541b app/main/vote/list.lua --- a/app/main/vote/list.lua Mon Aug 20 01:00:09 2012 +0200 +++ b/app/main/vote/list.lua Mon Aug 20 01:06:20 2012 +0200 @@ -47,7 +47,7 @@ encode.html(tostring(issue.id))) } ) - ui.title(str) + ui.raw_title(str) else member = app.session.member @@ -435,7 +435,14 @@ slot.put(rendered_comment) end if (readonly or direct_voter.comment) and not preview then - ui.heading{ level = "2", content = _("Voting comment (last updated: #{timestamp})", { timestamp = format.timestamp(direct_voter.comment_changed) }) } + local text + if direct_voter.comment_changed then + text = _("Voting comment (last updated: #{timestamp})", { timestamp = format.timestamp(direct_voter.comment_changed) }) + else + text = _"Voting comment" + end + ui.heading{ level = "2", content = text } + if direct_voter.comment then local rendered_comment = direct_voter:get_content('html') ui.container{ attr = { class = "member_statement" }, content = function()