Rename is_project? to project?

This commit is contained in:
Mike Greiling 2018-11-06 15:19:23 -06:00 committed by Thong Kuah
parent 82391594e3
commit 83b8321aea
5 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated
raise NotImplementedError
end
def is_project?
def project?
raise NotImplementedError
end
end

View File

@ -13,7 +13,7 @@ class GroupClusterablePresenter < ClusterablePresenter
group_cluster_path(clusterable, cluster, params)
end
def is_project?
def project?
false
end
end

View File

@ -13,7 +13,7 @@ class ProjectClusterablePresenter < ClusterablePresenter
project_cluster_path(clusterable, cluster, params)
end
def is_project?
def project?
true
end
end

View File

@ -7,7 +7,7 @@
- link_to_help_page = link_to(_('Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
%p
= s_('ClusterIntegration|Kubernetes clusters allow you to use review apps, deploy your applications, run your pipelines, and much more in an easy way.')
- if clusterable.is_project?
- if clusterable.project?
= link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
- else
= s_('ClusterIntegration|Adding an integration to your group will share the cluster across all your projects.')

View File

@ -3,7 +3,7 @@
- help_link_end = '</a>'.html_safe
%h4.prepend-top-0
= s_('ClusterIntegration|Add a Kubernetes cluster integration')
- if clusterable.is_project?
- if clusterable.project?
%p
= s_('ClusterIntegration|With a Kubernetes cluster associated to this project, you can use review apps, deploy your applications, run your pipelines, and much more in an easy way.')
%p