debian-mirror-gitlab/app/views/projects/merge_requests/diffs/_versions.html.haml

98 lines
4.4 KiB
Text
Raw Normal View History

2016-09-29 09:46:39 +05:30
- if @merge_request_diffs.size > 1
.mr-version-controls
2017-08-17 22:00:37 +05:30
.mr-version-menus-container.content-block
2016-09-29 09:46:39 +05:30
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
- else
version #{version_index(@merge_request_diff)}
2016-11-03 12:29:30 +05:30
= icon('caret-down')
2016-09-29 09:46:39 +05:30
.dropdown-menu.dropdown-select.dropdown-menu-selectable
.dropdown-title
%span Version:
2017-08-17 22:00:37 +05:30
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-09-29 09:46:39 +05:30
= icon('times', class: 'dropdown-menu-close-icon')
.dropdown-content
%ul
- @merge_request_diffs.each do |merge_request_diff|
%li
2017-08-17 22:00:37 +05:30
= link_to merge_request_version_path(@project, @merge_request, merge_request_diff, @start_sha), class: ('is-active' if merge_request_diff == @merge_request_diff) do
2017-09-10 17:25:29 +05:30
%div
%strong
- if merge_request_diff.latest?
latest version
- else
version #{version_index(merge_request_diff)}
%div
%small.commit-sha= short_sha(merge_request_diff.head_commit_sha)
%div
%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-29 09:46:39 +05:30
- if @merge_request_diff.base_commit_sha
and
%span.dropdown.inline.mr-version-compare-dropdown
%a.btn.btn-default.dropdown-toggle{ data: {toggle: :dropdown} }
2017-09-10 17:25:29 +05:30
- if @start_version
version #{version_index(@start_version)}
- else
%span.ref-name= @merge_request.target_branch
2016-11-03 12:29:30 +05:30
= icon('caret-down')
2016-09-29 09:46:39 +05:30
.dropdown-menu.dropdown-select.dropdown-menu-selectable
.dropdown-title
%span Compared with:
2017-08-17 22:00:37 +05:30
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-09-29 09:46:39 +05:30
= icon('times', class: 'dropdown-menu-close-icon')
.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
2017-09-10 17:25:29 +05:30
%div
%strong
- if merge_request_diff.latest?
latest version
- else
version #{version_index(merge_request_diff)}
%div
%small.commit-sha= short_sha(merge_request_diff.head_commit_sha)
%div
%small
= time_ago_with_tooltip(merge_request_diff.created_at)
2016-10-01 15:18:49 +05:30
%li
2017-08-17 22:00:37 +05:30
= link_to merge_request_version_path(@project, @merge_request, @merge_request_diff), class: ('is-active' unless @start_version) do
2017-09-10 17:25:29 +05:30
%div
%strong
%span.ref-name= @merge_request.target_branch
(base)
%div
%strong.commit-sha= short_sha(@merge_request_diff.base_commit_sha)
2016-09-29 09:46:39 +05:30
2016-11-03 12:29:30 +05:30
- if different_base?(@start_version, @merge_request_diff)
.content-block
= icon('info-circle')
Selected versions have different base commits.
Changes will include
2017-09-10 17:25:29 +05:30
= link_to project_compare_path(@project, from: @start_version.base_commit_sha, to: @merge_request_diff.base_commit_sha) do
2016-11-03 12:29:30 +05:30
new commits
from
2017-08-17 22:00:37 +05:30
= succeed '.' do
%code= @merge_request.target_branch
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
- if @start_version || !@merge_request_diff.latest?
2016-09-29 09:46:39 +05:30
.comments-disabled-notif.content-block
= icon('info-circle')
2017-08-17 22:00:37 +05:30
Not all comments are displayed because you're
- if @start_version
comparing two versions
2016-09-29 09:46:39 +05:30
- else
2017-08-17 22:00:37 +05:30
viewing an old version
2017-09-10 17:25:29 +05:30
of the diff.
2017-08-17 22:00:37 +05:30
.pull-right
2017-09-10 17:25:29 +05:30
= link_to 'Show latest version', diffs_project_merge_request_path(@project, @merge_request), class: 'btn btn-sm'