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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
4.4 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
%li{ id: dom_id(merge_request), class: mr_css_classes(merge_request), data: { labels: merge_request.label_ids, id: merge_request.id } }
2017-09-10 17:25:29 +05:30
- if @can_bulk_update
2022-11-25 23:54:43 +05:30
.issue-check.gl-mr-3.hidden
= render Pajamas::CheckboxTagComponent.new(name: dom_id(merge_request, "selected"),
value: nil,
checkbox_options: { 'data-id' => merge_request.id }) do |c|
2023-07-09 08:55:56 +05:30
- c.with_label do
2022-11-25 23:54:43 +05:30
%span.gl-sr-only
= merge_request.title
2016-09-29 09:46:39 +05:30
2018-12-05 23:21:45 +05:30
.issuable-info-container
.issuable-main-info
2017-09-10 17:25:29 +05:30
.merge-request-title.title
2019-09-30 21:07:59 +05:30
%span.merge-request-title-text.js-onboarding-mr-item
2023-03-17 16:20:25 +05:30
= hidden_merge_request_icon(merge_request)
2022-01-26 12:08:38 +05:30
= link_to merge_request.title, merge_request_path(merge_request), class: 'js-prefetch-document'
2017-09-10 17:25:29 +05:30
- if merge_request.tasks?
2023-07-09 08:55:56 +05:30
%span.task-status.d-none.d-sm-inline-block.gl-font-sm
2017-09-10 17:25:29 +05:30
 
= merge_request.task_status
.issuable-info
%span.issuable-reference
#{issuable_reference(merge_request)}
2023-07-09 08:55:56 +05:30
%span.issuable-authored.d-none.d-sm-inline-block.gl-text-gray-500!
2017-09-10 17:25:29 +05:30
·
2023-07-09 08:55:56 +05:30
#{s_('IssueList|created %{timeAgoString} by %{user}').html_safe % { timeAgoString: time_ago_with_tooltip(merge_request.created_at, placement: 'bottom'), user: link_to_member(@project, merge_request.author, avatar: false, extra_class: 'gl-text-gray-500!') }}
2021-02-22 17:27:13 +05:30
= render_if_exists 'shared/issuable/gitlab_team_member_badge', author: merge_request.author
2017-09-10 17:25:29 +05:30
- if merge_request.milestone
2023-07-09 08:55:56 +05:30
%span.issuable-milestone.d-none.d-sm-inline-block.gl-text-truncate.gl-max-w-26.gl-vertical-align-bottom
2017-09-10 17:25:29 +05:30
 
2023-07-09 08:55:56 +05:30
= link_to project_merge_requests_path(merge_request.project, milestone_title: merge_request.milestone.title), class: 'gl-text-gray-500!', data: { html: 'true', toggle: 'tooltip', title: milestone_tooltip_due_date(merge_request.milestone) } do
= sprite_icon('clock', size: 12, css_class: 'gl-vertical-align-text-bottom')
2017-09-10 17:25:29 +05:30
= merge_request.milestone.title
- if merge_request.target_project.default_branch != merge_request.target_branch
2023-07-09 08:55:56 +05:30
%span.project-ref-path.has-tooltip.d-inline-block.gl-text-truncate.gl-max-w-26.gl-vertical-align-bottom{ title: _('Target branch: %{target_branch}') % {target_branch: merge_request.target_branch} }
2017-09-10 17:25:29 +05:30
 
2023-07-09 08:55:56 +05:30
= link_to project_ref_path(merge_request.project, merge_request.target_branch), class: 'ref-name gl-text-gray-500!' do
2021-10-27 15:23:28 +05:30
= sprite_icon('branch', size: 12, css_class: 'fork-sprite')
2017-09-10 17:25:29 +05:30
= merge_request.target_branch
- if merge_request.labels.any?
2023-06-20 00:43:36 +05:30
.gl-mt-1{ role: 'group', 'aria-label': _('Labels') }
- presented_labels_sorted_by_title(merge_request.labels, merge_request.project).each do |label|
= link_to_label(label, type: :merge_request, small: true)
2017-09-10 17:25:29 +05:30
.issuable-meta
2019-09-30 21:07:59 +05:30
%ul.controls.d-flex.align-items-end
2017-08-17 22:00:37 +05:30
- if merge_request.merged?
2023-06-20 00:43:36 +05:30
%li.d-none.d-sm-flex
= render Pajamas::BadgeComponent.new(_('Merged'), size: 'sm', variant: 'info')
2017-08-17 22:00:37 +05:30
- elsif merge_request.closed?
2023-06-20 00:43:36 +05:30
%li.d-none.d-sm-flex
= render Pajamas::BadgeComponent.new(_('Closed'), size: 'sm', variant: 'danger')
2020-04-22 19:07:51 +05:30
= render 'shared/merge_request_pipeline_status', merge_request: merge_request
2017-08-17 22:00:37 +05:30
- if merge_request.open? && merge_request.broken?
2019-09-30 21:07:59 +05:30
%li.issuable-pipeline-broken.d-none.d-sm-flex
2018-05-09 12:01:36 +05:30
= link_to merge_request_path(merge_request), class: "has-tooltip", title: _('Cannot be merged automatically') do
2020-10-24 23:57:45 +05:30
= sprite_icon('warning-solid')
2019-07-31 22:56:46 +05:30
- if merge_request.assignees.any?
2021-01-03 14:25:43 +05:30
%li.gl-display-flex.gl-align-items-center
2019-07-31 22:56:46 +05:30
= render 'shared/issuable/assignees', project: merge_request.project, issuable: merge_request
2021-03-11 19:13:27 +05:30
- if merge_request.reviewers.any?
2021-01-03 14:25:43 +05:30
%li.gl-display-flex.issuable-reviewers
= render 'shared/issuable/reviewers', project: merge_request.project, issuable: merge_request
2020-07-28 23:09:34 +05:30
= render 'projects/merge_requests/approvals_count', merge_request: merge_request
2017-08-17 22:00:37 +05:30
= render 'shared/issuable_meta_data', issuable: merge_request
2023-07-09 08:55:56 +05:30
- if merge_request.updated_at != merge_request.created_at
.float-right.issuable-updated-at.d-none.d-sm-inline-block.gl-text-gray-500
%span
= _('updated %{time_ago}').html_safe % { time_ago: time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago') }