diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 78b3de46f58069b342caf8b739d38db0c0590459..ced0380bb0bf5d0920a931f775483aa3976fa28d 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -27,7 +27,7 @@ = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: 'btn btn-default', method: :post, title: "Compare" do Compare - - artifacts = @project.builds_for(@repository.root_ref).latest.with_artifacts + - artifacts = @project.latest_success_builds_for(@repository.root_ref) - if artifacts.any? .dropdown.inline.artifacts-btn %a.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' } diff --git a/app/views/projects/buttons/_download.html.haml b/app/views/projects/buttons/_download.html.haml index f504d514963b5666805e28171190da5aa8e59761..2eedc0d9a42b0a21d4049beef3188f4b02beff1b 100644 --- a/app/views/projects/buttons/_download.html.haml +++ b/app/views/projects/buttons/_download.html.haml @@ -14,7 +14,7 @@ %li = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'tar.gz'), rel: 'nofollow' do %span Download tar.gz - - artifacts = @project.builds_for(@ref).latest.with_artifacts + - artifacts = @project.latest_success_builds_for(@ref) - if artifacts.any? %li.dropdown-header Artifacts - artifacts.each do |job| diff --git a/app/views/projects/tags/_download.html.haml b/app/views/projects/tags/_download.html.haml index 1f4c6c9ec08a28d42839370df75279b13de3cf0e..4a8ef77ad8bbca5f4dbd8b624c87bcb62745724f 100644 --- a/app/views/projects/tags/_download.html.haml +++ b/app/views/projects/tags/_download.html.haml @@ -12,7 +12,7 @@ %li = link_to archive_namespace_project_repository_path(project.namespace, project, ref: ref, format: 'tar.gz'), rel: 'nofollow' do %span Download tar.gz - - artifacts = project.builds_for(ref).latest.with_artifacts + - artifacts = project.latest_success_builds_for(ref) - if artifacts.any? %li.dropdown-header Artifacts - artifacts.each do |job|