From 583f835e9a26cf6b0a2b2c8abc827753c417641c Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Fri, 1 Sep 2017 13:32:05 +0100 Subject: [PATCH] Adds verfication for the cookie --- app/assets/javascripts/dispatcher.js | 2 -- app/views/projects/merge_requests/index.html.haml | 4 ++-- app/views/projects/pipelines/index.html.haml | 4 ++-- app/views/projects/show.html.haml | 4 ++-- app/views/projects/tree/show.html.haml | 4 ++-- app/views/shared/_auto_devops_callout.html.haml | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 2b98bdeb54d..c57472b9747 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -385,8 +385,6 @@ import initChangesDropdown from './init_changes_dropdown'; parentEl: '.pipelines-tabs', }, }); - - new UserCallout(); break; case 'groups:activity': new gl.Activities(); diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml index f3ec6467a8a..3e1d2c568be 100644 --- a/app/views/projects/merge_requests/index.html.haml +++ b/app/views/projects/merge_requests/index.html.haml @@ -20,8 +20,8 @@ - if @project.merge_requests.exists? %div{ class: container_class } - -# TODO add verfication - = render 'shared/auto_devops_callout' + -if show_callout?('auto_devops_settings_dismissed') + = render 'shared/auto_devops_callout' .top-area = render 'shared/issuable/nav', type: :merge_requests .nav-controls{ class: ("visible-xs" if show_new_nav?) } diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 37b20d42a8f..a7c53ad48f4 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -3,8 +3,8 @@ = render "projects/pipelines/head" %div{ 'class' => container_class } - -# TODO add verfication - = render 'shared/auto_devops_callout' + -if show_callout?('auto_devops_settings_dismissed') + = render 'shared/auto_devops_callout' #pipelines-list-vue{ data: { endpoint: project_pipelines_path(@project, format: :json), "help-page-path" => help_page_path('ci/quick_start/README'), diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 06822ee2cce..2635325951b 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -81,8 +81,8 @@ - view_path = default_project_view - -# TODO add verfication - = render 'shared/auto_devops_callout' + -if show_callout?('auto_devops_settings_dismissed') + = render 'shared/auto_devops_callout' %div{ class: project_child_container_class(view_path) } = render view_path diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml index a4e2b15ed19..bf7baec92e5 100644 --- a/app/views/projects/tree/show.html.haml +++ b/app/views/projects/tree/show.html.haml @@ -14,7 +14,7 @@ = render "projects/commits/head" %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - -# TODO add verfication - = render 'shared/auto_devops_callout' + -if show_callout?('auto_devops_settings_dismissed') + = render 'shared/auto_devops_callout' = render 'projects/last_push' = render 'projects/files', commit: @last_commit, project: @project, ref: @ref, content_url: project_tree_path(@project, @id) diff --git a/app/views/shared/_auto_devops_callout.html.haml b/app/views/shared/_auto_devops_callout.html.haml index 010329e3f32..6bf7432f8b4 100644 --- a/app/views/shared/_auto_devops_callout.html.haml +++ b/app/views/shared/_auto_devops_callout.html.haml @@ -1,4 +1,4 @@ -.user-callout{ data: { uid: 'TODO' } } +.user-callout{ data: { uid: 'auto_devops_settings_dismissed' } } .bordered-box.landing.content-block %button.btn.btn-default.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss Auto Dev Ops box' }