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

90 lines
4.2 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
2016-09-29 09:46:39 +05:30
%strong
- if merge_request_diff.latest?
latest version
- else
version #{version_index(merge_request_diff)}
2017-08-17 22:00:37 +05:30
.monospace= short_sha(merge_request_diff.head_commit_sha)
2016-09-29 09:46:39 +05:30
%small
2017-08-17 22:00:37 +05:30
#{number_with_delimiter(merge_request_diff.commits_count)} #{'commit'.pluralize(merge_request_diff.commits_count)},
2016-09-29 09:46:39 +05:30
= time_ago_with_tooltip(merge_request_diff.created_at)
- 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
2017-08-17 22:00:37 +05:30
- if @start_version
2016-09-29 09:46:39 +05:30
version #{version_index(@start_version)}
- else
#{@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
%strong
- if merge_request_diff.latest?
latest version
- else
version #{version_index(merge_request_diff)}
2017-08-17 22:00:37 +05:30
.monospace= short_sha(merge_request_diff.head_commit_sha)
2016-09-29 09:46:39 +05:30
%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
2016-10-01 15:18:49 +05:30
%strong
#{@merge_request.target_branch} (base)
2017-08-17 22:00:37 +05:30
.monospace= 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
= link_to namespace_project_compare_path(@project.namespace, @project, from: @start_version.base_commit_sha, to: @merge_request_diff.base_commit_sha) do
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
of this merge request.
.pull-right
= link_to 'Show latest version', diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-sm'