diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-12-13 20:53:15 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-12-13 20:53:15 +1300 |
commit | 459758921faefa10c475c4691faa4d388eb00df8 (patch) | |
tree | 2ed204c55d211c340f5b0baa6078043897b19795 /app/presenters | |
parent | e7a6b841684f9a2929b16176b223ea44bfc26332 (diff) | |
download | gitlab-ce-459758921faefa10c475c4691faa4d388eb00df8.tar.gz |
Move description of cluster type to presenter
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/clusters/cluster_presenter.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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) |