Commit 25756618 authored by Rydkin Maxim's avatar Rydkin Maxim

replace helper with decorator

parent b9f7d4b4
......@@ -121,8 +121,4 @@ module CiStatusHelper
status.respond_to?(:label) &&
status.respond_to?(:icon)
end
def status_title(pipeline)
Ci::PipelinePresenter.new(pipeline).status_title
end
end
......@@ -4,6 +4,7 @@ module Ci
include HasStatus
include Importable
include AfterCommitQueue
include Presentable
belongs_to :project
belongs_to :user
......
......@@ -84,6 +84,6 @@ class PipelineEntity < Grape::Entity
end
def status_tooltip
Ci::PipelinePresenter.new(pipeline).status_title
pipeline.present(current_user: request.user).status_title
end
end
- pipeline = @build.pipeline.present(current_user: current_user)
.content-block.build-header.top-area
.header-content
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false, title: status_title(@build.pipeline)
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false, title: pipeline.status_title
Job
%strong.js-build-id ##{@build.id}
in pipeline
= link_to pipeline_path(@build.pipeline) do
%strong ##{@build.pipeline.id}
= link_to pipeline_path(pipeline) do
%strong ##{pipeline.id}
for commit
= link_to namespace_project_commit_path(@project.namespace, @project, @build.pipeline.sha) do
%strong= @build.pipeline.short_sha
= link_to namespace_project_commit_path(@project.namespace, @project, pipeline.sha) do
%strong= pipeline.short_sha
from
= link_to namespace_project_commits_path(@project.namespace, @project, @build.ref) do
%code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment