Note events use "opened" not "open" as the status
This commit is contained in:
parent
e7dbab2b82
commit
6f8966e7c1
3 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
|
||||
<div class="details" data-coordinates="<%= @note.lat %>,<%= @note.lon %>" data-status="<%= @note.status %>">
|
||||
<%= note_event("open", @note.created_at, @note.author) %>
|
||||
<%= note_event("opened", @note.created_at, @note.author) %>
|
||||
<% if @note.status == "closed" %>
|
||||
<br />
|
||||
<%= note_event(@note.status, @note.closed_at, @note_comments.last.author) %>
|
||||
|
|
|
@ -288,8 +288,8 @@ en:
|
|||
open_title: "Unresolved note #%{note_name}"
|
||||
closed_title: "Resolved note #%{note_name}"
|
||||
hidden_title: "Hidden note #%{note_name}"
|
||||
open_by: "Created by %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
|
||||
open_by_anonymous: "Created by anonymous <abbr title='%{exact_time}'>%{when}</abbr>"
|
||||
opened_by: "Created by %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
|
||||
opened_by_anonymous: "Created by anonymous <abbr title='%{exact_time}'>%{when}</abbr>"
|
||||
commented_by: "Comment from %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
|
||||
commented_by_anonymous: "Comment from anonymous <abbr title='%{exact_time}'>%{when}</abbr>"
|
||||
closed_by: "Resolved by %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
|
||||
|
|
|
@ -8,7 +8,7 @@ class NoteHelperTest < ActionView::TestCase
|
|||
date = Time.new(2014, 3, 5, 21, 37, 45, "+00:00")
|
||||
user = create(:user)
|
||||
|
||||
assert_match %r{^Created by anonymous <abbr title='Wed, 05 Mar 2014 21:37:45 \+0000'><span title=" 5 March 2014 at 21:37">.* ago</span></abbr>$}, note_event("open", date, nil)
|
||||
assert_match %r{^Created by anonymous <abbr title='Wed, 05 Mar 2014 21:37:45 \+0000'><span title=" 5 March 2014 at 21:37">.* ago</span></abbr>$}, note_event("opened", date, nil)
|
||||
assert_match %r{^Resolved by <a href="/user/#{ERB::Util.u(user.display_name)}">#{user.display_name}</a> <abbr title='Wed, 05 Mar 2014 21:37:45 \+0000'><span title=" 5 March 2014 at 21:37">.* ago</span></abbr>$}, note_event("closed", date, user)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue