From f47de1da6204f9ef727afaef8f12f2809608d52f Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 10 Nov 2016 09:00:00 -0600 Subject: only display link to pipeline in generic build index, not on pipeline show --- app/views/projects/builds/_table.html.haml | 2 +- app/views/projects/ci/builds/_build.html.haml | 18 ++++++++++-------- app/views/projects/commit/_ci_stage.html.haml | 4 ++-- app/views/projects/commit/_pipeline.html.haml | 1 - .../_generic_commit_status.html.haml | 17 +++++++++-------- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/app/views/projects/builds/_table.html.haml b/app/views/projects/builds/_table.html.haml index c42efc321b1..028664f5bba 100644 --- a/app/views/projects/builds/_table.html.haml +++ b/app/views/projects/builds/_table.html.haml @@ -20,6 +20,6 @@ %th Coverage %th - = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: admin || project.build_coverage_enabled?, admin: admin } + = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, pipeline_link: true, stage: true, allow_retry: true, coverage: admin || project.build_coverage_enabled?, admin: admin } = paginate builds, theme: 'gitlab' diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 4f4612f6b80..28a040b4ac1 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -2,6 +2,7 @@ - ref = local_assigns.fetch(:ref, nil) - commit_sha = local_assigns.fetch(:commit_sha, nil) - retried = local_assigns.fetch(:retried, false) +- pipeline_link = local_assigns.fetch(:pipeline_link, false) - stage = local_assigns.fetch(:stage, false) - coverage = local_assigns.fetch(:coverage, false) - allow_retry = local_assigns.fetch(:allow_retry, false) @@ -51,14 +52,15 @@ - if build.manual? %span.label.label-info manual - %td - = link_to pipeline_path(build.pipeline) do - %span.pipeline-id ##{build.pipeline.id} - %span by - - if build.pipeline.user - = user_avatar(user: build.pipeline.user, size: 20) - - else - %span.api.monospace API + - if pipeline_link + %td + = link_to pipeline_path(build.pipeline) do + %span.pipeline-id ##{build.pipeline.id} + %span by + - if build.pipeline.user + = user_avatar(user: build.pipeline.user, size: 20) + - else + %span.api.monospace API - if admin %td diff --git a/app/views/projects/commit/_ci_stage.html.haml b/app/views/projects/commit/_ci_stage.html.haml index 65f4c0b7c7d..3a3d750439f 100644 --- a/app/views/projects/commit/_ci_stage.html.haml +++ b/app/views/projects/commit/_ci_stage.html.haml @@ -8,8 +8,8 @@ - if stage   = stage.titleize - = render statuses.latest_ci_stages, coverage: @project.build_coverage_enabled?, stage: false, ref: false, allow_retry: true - = render statuses.retried_ci_stages, coverage: @project.build_coverage_enabled?, stage: false, ref: false, retried: true + = render statuses.latest_ci_stages, coverage: @project.build_coverage_enabled?, stage: false, ref: false, pipeline_link: false, allow_retry: true + = render statuses.retried_ci_stages, coverage: @project.build_coverage_enabled?, stage: false, ref: false, pipeline_link: false, retried: true %tr %td{colspan: 10}   diff --git a/app/views/projects/commit/_pipeline.html.haml b/app/views/projects/commit/_pipeline.html.haml index 95177856031..062a8905a19 100644 --- a/app/views/projects/commit/_pipeline.html.haml +++ b/app/views/projects/commit/_pipeline.html.haml @@ -61,7 +61,6 @@ %tr %th Status %th Build ID - %th Pipeline %th Name %th - if pipeline.project.build_coverage_enabled? diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml index 688cda384fb..c8ee96084fc 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml @@ -15,14 +15,15 @@ - if defined?(retried) && retried = icon('warning', class: 'text-warning has-tooltip', title: 'Status was retried.') - %td - = link_to pipeline_path(generic_commit_status.pipeline) do - %span.pipeline-id ##{generic_commit_status.pipeline.id} - %span by - - if generic_commit_status.pipeline.user - = user_avatar(user: generic_commit_status.pipeline.user, size: 20) - - else - %span.api.monospace API + - if defined?(pipeline_link) && pipeline_link + %td + = link_to pipeline_path(generic_commit_status.pipeline) do + %span.pipeline-id ##{generic_commit_status.pipeline.id} + %span by + - if generic_commit_status.pipeline.user + = user_avatar(user: generic_commit_status.pipeline.user, size: 20) + - else + %span.api.monospace API - if defined?(commit_sha) && commit_sha %td -- cgit v1.2.1