Skip to content

Commit

Permalink
Fix position of resource menu
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 24, 2017
1 parent e257da6 commit 6b65a9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions htdocs/core/modules/modResource.class.php
Expand Up @@ -226,7 +226,7 @@ public function __construct($db)
'type'=> 'left', // Toujours un menu gauche
'titre'=> 'MenuResourceAdd',
'mainmenu'=> 'tools',
'leftmenu'=> '', // On n'indique rien ici car on ne souhaite pas intégrer de sous-menus à ce menu
'leftmenu'=> 'resource_add',
'url'=> '/resource/add.php',
'langs'=> 'resource',
'position'=> 101,
Expand All @@ -241,7 +241,7 @@ public function __construct($db)
'type'=> 'left', // Toujours un menu gauche
'titre'=> 'List',
'mainmenu'=> 'tools',
'leftmenu'=> '', // On n'indique rien ici car on ne souhaite pas intégrer de sous-menus à ce menu
'leftmenu'=> 'resource_list',
'url'=> '/resource/list.php',
'langs'=> 'resource',
'position'=> 102,
Expand All @@ -255,7 +255,7 @@ public function __construct($db)
// Exports
//--------
$r=0;

$r++;
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]="ResourceSingular"; // Translation key (used only if key ExportDataset_xxx_z not found)
Expand All @@ -265,19 +265,19 @@ public function __construct($db)
$this->export_entities_array[$r]=array('r.rowid'=>'resource','r.ref'=>'resource','c.code'=>'resource','c.label'=>'resource','r.description'=>'resource','r.note_private'=>"resource",'r.resource'=>"resource",'r.asset_number'=>'resource','r.datec'=>"resource",'r.tms'=>"resource");
$keyforselect='resource'; $keyforelement='resource'; $keyforaliasextra='extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';

$this->export_dependencies_array[$r]=array('resource'=>array('r.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them.
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'resource as r ';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_resource as c ON c.rowid=r.fk_code_type_resource';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'resource_extrafields as extra ON extra.fk_object = c.rowid';
$this->export_sql_end[$r] .=' AND r.entity IN ('.getEntity('resource').')';


// Imports
//--------
$r=0;

// Import list of third parties and attributes
$r++;
$this->import_code[$r]=$this->rights_class.'_'.$r;
Expand Down Expand Up @@ -307,7 +307,7 @@ public function __construct($db)
$this->import_regex_array[$r]=array('s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');
$this->import_examplevalues_array[$r]=array('r.ref'=>"REF1",'r.fk_code_type_resource'=>"Code from dictionary resource type",'r.datec'=>"2017-01-01 or 2017-01-01 12:30:00");
$this->import_updatekeys_array[$r]=array('r.rf'=>'ResourceFormLabel_ref');

}

/**
Expand Down
Expand Up @@ -253,7 +253,7 @@ public function __construct($db)
'type'=>'left', // This is a Left menu entry
'titre'=>'List MyObject',
'mainmenu'=>'mymodule',
'leftmenu'=>'mymodule',
'leftmenu'=>'mymodule_myobject_list',
'url'=>'/mymodule/myobject_list.php',
'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
Expand All @@ -265,7 +265,7 @@ public function __construct($db)
'type'=>'left', // This is a Left menu entry
'titre'=>'New MyObject',
'mainmenu'=>'mymodule',
'leftmenu'=>'mymodule',
'leftmenu'=>'mymodule_myobject_new',
'url'=>'/mymodule/myobject_page.php?action=create',
'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
Expand Down

0 comments on commit 6b65a9a

Please sign in to comment.