debian-mirror-gitlab/app/views/projects/commits/_commit.html.haml

59 lines
2.7 KiB
Text
Raw Normal View History

2018-12-05 23:21:45 +05:30
-#-----------------------------------------------------------------
WARNING: Please keep changes up-to-date with the following files:
- `assets/javascripts/diffs/components/commit_item.vue`
-#-----------------------------------------------------------------
2018-03-17 18:26:18 +05:30
- view_details = local_assigns.fetch(:view_details, false)
- merge_request = local_assigns.fetch(:merge_request, nil)
- project = local_assigns.fetch(:project) { merge_request&.project }
- ref = local_assigns.fetch(:ref) { merge_request&.source_branch }
2019-02-02 18:00:53 +05:30
- commit_status = commit.present(current_user: current_user).status_for(ref)
2018-03-17 18:26:18 +05:30
- link = commit_path(project, commit, merge_request: merge_request)
2018-11-29 20:51:05 +05:30
%li.commit.flex-row.js-toggle-container{ id: "commit-#{commit.short_id}" }
.avatar-cell.d-none.d-sm-block
= author_avatar(commit, size: 36, has_tooltip: false)
.commit-detail.flex-list
.commit-content.qa-commit-content
- if view_details && merge_request
= link_to commit.title, project_commit_path(project, commit.id, merge_request_iid: merge_request.iid), class: "commit-row-message item-title"
- else
= link_to_markdown_field(commit, :title, link, class: "commit-row-message item-title")
2019-05-30 16:15:17 +05:30
%span.commit-row-message.d-block.d-sm-none
2018-11-29 20:51:05 +05:30
·
= commit.short_id
2019-05-30 16:15:17 +05:30
- if commit_status
.d-block.d-sm-none
= render_commit_status(commit, ref: ref)
2018-11-29 20:51:05 +05:30
- if commit.description?
%button.text-expander.js-toggle-button
= sprite_icon('ellipsis_h', size: 12)
2014-09-02 18:07:02 +05:30
2018-11-29 20:51:05 +05:30
.committer
- commit_author_link = commit_author_link(commit, avatar: false, size: 24)
- commit_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom')
- commit_text = _('%{commit_author_link} authored %{commit_timeago}') % { commit_author_link: commit_author_link, commit_timeago: commit_timeago }
#{ commit_text.html_safe }
2017-09-10 17:25:29 +05:30
2018-11-29 20:51:05 +05:30
- if commit.description?
%pre.commit-row-description.js-toggle-content.append-bottom-8
= preserve(markdown_field(commit, :description))
2018-10-15 14:42:47 +05:30
2019-05-30 16:15:17 +05:30
.commit-actions.flex-row.d-none.d-sm-flex
2018-11-29 20:51:05 +05:30
- if request.xhr?
= render partial: 'projects/commit/signature', object: commit.signature
- else
= render partial: 'projects/commit/ajax_signature', locals: { commit: commit }
2014-09-02 18:07:02 +05:30
2019-02-02 18:00:53 +05:30
- if commit_status
2018-11-29 20:51:05 +05:30
= render_commit_status(commit, ref: ref)
2017-09-10 17:25:29 +05:30
2018-11-29 20:51:05 +05:30
.js-commit-pipeline-status{ data: { endpoint: pipelines_project_commit_path(project, commit.id, ref: ref) } }
2018-03-17 18:26:18 +05:30
2019-05-30 16:15:17 +05:30
.commit-sha-group
2018-11-29 20:51:05 +05:30
.label.label-monospace
= commit.short_id
= clipboard_button(text: commit.id, title: _("Copy commit SHA to clipboard"), class: "btn btn-default", container: "body")
= link_to_browse_code(project, commit)