diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-01 13:33:36 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-01 13:33:36 +0300 |
commit | 2679ec40667958aa01c8480978b13a5727cac231 (patch) | |
tree | c139ea7f3723c7f19de4b2bb9ff4cb1fb9133a1c /app/views/projects/blob | |
parent | 02afa6793cca042f8563b0e26472606c743d76f5 (diff) | |
parent | da8e0f86595299740a344309cb5963854b61c4a6 (diff) |
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into git-raw-workhorse
Diffstat (limited to 'app/views/projects/blob')
-rw-r--r-- | app/views/projects/blob/_text.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/blob/diff.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/blob/preview.html.haml | 14 |
3 files changed, 14 insertions, 13 deletions
diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml index 4429c395aee..906e5ccb360 100644 --- a/app/views/projects/blob/_text.html.haml +++ b/app/views/projects/blob/_text.html.haml @@ -2,8 +2,8 @@ .file-content.wiki = render_markup(blob.name, blob.data) - else - .file-content.code - - unless blob.empty? - = render 'shared/file_highlight', blob: blob - - else + - unless blob.empty? + = render 'shared/file_highlight', blob: blob + - else + .file-content.code .nothing-here-block Empty file diff --git a/app/views/projects/blob/diff.html.haml b/app/views/projects/blob/diff.html.haml index f3b01ff3288..abcfca4cd11 100644 --- a/app/views/projects/blob/diff.html.haml +++ b/app/views/projects/blob/diff.html.haml @@ -10,8 +10,9 @@ %tr.line_holder %td.old_line.diff-line-num{data: {linenumber: line_old}} = link_to raw(line_old), "#" - %td.new_line= link_to raw(line_new) , "#" - %td.line_content.noteable_line= ' ' * @form.indent + line + %td.new_line.diff-line-num + = link_to raw(line_new) , "#" + %td.line_content.noteable_line==#{' ' * @form.indent}#{line} - if @form.unfold? && @form.bottom? && @form.to < @blob.loc %tr.line_holder{ id: @form.to } diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml index e7c3460ad78..541dc96c45f 100644 --- a/app/views/projects/blob/preview.html.haml +++ b/app/views/projects/blob/preview.html.haml @@ -8,18 +8,18 @@ .file-content.wiki = raw render_markup(@blob.name, @content) - else - .file-content.code + .file-content.code.js-syntax-highlight - unless @diff_lines.empty? %table.text-file - @diff_lines.each do |line| %tr.line_holder{ class: "#{line.type}" } - if line.type == "match" - %td.old_line= "..." - %td.new_line= "..." - %td.line_content.matched= line.text + %td.old_line.diff-line-num= "..." + %td.new_line.diff-line-num= "..." + %td.line_content.match= line.text - else - %td.old_line - %td.new_line - %td.line_content{class: "#{line.type}"}= raw diff_line_content(line.text) + %td.old_line.diff-line-num + %td.new_line.diff-line-num + %td.line_content{class: "#{line.type}"}= diff_line_content(line.text) - else .nothing-here-block No changes. |