summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs/_diffs.html.haml
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-01 13:52:08 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-01 13:52:08 +0200
commit0d967bce574c3750429bf2aed7f8c4ddc6ce1971 (patch)
tree56f8ae8c544c0e21bd472cd631bf705c3f506fcb /app/views/projects/diffs/_diffs.html.haml
parent8e05ee36f72813aa46d76594c17f3f8cdb0a12ed (diff)
downloadgitlab-ce-0d967bce574c3750429bf2aed7f8c4ddc6ce1971.tar.gz
Show additions/deletions stats on merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/diffs/_diffs.html.haml')
-rw-r--r--app/views/projects/diffs/_diffs.html.haml9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml
index c5acafa2630..ac2461b3b24 100644
--- a/app/views/projects/diffs/_diffs.html.haml
+++ b/app/views/projects/diffs/_diffs.html.haml
@@ -1,14 +1,17 @@
- if params[:view] == 'parallel'
- fluid_layout true
+- diff_files = safe_diff_files(diffs)
+
.gray-content-block.second-block
.inline-parallel-buttons
.btn-group
= inline_diff_btn
= parallel_diff_btn
- = render 'projects/diffs/stats', diffs: diffs
-
-- diff_files = safe_diff_files(diffs)
+ - additions = diff_files.sum(&:added_lines)
+ - deletions = diff_files.sum(&:removed_lines)
+ = render 'projects/diffs/stats', diff_files: diff_files,
+ additions: additions, deletions: deletions
- if diff_files.count < diffs.size
= render 'projects/diffs/warning', diffs: diffs, shown_files_count: diff_files.count