gitlab-org--gitlab-foss/app/views/projects/compare/show.html.haml

47 lines
1.6 KiB
Plaintext
Raw Normal View History

= render "projects/commits/head"
2012-02-06 20:32:04 +00:00
%h3.page-title
2012-02-06 20:32:04 +00:00
Compare View
= render "form"
2012-02-06 20:32:04 +00:00
- if @commits.present?
%div.ui-box
2013-07-13 17:36:21 +00:00
.title
2013-01-08 10:23:33 +00:00
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
2012-02-06 20:32:04 +00:00
2014-03-26 12:51:28 +00:00
%h4 Changes
- if @diffs.present?
= render "projects/commits/diffs", diffs: @diffs, project: @project
- elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
.bs-callout.bs-callout-danger
%h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
2014-03-26 12:51:28 +00:00
%p To preserve performance the line changes are not shown.
- elsif @timeout
.bs-callout.bs-callout-danger
2014-03-26 12:51:28 +00:00
%h4 Number of changed files for this comparison is extremely large.
%p Use command line to browse through changes for this comparison.
- else
.light-well
%center
%h4
There isn't anything to compare.
%p.slead
- if params[:to] == params[:from]
You'll need to use different branch names to get a valid comparison.
- else
%span.label-branch #{params[:from]}
and
%span.label-branch #{params[:to]}
are the same.