diff --git a/htdocs/core/modules/modTicketsup.class.php b/htdocs/core/modules/modTicketsup.class.php index 7e824cdf47b..4b79d472324 100644 --- a/htdocs/core/modules/modTicketsup.class.php +++ b/htdocs/core/modules/modTicketsup.class.php @@ -161,37 +161,31 @@ class modTicketsup extends DolibarrModules // Permissions $this->rights = array(); // Permission array used by this module - $r = 0; - $r++; $this->rights[$r][0] = 56001; // id de la permission $this->rights[$r][1] = "Read ticket"; // libelle de la permission $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 1; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'read'; - $r++; $this->rights[$r][0] = 56002; // id de la permission $this->rights[$r][1] = "Create les tickets"; // libelle de la permission $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'write'; - $r++; $this->rights[$r][0] = 56003; // id de la permission $this->rights[$r][1] = "Delete les tickets"; // libelle de la permission $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'delete'; - $r++; $this->rights[$r][0] = 56004; // id de la permission $this->rights[$r][1] = "Manage tickets"; // libelle de la permission //$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'manage'; - $r++; $this->rights[$r][0] = 56005; // id de la permission $this->rights[$r][1] = 'See all tickets, even if not assigned to (not effective for external users, always restricted to the thirdpardy they depends on)'; // libelle de la permission $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) @@ -211,7 +205,7 @@ class modTicketsup extends DolibarrModules 'url' => '/ticketsup/index.php', 'langs' => 'ticketsup', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position' => 100, - 'enabled' => '1', // Define condition to show or hide menu entry. Use '$conf->ticketsup->enabled' if entry must be visible if module is enabled. + 'enabled' => '$conf->ticketsup->enabled', // Define condition to show or hide menu entry. Use '$conf->ticketsup->enabled' if entry must be visible if module is enabled. 'perms' => '$user->rights->ticketsup->read', // Use 'perms'=>'$user->rights->ticketsup->level1->level2' if you want your menu with a permission rules 'target' => '', 'user' => 2); // 0=Menu for internal users, 1=external users, 2=both @@ -225,7 +219,7 @@ class modTicketsup extends DolibarrModules 'url' => '/ticketsup/index.php', 'langs' => 'ticketsup', 'position' => 101, - 'enabled' => 1, + 'enabled' => '$conf->ticketsup->enabled', 'perms' => '$user->rights->ticketsup->read', 'target' => '', 'user' => 2); @@ -238,7 +232,7 @@ class modTicketsup extends DolibarrModules 'url' => '/ticketsup/new.php?action=create_ticket', 'langs' => 'ticketsup', 'position' => 102, - 'enabled' => 1, + 'enabled' => '$conf->ticketsup->enabled', 'perms' => '$user->rights->ticketsup->write', 'target' => '', 'user' => 2); @@ -252,7 +246,7 @@ class modTicketsup extends DolibarrModules 'url' => '/ticketsup/list.php', 'langs' => 'ticketsup', 'position' => 103, - 'enabled' => 1, + 'enabled' => '$conf->ticketsup->enabled', 'perms' => '$user->rights->ticketsup->read', 'target' => '', 'user' => 2); @@ -266,7 +260,7 @@ class modTicketsup extends DolibarrModules 'url' => '/ticketsup/list.php?search_fk_status=non_closed', 'langs' => 'ticketsup', 'position' => 104, - 'enabled' => 1, + 'enabled' => '$conf->ticketsup->enabled', 'perms' => '$user->rights->ticketsup->read', 'target' => '', 'user' => 2); @@ -280,7 +274,7 @@ class modTicketsup extends DolibarrModules 'url' => '/ticketsup/list.php?mode=my_assign', 'langs' => 'ticketsup', 'position' => 105, - 'enabled' => 1, + 'enabled' => '$conf->ticketsup->enabled', 'perms' => '$user->rights->ticketsup->read', 'target' => '', 'user' => 0); @@ -293,7 +287,7 @@ class modTicketsup extends DolibarrModules 'url' => '/ticketsup/list.php?mode=my_assign&search_fk_status=non_closed', 'langs' => 'ticketsup', 'position' => 106, - 'enabled' => 1, + 'enabled' => '$conf->ticketsup->enabled', 'perms' => '$user->rights->ticketsup->read', 'target' => '', 'user' => 0); diff --git a/htdocs/theme/eldy/img/menus/ticketsup.png b/htdocs/theme/eldy/img/menus/ticketsup.png new file mode 100644 index 00000000000..03354cc98e0 Binary files /dev/null and b/htdocs/theme/eldy/img/menus/ticketsup.png differ diff --git a/htdocs/theme/eldy/img/menus_black/ticketsup.png b/htdocs/theme/eldy/img/menus_black/ticketsup.png new file mode 100644 index 00000000000..3ec332075e6 Binary files /dev/null and b/htdocs/theme/eldy/img/menus_black/ticketsup.png differ diff --git a/htdocs/theme/eldy/img/title_ticketsup.png b/htdocs/theme/eldy/img/title_ticketsup.png new file mode 100644 index 00000000000..3ec332075e6 Binary files /dev/null and b/htdocs/theme/eldy/img/title_ticketsup.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 136cb5c0ab5..cba140486db 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1675,6 +1675,10 @@ div.mainmenu.project { background-image: url(); } +div.mainmenu.ticketsup { + background-image: url(); +} + div.mainmenu.tools { background-image: url(); } @@ -1686,10 +1690,11 @@ div.mainmenu.website { 'name of class for div') -$moduletomainmenu=array('user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial', +$moduletomainmenu=array( + 'user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial', 'produit'=>'products','service'=>'products','stock'=>'products', 'don'=>'accountancy','tax'=>'accountancy','banque'=>'accountancy','facture'=>'accountancy','compta'=>'accountancy','accounting'=>'accountancy','adherent'=>'members','import'=>'tools','export'=>'tools','mailing'=>'tools', - 'contrat'=>'commercial','ficheinter'=>'commercial','deplacement'=>'commercial', + 'contrat'=>'commercial','ficheinter'=>'commercial','ticketsup'=>'ticketsup','deplacement'=>'commercial', 'fournisseur'=>'companies', 'barcode'=>'','fckeditor'=>'','categorie'=>'', ); @@ -1705,7 +1710,7 @@ $generic=1; // Put here list of menu entries when the div.mainmenu.menuentry was previously defined $divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','ftp','holiday','hrm','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','stripe','webservices','website'); // Put here list of menu entries we are sure we don't want -$divnotrequired=array('multicurrency','salaries','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition'); +$divnotrequired=array('multicurrency','salaries','ticketsup','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition'); foreach($mainmenuusedarray as $val) { if (empty($val) || in_array($val,$divalreadydefined)) continue; diff --git a/htdocs/theme/md/img/ticketsup.png b/htdocs/theme/md/img/ticketsup.png new file mode 100644 index 00000000000..3ee928e07b3 Binary files /dev/null and b/htdocs/theme/md/img/ticketsup.png differ diff --git a/htdocs/theme/md/img/title_ticketsup.png b/htdocs/theme/md/img/title_ticketsup.png new file mode 100644 index 00000000000..3ec332075e6 Binary files /dev/null and b/htdocs/theme/md/img/title_ticketsup.png differ diff --git a/htdocs/ticketsup/index.php b/htdocs/ticketsup/index.php index e596d9149c1..37cf7bf959c 100644 --- a/htdocs/ticketsup/index.php +++ b/htdocs/ticketsup/index.php @@ -67,9 +67,13 @@ $object = new ActionsTicketsup($db); * View */ +$form = new Form($db); + llxHeader('', $langs->trans('TicketsIndex'), ''); -$form = new Form($db); +$linkback=''; +print load_fiche_titre($langs->trans('TicketsIndex'),$linkback,'title_ticketsup.png'); + $dir = ''; $filenamenb = $dir . "/" . $prefix . "ticketsupinyear-" . $endyear . ".png";