81 lines
3.7 KiB
Text
81 lines
3.7 KiB
Text
.page-content-header.js-commit-box{ 'data-commit-path' => branches_project_commit_path(@project, @commit.id) }
|
|
.header-main-content
|
|
= render partial: 'signature', object: @commit.signature
|
|
%strong
|
|
#{ s_('CommitBoxTitle|Commit') }
|
|
%span.commit-sha= @commit.short_id
|
|
= clipboard_button(text: @commit.id, title: _("Copy commit SHA to clipboard"))
|
|
%span.hidden-xs authored
|
|
#{time_ago_with_tooltip(@commit.authored_date)}
|
|
%span= s_('ByAuthor|by')
|
|
= author_avatar(@commit, size: 24)
|
|
%strong
|
|
= commit_author_link(@commit, avatar: true, size: 24)
|
|
- if @commit.different_committer?
|
|
%span.light= _('Committed by')
|
|
%strong
|
|
= commit_committer_link(@commit, avatar: true, size: 24)
|
|
#{time_ago_with_tooltip(@commit.committed_date)}
|
|
|
|
.header-action-buttons
|
|
- if defined?(@notes_count) && @notes_count > 0
|
|
%span.btn.disabled.btn-grouped.hidden-xs.append-right-10
|
|
= icon('comment')
|
|
= @notes_count
|
|
= link_to project_tree_path(@project, @commit), class: "btn btn-default append-right-10 hidden-xs hidden-sm" do
|
|
#{ _('Browse files') }
|
|
.dropdown.inline
|
|
%a.btn.btn-default.dropdown-toggle{ data: { toggle: "dropdown" } }
|
|
%span= _('Options')
|
|
= icon('caret-down')
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
|
%li.visible-xs-block.visible-sm-block
|
|
= link_to project_tree_path(@project, @commit) do
|
|
#{ _('Browse Files') }
|
|
- unless @commit.has_been_reverted?(current_user)
|
|
%li.clearfix
|
|
= revert_commit_link(@commit, project_commit_path(@project, @commit.id), has_tooltip: false)
|
|
%li.clearfix
|
|
= cherry_pick_commit_link(@commit, project_commit_path(@project, @commit.id), has_tooltip: false)
|
|
- if can_collaborate_with_project?
|
|
%li.clearfix
|
|
= link_to s_("CreateTag|Tag"), new_project_tag_path(@project, ref: @commit)
|
|
%li.divider
|
|
%li.dropdown-header
|
|
#{ _('Download') }
|
|
- unless @commit.parents.length > 1
|
|
%li= link_to s_("DownloadCommit|Email Patches"), project_commit_path(@project, @commit, format: :patch)
|
|
%li= link_to s_("DownloadCommit|Plain Diff"), project_commit_path(@project, @commit, format: :diff)
|
|
|
|
.commit-box
|
|
%h3.commit-title
|
|
= markdown(@commit.title, pipeline: :single_line, author: @commit.author)
|
|
- if @commit.description.present?
|
|
%pre.commit-description
|
|
= preserve(markdown(@commit.description, pipeline: :single_line, author: @commit.author))
|
|
|
|
.info-well
|
|
.well-segment.branch-info
|
|
.icon-container.commit-icon
|
|
= custom_icon("icon_commit")
|
|
%span.cgray= n_('parent', 'parents', @commit.parents.count)
|
|
- @commit.parents.each do |parent|
|
|
= link_to parent.short_id, project_commit_path(@project, parent), class: "commit-sha"
|
|
%span.commit-info.branches
|
|
%i.fa.fa-spinner.fa-spin
|
|
|
|
- if @commit.last_pipeline
|
|
- last_pipeline = @commit.last_pipeline
|
|
.well-segment.pipeline-info
|
|
.status-icon-container{ class: "ci-status-icon-#{@commit.status}" }
|
|
= link_to project_pipeline_path(@project, last_pipeline.id) do
|
|
= ci_icon_for_status(last_pipeline.status)
|
|
#{ _('Pipeline') }
|
|
= link_to "##{last_pipeline.id}", project_pipeline_path(@project, last_pipeline.id)
|
|
= ci_label_for_status(last_pipeline.status)
|
|
- if last_pipeline.stages_count.nonzero?
|
|
#{ n_(s_('Pipeline|with stage'), s_('Pipeline|with stages'), last_pipeline.stages_count) }
|
|
.mr-widget-pipeline-graph
|
|
= render 'shared/mini_pipeline_graph', pipeline: last_pipeline, klass: 'js-commit-pipeline-graph'
|
|
in
|
|
= time_interval_in_words last_pipeline.duration
|