From d21b3a0211061a2fed5949e92320f100ab3df05b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 24 Mar 2016 14:16:21 +0100 Subject: Add links to CI setup documentation from project settings and builds pages Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/_builds_settings.html.haml | 8 ++++++++ app/views/projects/builds/index.html.haml | 3 +++ 2 files changed, 11 insertions(+) (limited to 'app/views/projects') diff --git a/app/views/projects/_builds_settings.html.haml b/app/views/projects/_builds_settings.html.haml index 95ab9ecf3e8..f1edc800bbf 100644 --- a/app/views/projects/_builds_settings.html.haml +++ b/app/views/projects/_builds_settings.html.haml @@ -1,6 +1,14 @@ %fieldset.builds-feature %legend Builds: + + - unless @project.builds.any? + .form-group + .col-sm-offset-2.col-sm-10 + %p Before you can use Builds (Continuous Integration) feature you need to setup it. + = link_to 'Get started with Builds', help_page_path('ci/quick_start', 'README'), class: 'btn btn-info' + %hr + .form-group .col-sm-offset-2.col-sm-10 %p Get recent application code using the following command: diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 811d304ea75..d21716e4887 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -27,6 +27,9 @@ = link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post + - unless @project.builds.any? + = link_to 'Get started with Builds', help_page_path('ci/quick_start', 'README'), class: 'btn btn-info' + = link_to ci_lint_path, class: 'btn btn-default' do = icon('wrench') %span CI Lint -- cgit v1.2.1 From 3b1543cd15fcc52c2f5f3b7f4ccf391334fb6028 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 24 Mar 2016 15:17:13 +0100 Subject: Detect build setup state based on gitlab_ci.yml presense Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/_builds_settings.html.haml | 2 +- app/views/projects/builds/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/projects') diff --git a/app/views/projects/_builds_settings.html.haml b/app/views/projects/_builds_settings.html.haml index f1edc800bbf..095e7e45df7 100644 --- a/app/views/projects/_builds_settings.html.haml +++ b/app/views/projects/_builds_settings.html.haml @@ -2,7 +2,7 @@ %legend Builds: - - unless @project.builds.any? + - unless @repository.gitlab_ci_yml .form-group .col-sm-offset-2.col-sm-10 %p Before you can use Builds (Continuous Integration) feature you need to setup it. diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index d21716e4887..aa85f495e39 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -27,7 +27,7 @@ = link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post - - unless @project.builds.any? + - unless @repository.gitlab_ci_yml = link_to 'Get started with Builds', help_page_path('ci/quick_start', 'README'), class: 'btn btn-info' = link_to ci_lint_path, class: 'btn btn-default' do -- cgit v1.2.1 From 9e7e2c6b9d2e46720c0375b6c44a2fb5e0f7acbe Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 25 Mar 2016 13:18:55 +0100 Subject: Small refactoring and rewording Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/_builds_settings.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects') diff --git a/app/views/projects/_builds_settings.html.haml b/app/views/projects/_builds_settings.html.haml index 095e7e45df7..9ae6964aaac 100644 --- a/app/views/projects/_builds_settings.html.haml +++ b/app/views/projects/_builds_settings.html.haml @@ -5,7 +5,7 @@ - unless @repository.gitlab_ci_yml .form-group .col-sm-offset-2.col-sm-10 - %p Before you can use Builds (Continuous Integration) feature you need to setup it. + %p Builds need to be configured before you can begin using Continuous Integration. = link_to 'Get started with Builds', help_page_path('ci/quick_start', 'README'), class: 'btn btn-info' %hr -- cgit v1.2.1