From a3dbd990682f5f39d9c3e58858faf85b9b0a6179 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Fri, 14 Sep 2012 17:02:09 +0200 Subject: [PATCH] Extract 'notes/per_line_note_link' partial --- app/views/commits/_text_file.html.haml | 2 +- app/views/notes/_per_line_note_link.html.haml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 app/views/notes/_per_line_note_link.html.haml diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml index 7626a015bfc..22d2b9ed62c 100644 --- a/app/views/commits/_text_file.html.haml +++ b/app/views/commits/_text_file.html.haml @@ -13,7 +13,7 @@ %td.old_line = link_to raw(type == "new" ? " " : line_old), "##{line_code}", id: line_code - if @comments_allowed - = link_to "", "#", class: "line_note_link", data: { line_code: line_code }, title: "Add note for this line" + = render "notes/per_line_note_link", line_code: line_code %td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", id: line_code %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line}  " diff --git a/app/views/notes/_per_line_note_link.html.haml b/app/views/notes/_per_line_note_link.html.haml new file mode 100644 index 00000000000..72b59a596a3 --- /dev/null +++ b/app/views/notes/_per_line_note_link.html.haml @@ -0,0 +1 @@ += link_to "", "#", class: "line_note_link", data: { line_code: line_code }, title: "Add note for this line"