diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-08-11 19:04:45 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-08-11 19:04:45 +0800 |
commit | 62d991c80f0b5716945912ebf2031f56da75a12b (patch) | |
tree | 5df112fefdfcaa888b35b72121c381c981c091d2 /app/views/projects | |
parent | d84aa560331a646016880e4d2c5c0a3b3d4b32a6 (diff) | |
download | gitlab-ce-62d991c80f0b5716945912ebf2031f56da75a12b.tar.gz |
Show latest pipeline status if what provided artifacts aren't latest
Diffstat (limited to 'app/views/projects')
4 files changed, 16 insertions, 4 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 2029758f30d..8a33cd1502c 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -40,7 +40,10 @@ %ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' } %li.dropdown-header Artifacts - unless pipeline.latest? - = " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(@project.namespace, @project, pipeline))})" + - latest_pipeline = @project.pipeline_for(branch.name) + %li + %span= latest_pipeline.status.humanize + %li.dropdown-header Previous Artifacts - artifacts.each do |job| %li = link_to search_namespace_project_artifacts_path(@project.namespace, @project, branch.name, 'download', job: job.name), rel: 'nofollow' do diff --git a/app/views/projects/buttons/_download.html.haml b/app/views/projects/buttons/_download.html.haml index e7ef0cbaa91..84135a6d049 100644 --- a/app/views/projects/buttons/_download.html.haml +++ b/app/views/projects/buttons/_download.html.haml @@ -20,7 +20,10 @@ - if artifacts.any? %li.dropdown-header Artifacts - unless pipeline.latest? - = " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(@project.namespace, @project, pipeline))})" + - latest_pipeline = @project.pipeline_for(@ref) + %li + %span= latest_pipeline.status.humanize + %li.dropdown-header Previous Artifacts - artifacts.each do |job| %li = link_to search_namespace_project_artifacts_path(@project.namespace, @project, @ref, 'download', job: job.name), rel: 'nofollow' do diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml index 0ef9ad5f789..c9a0b74e47b 100644 --- a/app/views/projects/repositories/_download_archive.html.haml +++ b/app/views/projects/repositories/_download_archive.html.haml @@ -31,7 +31,10 @@ - if artifacts.any? %li.dropdown-header Artifacts - unless pipeline.latest? - = " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(@project.namespace, @project, pipeline))})" + - latest_pipeline = @project.pipeline_for(ref) + %li + %span= latest_pipeline.status.humanize + %li.dropdown-header Previous Artifacts - artifacts.each do |job| %li = link_to search_namespace_project_artifacts_path(@project.namespace, @project, ref, 'download', job: job.name), rel: 'nofollow' do diff --git a/app/views/projects/tags/_download.html.haml b/app/views/projects/tags/_download.html.haml index ba3fd4627af..10e8f77ac0c 100644 --- a/app/views/projects/tags/_download.html.haml +++ b/app/views/projects/tags/_download.html.haml @@ -18,7 +18,10 @@ - if artifacts.any? %li.dropdown-header Artifacts - unless pipeline.latest? - = " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(project.namespace, project, pipeline))})" + - latest_pipeline = @project.pipeline_for(ref) + %li + %span= latest_pipeline.status.humanize + %li.dropdown-header Previous Artifacts - artifacts.each do |job| %li = link_to search_namespace_project_artifacts_path(project.namespace, project, ref, 'download', job: job.name), rel: 'nofollow' do |