diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-14 13:33:26 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-14 13:33:26 +0100 |
commit | 16592e2b45d42e22f9d1d595a1f44821c7b30441 (patch) | |
tree | a68e4f955de0564f1068f30a33d141acf04181bb /app/views/projects | |
parent | f32e28f6faab176845a780d5b4d26881c08bcfec (diff) | |
download | gitlab-ce-16592e2b45d42e22f9d1d595a1f44821c7b30441.tar.gz |
Fix review commentsfix-commit-status-rendering
- Remove unused Gitlab::Application.routes.url_helpers from Ci::Build
- Remove too much logic from a view, use Ci::Commit.matrix_builds
- Use ci_status_with_icon
- Don't describe symbols
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/builds/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/ci/builds/_build.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index dbbf382fa2a..b02aee3db21 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -13,7 +13,7 @@ = link_to "merge request ##{merge_request.iid}", merge_request_path(merge_request) #up-build-trace - - builds = @build.commit.builds.similar(@build).latest.ordered.to_a + - builds = @build.commit.matrix_builds(@build) - if builds.size > 1 %ul.nav-links.no-top.no-bottom - builds.each do |build| diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 195fd4a9d51..7123efffd5b 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -2,8 +2,7 @@ %td.status - if can?(current_user, :read_build, build) = link_to namespace_project_build_url(build.project.namespace, build.project, build), class: "ci-status ci-#{build.status}" do - = ci_icon_for_status(build.status) - = build.status + = ci_status_with_icon(build.status) - else = ci_status_with_icon(build.status) 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 ac29f323b4c..4143ea13063 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 @@ -2,8 +2,7 @@ %td.status - if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url = link_to generic_commit_status.target_url, class: "ci-status ci-#{generic_commit_status.status}" do - = ci_icon_for_status(generic_commit_status.status) - = generic_commit_status.status + = ci_status_with_icon(generic_commit_status.status) - else = ci_status_with_icon(generic_commit_status.status) |