From 459758921faefa10c475c4691faa4d388eb00df8 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Thu, 13 Dec 2018 20:53:15 +1300 Subject: Move description of cluster type to presenter --- app/presenters/clusters/cluster_presenter.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/presenters') diff --git a/app/presenters/clusters/cluster_presenter.rb b/app/presenters/clusters/cluster_presenter.rb index 7e6eccb648c..0473bb8c72a 100644 --- a/app/presenters/clusters/cluster_presenter.rb +++ b/app/presenters/clusters/cluster_presenter.rb @@ -12,6 +12,14 @@ module Clusters can?(current_user, :update_cluster, cluster) && created? end + def cluster_type_description + if cluster.project_type? + s_("ClusterIntegration|Project cluster") + elsif cluster.group_type? + s_("ClusterIntegration|Group cluster") + end + end + def show_path if cluster.project_type? project_cluster_path(project, cluster) -- cgit v1.2.3