diff options
author | Jack Weeden <jack@ajack.org> | 2013-06-26 15:32:34 +0100 |
---|---|---|
committer | Jack Weeden <jack@ajack.org> | 2013-07-01 10:48:02 +0100 |
commit | 20b2a0b235d01a63cb0cf47b6329b557242a3981 (patch) | |
tree | 53d725410ba2b5207447340c991d5731fd6ef2cc /app/helpers/notes_helper.rb | |
parent | b62c9e5991dae0e4a8ae8e947b438cdd4e753c79 (diff) | |
download | gitlab-ce-20b2a0b235d01a63cb0cf47b6329b557242a3981.tar.gz |
Ability to edit comments
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index fbd0f01e5d4..a3ec4cca59d 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -28,4 +28,11 @@ module NotesHelper def loading_new_notes? params[:loading_new].present? end + + def note_timestamp(note) + # Shows the created at time and the updated at time if different + ts = "#{time_ago_in_words(note.created_at)} ago" + ts << content_tag(:small, " (Edited #{time_ago_in_words(note.updated_at)} ago)") if note.updated_at != note.created_at + ts.html_safe + end end |