2016-09-01 10:02:53 -04:00
|
|
|
- if @merge_request_diffs.size > 1
|
2016-09-01 08:23:39 -04:00
|
|
|
.mr-version-controls
|
2016-09-14 07:55:07 -04:00
|
|
|
%div.mr-version-menus-container.content-block
|
|
|
|
Changes between
|
|
|
|
%span.dropdown.inline.mr-version-dropdown
|
|
|
|
%a.dropdown-toggle.btn.btn-default{ data: {toggle: :dropdown} }
|
|
|
|
%span
|
|
|
|
- if @merge_request_diff.latest?
|
|
|
|
latest version
|
2016-09-01 10:02:53 -04:00
|
|
|
- else
|
2016-09-14 07:55:07 -04:00
|
|
|
version #{version_index(@merge_request_diff)}
|
2016-09-01 10:02:53 -04:00
|
|
|
%span.caret
|
2016-09-21 18:36:16 -04:00
|
|
|
.dropdown-menu.dropdown-select.dropdown-menu-selectable
|
2016-09-14 07:55:07 -04:00
|
|
|
.dropdown-title
|
2016-09-21 18:36:16 -04:00
|
|
|
%span Version:
|
|
|
|
%button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
|
2016-09-21 08:02:10 -04:00
|
|
|
= icon('times', class: 'dropdown-menu-close-icon')
|
2016-09-21 18:36:16 -04:00
|
|
|
.dropdown-content
|
|
|
|
%ul
|
|
|
|
- @merge_request_diffs.each do |merge_request_diff|
|
|
|
|
%li
|
|
|
|
= link_to merge_request_version_path(@project, @merge_request, merge_request_diff), class: ('is-active' if merge_request_diff == @merge_request_diff) do
|
|
|
|
%strong
|
|
|
|
- if merge_request_diff.latest?
|
|
|
|
latest version
|
|
|
|
- else
|
|
|
|
version #{version_index(merge_request_diff)}
|
|
|
|
.monospace #{short_sha(merge_request_diff.head_commit_sha)}
|
|
|
|
%small
|
|
|
|
#{number_with_delimiter(merge_request_diff.commits.count)} #{'commit'.pluralize(merge_request_diff.commits.count)},
|
|
|
|
= time_ago_with_tooltip(merge_request_diff.created_at)
|
2016-09-14 07:55:07 -04:00
|
|
|
|
|
|
|
- if @merge_request_diff.base_commit_sha
|
|
|
|
and
|
|
|
|
%span.dropdown.inline.mr-version-compare-dropdown
|
|
|
|
%a.btn.btn-default.dropdown-toggle{ data: {toggle: :dropdown} }
|
|
|
|
%span
|
|
|
|
- if @start_sha
|
|
|
|
version #{version_index(@start_version)}
|
|
|
|
- else
|
|
|
|
#{@merge_request.target_branch}
|
|
|
|
%span.caret
|
2016-09-21 18:36:16 -04:00
|
|
|
.dropdown-menu.dropdown-select.dropdown-menu-selectable
|
2016-09-14 07:55:07 -04:00
|
|
|
.dropdown-title
|
2016-09-21 18:36:16 -04:00
|
|
|
%span Compared with:
|
|
|
|
%button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
|
2016-09-21 08:02:10 -04:00
|
|
|
= icon('times', class: 'dropdown-menu-close-icon')
|
2016-09-21 18:36:16 -04:00
|
|
|
.dropdown-content
|
|
|
|
%ul
|
|
|
|
- @comparable_diffs.each do |merge_request_diff|
|
|
|
|
%li
|
|
|
|
= link_to merge_request_version_path(@project, @merge_request, @merge_request_diff, merge_request_diff.head_commit_sha), class: ('is-active' if merge_request_diff == @start_version) do
|
|
|
|
%strong
|
|
|
|
- if merge_request_diff.latest?
|
|
|
|
latest version
|
|
|
|
- else
|
|
|
|
version #{version_index(merge_request_diff)}
|
|
|
|
.monospace #{short_sha(merge_request_diff.head_commit_sha)}
|
|
|
|
%small
|
|
|
|
= time_ago_with_tooltip(merge_request_diff.created_at)
|
|
|
|
%li
|
|
|
|
= link_to merge_request_version_path(@project, @merge_request, @merge_request_diff), class: ('is-active' unless @start_sha) do
|
|
|
|
%strong
|
|
|
|
#{@merge_request.target_branch} (base)
|
|
|
|
.monospace #{short_sha(@merge_request_diff.base_commit_sha)}
|
2016-09-06 13:08:06 -04:00
|
|
|
|
2016-09-01 10:02:53 -04:00
|
|
|
- unless @merge_request_diff.latest? && !@start_sha
|
2016-09-14 07:55:07 -04:00
|
|
|
.comments-disabled-notif.content-block
|
2016-08-31 11:14:14 -04:00
|
|
|
= icon('info-circle')
|
2016-09-07 03:16:21 -04:00
|
|
|
- if @start_sha
|
|
|
|
Comments are disabled because you're comparing two versions of this merge request.
|
|
|
|
- else
|
|
|
|
Comments are disabled because you're viewing an old version of this merge request.
|
2016-09-21 08:02:10 -04:00
|
|
|
= link_to 'Show latest version', diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-sm'
|