summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-07 21:07:28 +1300
committerThong Kuah <tkuah@gitlab.com>2018-11-08 23:28:30 +1300
commitecb4a29fc069990a4e946f40f1bd8e17dcb2186d (patch)
tree6d8f2d0c56d33f0469c15af4b20a2652094312b7
parentb019224ff2bf6c8282a210eff1e98d0225e98a0c (diff)
downloadgitlab-ce-ecb4a29fc069990a4e946f40f1bd8e17dcb2186d.tar.gz
Reverse view override as EE has an override too
Use presenters instead otherwise we will have x2 overides in EE
-rw-r--r--app/presenters/clusterable_presenter.rb4
-rw-r--r--app/presenters/group_clusterable_presenter.rb5
-rw-r--r--app/presenters/project_clusterable_presenter.rb5
-rw-r--r--app/views/clusters/clusters/_sidebar.html.haml6
-rw-r--r--app/views/groups/clusters/_sidebar.html.haml5
-rw-r--r--app/views/projects/clusters/_sidebar.html.haml9
-rw-r--r--locale/gitlab.pot8
7 files changed, 21 insertions, 21 deletions
diff --git a/app/presenters/clusterable_presenter.rb b/app/presenters/clusterable_presenter.rb
index 08ff49a8702..9cc137aa3bd 100644
--- a/app/presenters/clusterable_presenter.rb
+++ b/app/presenters/clusterable_presenter.rb
@@ -48,6 +48,10 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated
nil
end
+ def sidebar_text
+ raise NotImplementedError
+ end
+
def learn_more_link
raise NotImplementedError
end
diff --git a/app/presenters/group_clusterable_presenter.rb b/app/presenters/group_clusterable_presenter.rb
index 427f3ec047c..d963c188559 100644
--- a/app/presenters/group_clusterable_presenter.rb
+++ b/app/presenters/group_clusterable_presenter.rb
@@ -24,6 +24,11 @@ class GroupClusterablePresenter < ClusterablePresenter
s_('ClusterIntegration|Adding an integration to your group will share the cluster across all your projects.')
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
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')
diff --git a/app/presenters/project_clusterable_presenter.rb b/app/presenters/project_clusterable_presenter.rb
index ede8547d210..63e69b91b11 100644
--- a/app/presenters/project_clusterable_presenter.rb
+++ b/app/presenters/project_clusterable_presenter.rb
@@ -19,6 +19,11 @@ class ProjectClusterablePresenter < ClusterablePresenter
project_cluster_path(clusterable, cluster, params)
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
def learn_more_link
link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
diff --git a/app/views/clusters/clusters/_sidebar.html.haml b/app/views/clusters/clusters/_sidebar.html.haml
new file mode 100644
index 00000000000..6e4415c21a9
--- /dev/null
+++ b/app/views/clusters/clusters/_sidebar.html.haml
@@ -0,0 +1,6 @@
+%h4.prepend-top-0
+ = s_('ClusterIntegration|Add a Kubernetes cluster integration')
+%p
+ = clusterable.sidebar_text
+%p
+ = clusterable.learn_more_link
diff --git a/app/views/groups/clusters/_sidebar.html.haml b/app/views/groups/clusters/_sidebar.html.haml
deleted file mode 100644
index 39b70de72df..00000000000
--- a/app/views/groups/clusters/_sidebar.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%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.')
diff --git a/app/views/projects/clusters/_sidebar.html.haml b/app/views/projects/clusters/_sidebar.html.haml
deleted file mode 100644
index b44c1df51fd..00000000000
--- a/app/views/projects/clusters/_sidebar.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-- 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 }
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index fc2d5a1479e..8a6fb18713a 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1367,7 +1367,7 @@ msgstr ""
msgid "ClusterIntegration|Add a Kubernetes cluster integration"
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 ""
msgid "ClusterIntegration|Adding an integration to your group will share the cluster across all your projects."
@@ -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}."
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}."
msgstr ""
@@ -1703,9 +1700,6 @@ msgstr ""
msgid "ClusterIntegration|Token"
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"
msgstr ""