30,997
edits
No edit summary |
|||
| Line 8: | Line 8: | ||
= Pour ajouter votre '''onglet''' = | = Pour ajouter votre '''onglet''' = | ||
Dans un premier temps, vous devez identifier le type de l'objet sur lequel porte l'onglet à ajouter, supprimer ou modifier et son code 'objecttype'. Pour cela, voici la liste: | |||
* 'thirdparty' to add a tab in third party view | * 'thirdparty' to add a tab in third party view | ||
* 'intervention' to add a tab in intervention view | * 'intervention' to add a tab in intervention view | ||
| Line 26: | Line 25: | ||
* 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) | * 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) | ||
Pour ajouter votre propre onglet, créer un module et son fichier descripteur. Voir la page [[Dévelopement module]] pour cela. | |||
Ensuite dans le descripteur de fichier, éditer la propriétés this->tab pour ajouter votre onglet en suivant la syntaxe: | |||
<source lang="php"> | <source lang="php"> | ||
$this->tabs = array( | $this->tabs = array( | ||
'objecttype:+ | 'objecttype:+tabname:TitleOfTab:@mymodule:conditiontohavetab:urlfortab?id=__ID__' | ||
); | ); | ||
</source> | </source> | ||
Example: | |||
<source lang="php"> | |||
$this->tabs = array( | |||
'objecttype:+tabname1:Title1:@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // Pour ajouter un onglet sur les objects de type objecttype, onglet identifié par l'id tabname1 | |||
'objecttype:+tabname2:Title2:@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // Pour ajouter un onglet sur les objects de type objecttype, onglet identifié par l'id tabname2 | |||
); | |||
</source> | |||
Activer ce module. | |||
Tester. | |||
= To remove an existing '''tab''' = | = To remove an existing '''tab''' = | ||