summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/projects/commits/_commit_list.html.haml11
-rw-r--r--app/views/projects/compare/show.html.haml14
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml12
3 files changed, 13 insertions, 24 deletions
diff --git a/app/views/projects/commits/_commit_list.html.haml b/app/views/projects/commits/_commit_list.html.haml
new file mode 100644
index 00000000000..2ee7d73bd20
--- /dev/null
+++ b/app/views/projects/commits/_commit_list.html.haml
@@ -0,0 +1,11 @@
+%div.panel.panel-default
+ .panel-heading
+ Commits (#{@commits.count})
+ - if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
+ %ul.well-list
+ - Commit.decorate(@commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE)).each do |commit|
+ = render "projects/commits/inline_commit", commit: commit, project: @project
+ %li.warning-row.unstyled
+ other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues.
+ - else
+ %ul.well-list= render Commit.decorate(@commits), project: @project
diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml
index 45269e662cd..214b5bd337b 100644
--- a/app/views/projects/compare/show.html.haml
+++ b/app/views/projects/compare/show.html.haml
@@ -6,20 +6,8 @@
= render "form"
- if @commits.present?
- %div.panel.panel-default
- .panel-heading
- Commits (#{@commits.count})
- - if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
- %ul.well-list
- - Commit.decorate(@commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE)).each do |commit|
- = render "projects/commits/inline_commit", commit: commit, project: @project
- %li.warning-row.unstyled
- other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues.
- - else
- %ul.well-list= render Commit.decorate(@commits), project: @project
-
+ = render "projects/commits/commit_list"
= render "projects/diffs/diffs", diffs: @diffs, project: @project
-
- else
.light-well
.center
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
index 64fc0160926..84bf81441b1 100644
--- a/app/views/projects/merge_requests/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -62,17 +62,7 @@
= f.submit 'Submit merge request', class: "btn btn-create"
.mr-compare
- %div.panel.panel-default
- .panel-heading
- Commits (#{@commits.count})
- - if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
- %ul.well-list
- - Commit.decorate(@commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE)).each do |commit|
- = render "projects/commits/inline_commit", commit: commit, project: @project
- %li.warning-row.unstyled
- other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues.
- - else
- %ul.well-list= render Commit.decorate(@commits), project: @project
+ = render "projects/commits/commit_list"
%h4 Changes
- if @diffs.present?