From a2d188f688759b3889de576bb8019e189bcac902 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 22 Dec 2014 20:36:15 +0200 Subject: Render MR diff full size of screen Signed-off-by: Dmitriy Zaporozhets --- app/helpers/notes_helper.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/helpers/notes_helper.rb') diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 901052edec6..6d2244b8714 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -52,8 +52,11 @@ module NotesHelper discussion_id: discussion_id } - button_tag '', class: 'btn add-diff-note js-add-diff-note-button', - data: data, title: 'Add a comment to this line' + button_tag(class: 'btn add-diff-note js-add-diff-note-button', + data: data, + title: 'Add a comment to this line') do + content_tag :i, nil, class: 'fa fa-comment-o' + end end def link_to_reply_diff(note) -- cgit v1.2.1 From 3e17d15661a8c6bae2dc92fe09ed9e75a1f7a1a7 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 18 Jan 2015 19:39:29 -0800 Subject: Improve edited ago helpers --- app/helpers/notes_helper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/helpers/notes_helper.rb') diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 6d2244b8714..8f493f5d331 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -20,8 +20,10 @@ module NotesHelper 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 ' ' + haml_concat time_ago_with_tooltip(note.updated_at, 'bottom', 'note_edited_ago') end end end -- cgit v1.2.1 From 4e7a4cd95696746bcab78a4f9ec071dd4089397a Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 28 Jan 2015 03:32:48 -0500 Subject: Use `icon` helper method in helper modules --- app/helpers/notes_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/helpers/notes_helper.rb') diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 8f493f5d331..d41d5617396 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -22,7 +22,7 @@ module NotesHelper ts << capture_haml do haml_tag :span do haml_concat '·' - haml_concat ' ' + haml_concat icon('edit', title: 'edited') haml_concat time_ago_with_tooltip(note.updated_at, 'bottom', 'note_edited_ago') end end @@ -57,7 +57,7 @@ module NotesHelper button_tag(class: 'btn add-diff-note js-add-diff-note-button', data: data, title: 'Add a comment to this line') do - content_tag :i, nil, class: 'fa fa-comment-o' + icon('comment-o') end end @@ -74,7 +74,7 @@ module NotesHelper button_tag class: 'btn reply-btn js-discussion-reply-button', data: data, title: 'Add a reply' do - link_text = content_tag(:i, nil, class: 'fa fa-comment') + link_text = icon('comment') link_text << ' Reply' end end -- cgit v1.2.1 From 7d48205c1a472c07969e4dc43965fa3090b84376 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 2 Feb 2015 21:34:16 -0800 Subject: Rubocop: comment indentation --- app/helpers/notes_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers/notes_helper.rb') diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index d41d5617396..8edcb8e6a80 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -1,5 +1,5 @@ module NotesHelper - # Helps to distinguish e.g. commit notes in mr notes list + # Helps to distinguish e.g. commit notes in mr notes list def note_for_main_target?(note) (@noteable.class.name == note.noteable_type && !note.for_diff_line?) end -- cgit v1.2.1 From 76aad9b76ed756ca9ba2cbcdb399c815e542b3ae Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Sat, 24 Jan 2015 11:02:58 -0700 Subject: Upgrade to Rails 4.1.9 Make the following changes to deal with new behavior in Rails 4.1.2: * Use nested resources to avoid slashes in arguments to path helpers. --- app/helpers/notes_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/helpers/notes_helper.rb') diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 8edcb8e6a80..92ecb2abe4d 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -11,7 +11,11 @@ module NotesHelper def link_to_commit_diff_line_note(note) if note.for_commit_diff_line? - link_to "#{note.diff_file_name}:L#{note.diff_new_line}", project_commit_path(@project, note.noteable, anchor: note.line_code) + link_to( + "#{note.diff_file_name}:L#{note.diff_new_line}", + namespace_project_commit_path(@project.namespace, @project, + note.noteable, anchor: note.line_code) + ) end end -- cgit v1.2.1