Display import button only for LSobject type with configured ioFormat

This commit is contained in:
Benjamin Renard 2015-07-30 18:13:07 +02:00
parent 939863465f
commit d7ca2eea75

View file

@ -140,12 +140,14 @@ if(LSsession :: startLSsession()) {
'url' => 'create.php?LSobject='.$LSobject, 'url' => 'create.php?LSobject='.$LSobject,
'action' => 'create' 'action' => 'create'
); );
if (!empty($object -> listValidIOformats())) {
$LSview_actions['import'] = array ( $LSview_actions['import'] = array (
'label' => 'Import', 'label' => 'Import',
'url' => 'import.php?LSobject='.$LSobject, 'url' => 'import.php?LSobject='.$LSobject,
'action' => 'import' 'action' => 'import'
); );
} }
}
$LSview_actions['refresh'] = array ( $LSview_actions['refresh'] = array (
'label' => 'Refresh', 'label' => 'Refresh',
'url' => 'view.php?LSobject='.$LSobject.'&refresh', 'url' => 'view.php?LSobject='.$LSobject.'&refresh',