diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-08-31 16:58:13 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-08-31 16:59:23 +0100 |
commit | ecefe090460687a078e3d1aacf621fd5bff07fb5 (patch) | |
tree | cc60b6d66838da18474144556673be1175f7a51d /app/views/projects/pipelines | |
parent | 472f2d566633df6c1dee1f703b06958b9a0a2cd8 (diff) | |
download | gitlab-ce-ecefe090460687a078e3d1aacf621fd5bff07fb5.tar.gz |
Render link to branch only when branch still exists
Diffstat (limited to 'app/views/projects/pipelines')
-rw-r--r-- | app/views/projects/pipelines/_info.html.haml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index ccb83148ded..57c5f64ee8d 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -13,7 +13,11 @@ = pluralize @pipeline.total_size, "job" - if @pipeline.ref from - = link_to @pipeline.ref, project_ref_path(@project, @pipeline.ref), class: "ref-name" + - if @project.repository.branch_exists?(@pipeline.ref) + = link_to @pipeline.ref, project_ref_path(@project, @pipeline.ref), class: "ref-name" + - else + %span.ref-name + = @pipeline.ref - if @pipeline.duration in = time_interval_in_words(@pipeline.duration) |