From f013973d19b9ae145b6f642e085172f1e266d5ef Mon Sep 17 00:00:00 2001 From: Keith Pitt <me@keithpitt.com> Date: Wed, 8 Oct 2014 17:22:41 +0800 Subject: [PATCH] Handle the case where the CI service may not provide a status_img_path method. --- app/views/projects/show.html.haml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 61525ca6c1..9b06ebe95a 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -64,8 +64,12 @@ - @project.ci_services.each do |ci_service| - if ci_service.active? && ci_service.respond_to?(:builds_path) - = link_to ci_service.builds_path do - = image_tag ci_service.status_img_path, alt: "build status" + - if ci_service.respond_to?(:status_img_path) + = link_to ci_service.builds_path do + = image_tag ci_service.status_img_path, alt: "build status" + - else + %span.light CI provided by + = link_to ci_service.title, ci_service.builds_path - if readme .tab-pane#tab-readme @@ -76,3 +80,4 @@ = readme.name .wiki = render_readme(readme) + -- 2.30.9