Commit ecb4a29f authored by Thong Kuah's avatar Thong Kuah

Reverse view override as EE has an override too

Use presenters instead otherwise we will have x2 overides in EE
parent b019224f
...@@ -48,6 +48,10 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated ...@@ -48,6 +48,10 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated
nil nil
end end
def sidebar_text
raise NotImplementedError
end
def learn_more_link def learn_more_link
raise NotImplementedError raise NotImplementedError
end end
......
...@@ -24,6 +24,11 @@ class GroupClusterablePresenter < ClusterablePresenter ...@@ -24,6 +24,11 @@ class GroupClusterablePresenter < ClusterablePresenter
s_('ClusterIntegration|Adding an integration to your group will share the cluster across all your projects.') s_('ClusterIntegration|Adding an integration to your group will share the cluster across all your projects.')
end end
override :sidebar_text
def sidebar_text
s_('ClusterIntegration|Adding a Kubernetes cluster to your group will automatically share the cluster across all your projects. Use review apps, deploy your applications, and easily run your pipelines for all projects using the same cluster.')
end
override :learn_more_link override :learn_more_link
def learn_more_link def learn_more_link
link_to(s_('ClusterIntegration|Learn more about group Kubernetes clusters'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') link_to(s_('ClusterIntegration|Learn more about group Kubernetes clusters'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
......
...@@ -19,6 +19,11 @@ class ProjectClusterablePresenter < ClusterablePresenter ...@@ -19,6 +19,11 @@ class ProjectClusterablePresenter < ClusterablePresenter
project_cluster_path(clusterable, cluster, params) project_cluster_path(clusterable, cluster, params)
end end
override :sidebar_text
def sidebar_text
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.')
end
override :learn_more_link override :learn_more_link
def learn_more_link def learn_more_link
link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
......
%h4.prepend-top-0
= s_('ClusterIntegration|Add a Kubernetes cluster integration')
%p
= clusterable.sidebar_text
%p
= clusterable.learn_more_link
%h4.prepend-top-0
= s_('ClusterIntegration|Add a Kubernetes cluster integration')
%p
= s_('ClusterIntegration|Adding a Kubernetes cluster to your group will automatically share the cluster across all your projects.')
= s_('ClusterIntegration|Use review apps, deploy your applications, and easily run your pipelines for all projects using the same cluster.')
- clusters_help_url = help_page_path('user/project/clusters/index.md')
- help_link_start = "<a href=\"%{url}\" target=\"_blank\" rel=\"noopener noreferrer\">".html_safe
- help_link_end = '</a>'.html_safe
%h4.prepend-top-0
= s_('ClusterIntegration|Add a Kubernetes cluster integration')
%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
= s_('ClusterIntegration|Learn more about %{help_link_start}Kubernetes%{help_link_end}.').html_safe % { help_link_start: help_link_start % { url: clusters_help_url }, help_link_end: help_link_end }
...@@ -1367,7 +1367,7 @@ msgstr "" ...@@ -1367,7 +1367,7 @@ msgstr ""
msgid "ClusterIntegration|Add a Kubernetes cluster integration" msgid "ClusterIntegration|Add a Kubernetes cluster integration"
msgstr "" msgstr ""
msgid "ClusterIntegration|Adding a Kubernetes cluster to your group will automatically share the cluster across all your projects." msgid "ClusterIntegration|Adding a Kubernetes cluster to your group will automatically share the cluster across all your projects. Use review apps, deploy your applications, and easily run your pipelines for all projects using the same cluster."
msgstr "" msgstr ""
msgid "ClusterIntegration|Adding an integration to your group will share the cluster across all your projects." msgid "ClusterIntegration|Adding an integration to your group will share the cluster across all your projects."
...@@ -1550,9 +1550,6 @@ msgstr "" ...@@ -1550,9 +1550,6 @@ msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start_machine_type}machine types%{help_link_end} and %{help_link_start_pricing}pricing%{help_link_end}." msgid "ClusterIntegration|Learn more about %{help_link_start_machine_type}machine types%{help_link_end} and %{help_link_start_pricing}pricing%{help_link_end}."
msgstr "" msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start}Kubernetes%{help_link_end}."
msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start}zones%{help_link_end}." msgid "ClusterIntegration|Learn more about %{help_link_start}zones%{help_link_end}."
msgstr "" msgstr ""
...@@ -1703,9 +1700,6 @@ msgstr "" ...@@ -1703,9 +1700,6 @@ msgstr ""
msgid "ClusterIntegration|Token" msgid "ClusterIntegration|Token"
msgstr "" msgstr ""
msgid "ClusterIntegration|Use review apps, deploy your applications, and easily run your pipelines for all projects using the same cluster."
msgstr ""
msgid "ClusterIntegration|Validating project billing status" msgid "ClusterIntegration|Validating project billing status"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment