* GPL v3+ — siehe COPYING */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; class modEplan extends DolibarrModules { public function __construct($db) { global $conf, $langs; $this->db = $db; $this->numero = 500037; $this->rights_class = 'eplan'; $this->family = "other"; $this->module_position = '91'; $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "Aufmaß-Tab auf Aufträgen und Kundenkarten — Verknüpfung zur ElektroPlan PWA."; $this->descriptionlong = "Fügt Aufträgen und Kundenkarten einen Reiter 'Aufmaß' hinzu. Zeigt verknüpfte Grundrisse, öffnet die ElektroPlan PWA mit Auftrags-Kontext und ermöglicht PDF-Export direkt als Dolibarr-Dokument."; $this->editor_name = 'Alles Watt läuft'; $this->editor_url = ''; $this->version = '1.1.0'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->picto = 'fa-drafting-compass'; $this->module_parts = array( 'triggers' => 0, 'login' => 0, 'substitutions' => 0, 'menus' => 0, 'tpl' => 0, 'barcode' => 0, 'models' => 0, 'printing' => 0, 'theme' => 0, 'css' => array(), 'js' => array(), 'hooks' => array(), 'moduleforexternal' => 0, ); $this->dirs = array(); $this->config_page_url = array("setup.php@eplan"); $this->hidden = false; $this->depends = array(); $this->requiredby = array(); $this->conflictwith = array(); $this->langfiles = array("eplan@eplan"); $this->phpmin = array(7, 4); $this->need_dolibarr_version = array(19, 0); $this->need_javascript_ajax = 0; // Konstanten $this->const = array( 0 => array('EPLAN_PWA_URL', 'chaine', '', 'URL zur ElektroPlan PWA', 0, 'current', 0), 1 => array('EPLAN_TAB_ON_ORDER', 'chaine', '1', 'Tab Aufmaß auf Aufträgen', 0, 'current', 0), 2 => array('EPLAN_TAB_ON_THIRDPARTY', 'chaine', '1', 'Tab Aufmaß auf Kundenkarten', 0, 'current', 0), ); // Tabs auf Auftrag + Kundenkarte $this->tabs = array( 'order:+aufmass:Aufmaß:eplan@eplan:$user->hasRight("eplan","read"):/custom/eplan/aufmass_order.php?id=__ID__', 'thirdparty:+aufmass:Aufmaß:eplan@eplan:$user->hasRight("eplan","read"):/custom/eplan/aufmass_thirdparty.php?socid=__ID__', ); // Rechte $this->rights = array(); $r = 0; $this->rights[$r][0] = $this->numero + 0; $this->rights[$r][1] = 'Aufmaß einsehen'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 1; $this->rights[$r][4] = 'read'; $r++; $this->rights[$r][0] = $this->numero + 1; $this->rights[$r][1] = 'Aufmaß bearbeiten'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 1; $this->rights[$r][4] = 'write'; $r++; $this->rights[$r][0] = $this->numero + 2; $this->rights[$r][1] = 'Eplan Einstellungen verwalten'; $this->rights[$r][2] = 'a'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'admin'; $r++; // Menü $this->menu = array(); $r = 0; $this->menu[$r] = array( 'fk_menu' => 'fk_mainmenu=tools', 'type' => 'left', 'titre' => 'Eplan', 'prefix' => '', 'mainmenu' => 'tools', 'leftmenu' => 'eplan', 'url' => '/custom/eplan/admin/setup.php', 'langs' => 'eplan@eplan', 'position' => 100, 'enabled' => 'isModEnabled("eplan")', 'perms' => '$user->hasRight("eplan","read")', 'target' => '', 'user' => 0, ); } public function init($options = '') { $this->_load_tables('/install/mysql/', 'eplan'); return $this->_init(array(), $options); } public function remove($options = '') { return $this->_remove(array(), $options); } }