From 93f5a64c97e36f9142dc7e7c9463cad4dea62ad2 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Thu, 12 Mar 2020 11:51:24 +0100 Subject: [PATCH] chg: [galaxyCluster:view] Migrated to use the genericElement factory --- app/View/Galaxies/view.ctp | 2 - app/View/GalaxyClusters/view.ctp | 66 +++++++++++--------------------- 2 files changed, 23 insertions(+), 45 deletions(-) diff --git a/app/View/Galaxies/view.ctp b/app/View/Galaxies/view.ctp index 0609e3fa6..ac6a8fece 100644 --- a/app/View/Galaxies/view.ctp +++ b/app/View/Galaxies/view.ctp @@ -1,8 +1,6 @@ element('/genericElements/SideMenu/side_menu', array('menuList' => 'galaxies', 'menuItem' => 'view')); -?> - __('Galaxy ID'), 'value' => $galaxy['Galaxy']['id']); $table_data[] = array('key' => __('Name'), 'value' => $galaxy['Galaxy']['name']); diff --git a/app/View/GalaxyClusters/view.ctp b/app/View/GalaxyClusters/view.ctp index a2d9021da..693ee8abe 100755 --- a/app/View/GalaxyClusters/view.ctp +++ b/app/View/GalaxyClusters/view.ctp @@ -1,53 +1,33 @@ element('/genericElements/SideMenu/side_menu', array('menuList' => 'galaxies', 'menuItem' => 'view_cluster')); + + $table_data = array(); + $table_data[] = array('key' => __('Cluster ID'), 'value' => $cluster['GalaxyCluster']['id']); + $table_data[] = array('key' => __('Name'), 'value' => $cluster['GalaxyCluster']['value']); + $table_data[] = array('key' => __('Parent Galaxy'), 'value' => $cluster['Galaxy']['name'] ? $cluster['Galaxy']['name'] : $cluster['Galaxy']['type']); + $table_data[] = array('key' => __('Description'), 'value' => $cluster['GalaxyCluster']['description']); + $table_data[] = array('key' => __('UUID'), 'value' => $cluster['GalaxyCluster']['uuid']); + $table_data[] = array('key' => __('Collection UUID'), 'value' => $cluster['GalaxyCluster']['collection_uuid']); + $table_data[] = array('key' => __('Source'), 'value' => $cluster['GalaxyCluster']['source']); + $table_data[] = array('key' => __('Authors'), 'value' => !empty($cluster['GalaxyCluster']['authors']) ? implode(', ', $cluster['GalaxyCluster']['authors']) : __('N/A')); + $table_data[] = array('key' => __('Connector tag'), 'value' => $cluster['GalaxyCluster']['tag_name']); + $table_data[] = array('key' => __('Events'), 'html' => isset($cluster['GalaxyCluster']['tag_count']) ? + sprintf('%s %s', + sprintf('%s/events/index/searchtag:%s', $baseurl, h($cluster['GalaxyCluster']['tag_id'])), + h($cluster['GalaxyCluster']['tag_count']), + __('event(s)') + ): + '0' + ); ?> -
+ +

- +

-
-
-
-
-
-
-
-
-
 
-
-
 
-
-
 
-
-
 
-
-
- -
-
-
-
-
- - event(s) - -
-
+ element('genericElements/viewMetaTable', array('table_data' => $table_data)); ?>