chg: [galaxy:index] Cleaned up artifacts from galaxy2.0

pull/5699/head
mokaddem 2020-03-12 11:19:35 +01:00
parent 020f9fe061
commit cd590121f8
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
3 changed files with 1 additions and 37 deletions

View File

@ -19,17 +19,10 @@ class GalaxiesController extends AppController
public function index()
{
$aclConditions = array();
// $aclConditions = $this->Galaxy->buildConditions($this->Auth->user());
$filters = $this->IndexFilter->harvestParameters(array('context', 'value'));
$contextConditions = array();
if (empty($filters['context'])) {
$filters['context'] = 'all';
} else {
if ($filters['context'] == 'altered') { // only include galaxies that have modified galaxyCluster
$contextConditions = array(
'GalaxyCluster.default' => false
);
}
}
$searchConditions = array();
if (empty($filters['value'])) {
@ -47,7 +40,7 @@ class GalaxiesController extends AppController
);
}
if ($this->_isRest()) {
$galaxies = $this->Galaxy->find('all',
$galaxies = $this->Galaxy->find('all',
array(
'recursive' => -1,
'conditions' => array(
@ -60,12 +53,7 @@ class GalaxiesController extends AppController
$this->paginate['conditions']['AND'][] = $contextConditions;
$this->paginate['conditions']['AND'][] = $searchConditions;
$this->paginate['conditions']['AND'][] = $aclConditions;
// $this->paginate['contain'] = array('Org', 'Orgc');
$galaxies = $this->paginate();
// foreach ($galaxies as $k => $galaxy) {
// $galaxies[$k] = $this->Galaxy->attachExtendByInfo($this->Auth->user(), $galaxies[$k]);
// $galaxies[$k] = $this->Galaxy->attachExtendFromInfo($this->Auth->user(), $galaxies[$k]);
// }
$this->set('galaxyList', $galaxies);
$this->set('context', $filters['context']);
$this->set('searchall', $filters['value']);

View File

@ -24,25 +24,6 @@
<span class="<?php echo $this->FontAwesome->findNamespace($galaxy['Galaxy']['icon']); ?> fa-<?php echo h($galaxy['Galaxy']['icon']); ?>"></span>&nbsp;
<?php echo h($galaxy['Galaxy']['name']); ?> galaxy
</h2>
<?php if (!empty($galaxy['Galaxy']['extended_from'])): ?>
<h5 style="padding-left: 10px;">
<?php
echo $this->element('genericElements/IndexTable/Fields/extended_by', array(
'row' => $galaxy,
'field' => array(
'parent' => '',
'url' => $baseurl . '/galaxies/view/%s',
'data_path' => 'Galaxy.extended_from.Galaxy.uuid',
'title' => sprintf('%s > %s', $galaxy['Galaxy']['extended_from']['Galaxy']['namespace'], $galaxy['Galaxy']['extended_from']['Galaxy']['name']),
'fields' => array(
'extend_data_path' => 'Galaxy.extended_from',
'extend_link_path' => 'Galaxy.uuid',
)
)
));
?>
</h5>
<?php endif; ?>
<?php echo $this->element('genericElements/viewMetaTable', array('table_data' => $table_data)); ?>
<?php echo $kco; ?>
</div>

File diff suppressed because one or more lines are too long