Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
301d7a5c1b0a
Commit
3e17d156
authored
Jan 18, 2015
by
Dmitriy Zaporozhets
Browse files
Improve edited ago helpers
parent
6b2bd5706a08
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/helpers/issues_helper.rb
View file @
301d7a5c
...
...
@@ -67,8 +67,10 @@ def issue_timestamp(issue)
ts
=
"
#{
time_ago_with_tooltip
(
issue
.
created_at
,
'bottom'
,
'note_created_ago'
)
}
"
if
issue
.
updated_at
!=
issue
.
created_at
ts
<<
capture_haml
do
haml_tag
:small
do
haml_concat
" (Edited
#{
time_ago_with_tooltip
(
issue
.
updated_at
,
'bottom'
,
'issue_edited_ago'
)
}
)"
haml_tag
:span
do
haml_concat
'·'
haml_concat
'<i class="fa fa-edit" title="edited"></i> '
haml_concat
time_ago_with_tooltip
(
issue
.
updated_at
,
'bottom'
,
'issue_edited_ago'
)
end
end
end
...
...
app/helpers/notes_helper.rb
View file @
301d7a5c
...
...
@@ -20,8 +20,10 @@ def note_timestamp(note)
ts
=
"
#{
time_ago_with_tooltip
(
note
.
created_at
,
'bottom'
,
'note_created_ago'
)
}
"
if
note
.
updated_at
!=
note
.
created_at
ts
<<
capture_haml
do
haml_tag
:small
do
haml_concat
" (Edited
#{
time_ago_with_tooltip
(
note
.
updated_at
,
'bottom'
,
'note_edited_ago'
)
}
)"
haml_tag
:span
do
haml_concat
'·'
haml_concat
'<i class="fa fa-edit" title="edited"></i> '
haml_concat
time_ago_with_tooltip
(
note
.
updated_at
,
'bottom'
,
'note_edited_ago'
)
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment