/** * Return array head with list of tabs to view object informations * * @param Object $object Holiday * @return array head */ function holiday_prepare_head($object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/holiday/card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; // Attachments require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $upload_dir = $conf->holiday->multidir_output[$object->entity] . '/' . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\\.meta|_preview\\.png)$')); $head[$h][0] = DOL_URL_ROOT . '/holiday/document.php?id=' . $object->id; $head[$h][1] = $langs->trans('Documents'); if ($nbFiles > 0) { $head[$h][1] .= ' <span class="badge">' . $nbFiles . '</span>'; } $head[$h][2] = 'documents'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'holiday'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'holiday', 'remove'); return $head; }
/** * \file htdocs/lib/categories.lib.php * \brief Ensemble de fonctions de base pour le module categorie * \ingroup categorie * \version $Id: categories.lib.php,v 1.2 2011/07/31 23:26:02 eldy Exp $ * * Ensemble de fonctions de base de dolibarr sous forme d'include */ function categories_prepare_head($object,$type) { global $langs, $conf, $user; $langs->load("categories"); $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; $head[$h][0] = DOL_URL_ROOT.'/categories/photos.php?id='.$object->id.'&type='.$type; $head[$h][1] = $langs->trans("Photos"); $head[$h][2] = 'photos'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type); return $head; }
/** * Prepare array with list of different ecm main dashboard * * @param object $object Object related to tabs * @return array Array of tabs to show */ function ecm_prepare_dasboard_head($object) { global $langs, $conf, $user, $form; global $helptext1, $helptext2; $h = 0; $head = array(); $helptext = $langs->trans("ECMAreaDesc") . '<br>'; $helptext .= $langs->trans("ECMAreaDesc2"); $head[$h][0] = DOL_URL_ROOT . '/ecm/index.php'; $head[$h][1] = $langs->trans("ECMSectionsManual") . $form->textwithpicto('', $helptext, 1, 'info', '', 0, 3); $head[$h][2] = 'index'; $h++; if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { $head[$h][0] = DOL_URL_ROOT . '/ecm/index_auto.php'; $head[$h][1] = $langs->trans("ECMSectionsAuto") . $form->textwithpicto('', $helptext, 1, 'info', '', 0, 3); $head[$h][2] = 'index_auto'; $h++; } // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'ecm'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'ecm', 'remove'); return $head; }
/** * \file lib/mymodule.lib.php * \ingroup mymodule * \brief This file is an example module library * Put some comments here */ function mymoduleAdminPrepareHead() { global $langs, $conf; $langs->load("mymodule@mymodule"); $h = 0; $head = array(); $head[$h][0] = dol_buildpath("/mymodule/admin/admin_mymodule.php", 1); $head[$h][1] = $langs->trans("Settings"); $head[$h][2] = 'settings'; $h++; $head[$h][0] = dol_buildpath("/mymodule/admin/about.php", 1); $head[$h][1] = $langs->trans("About"); $head[$h][2] = 'about'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( // 'entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__' //); // to add new tab //$this->tabs = array( // 'entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__' //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'mymodule'); return $head; }
/** * Initialize the array of tabs for customer invoice * * @param Facture $object Invoice object * @return array Array of head tabs */ function facture_prepare_head($object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/compta/facture.php?facid=' . $object->id; $head[$h][1] = $langs->trans('CardBill'); $head[$h][2] = 'compta'; $h++; if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $head[$h][0] = DOL_URL_ROOT . '/compta/facture/contact.php?facid=' . $object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); $head[$h][2] = 'contact'; $h++; } if (!empty($conf->global->MAIN_USE_PREVIEW_TABS)) { $head[$h][0] = DOL_URL_ROOT . '/compta/facture/apercu.php?facid=' . $object->id; $head[$h][1] = $langs->trans('Preview'); $head[$h][2] = 'preview'; $h++; } //if ($fac->mode_reglement_code == 'PRE') if ($conf->prelevement->enabled) { $head[$h][0] = DOL_URL_ROOT . '/compta/facture/prelevement.php?facid=' . $object->id; $head[$h][1] = $langs->trans('StandingOrders'); $head[$h][2] = 'standingorders'; $h++; } if ($conf->Ego->enabled && $user->rights->ego->paiment->create) { $langs->load('ego@ego'); $head[$h][0] = dol_buildpath('/ego/paiment.php?facid=' . $object->id, 1); $head[$h][1] = $langs->trans('EgoPay'); $head[$h][2] = 'egopay'; $h++; } // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'invoice'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $head[$h][0] = DOL_URL_ROOT . '/compta/facture/note.php?facid=' . $object->id; $head[$h][1] = $langs->trans('Notes'); $head[$h][2] = 'note'; $h++; } $head[$h][0] = DOL_URL_ROOT . '/compta/facture/document.php?facid=' . $object->id; /* $filesdir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($fac->ref); include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); $listoffiles=dol_dir_list($filesdir,'files',1); $head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents')); */ $head[$h][1] = $langs->trans('Documents'); $head[$h][2] = 'documents'; $h++; $head[$h][0] = DOL_URL_ROOT . '/compta/facture/info.php?facid=' . $object->id; $head[$h][1] = $langs->trans('Info'); $head[$h][2] = 'info'; $h++; return $head; }
/** * Prepare array with list of tabs * * @param ChargeSociales $object Object related to tabs * @return array Array of tabs to show */ function tax_prepare_head(ChargeSociales $object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/compta/sociales/charges.php?id=' . $object->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'tax'); require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $upload_dir = $conf->tax->dir_output . "/" . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\\.meta|_preview\\.png)$')); $head[$h][0] = DOL_URL_ROOT . '/compta/sociales/document.php?id=' . $object->id; $head[$h][1] = $langs->trans("Documents"); if ($nbFiles > 0) { $head[$h][1] .= ' <span class="badge">' . $nbFiles . '</span>'; } $head[$h][2] = 'documents'; $h++; $head[$h][0] = DOL_URL_ROOT . '/compta/sociales/info.php?id=' . $object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'tax', 'remove'); return $head; }
/** * \file lib/propalautosend.lib.php * \ingroup propalautosend * \brief This file is an example module library * Put some comments here */ function propalautosendAdminPrepareHead() { global $langs, $conf; $langs->load("propalautosend@propalautosend"); $h = 0; $head = array(); $head[$h][0] = dol_buildpath("/propalautosend/admin/propalautosend_setup.php", 1); $head[$h][1] = $langs->trans("Parameters"); $head[$h][2] = 'settings'; $h++; $head[$h][0] = dol_buildpath("/propalautosend/admin/propalautosend_about.php", 1); $head[$h][1] = $langs->trans("About"); $head[$h][2] = 'about'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( // 'entity:+tabname:Title:@propalautosend:/propalautosend/mypage.php?id=__ID__' //); // to add new tab //$this->tabs = array( // 'entity:-tabname:Title:@propalautosend:/propalautosend/mypage.php?id=__ID__' //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'propalautosend'); return $head; }
/** * \file lib/dolidacticiel.lib.php * \ingroup dolidacticiel * \brief This file is an example module library * Put some comments here */ function dolidacticielAdminPrepareHead() { global $langs, $conf; $langs->load("dolidacticiel@dolidacticiel"); $h = 0; $head = array(); $head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_setup.php", 1); $head[$h][1] = $langs->trans("Achievements"); $head[$h][2] = 'ggwp'; $h++; $head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_others.php", 1); $head[$h][1] = $langs->trans("DolidacticielOthersTests"); $head[$h][2] = 'otherstests'; $h++; $head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_admin.php", 1); $head[$h][1] = $langs->trans("DolidacticielAdmin"); $head[$h][2] = 'create'; $h++; $head[$h][0] = dol_buildpath("/dolidacticiel/admin/dolidacticiel_about.php", 1); $head[$h][1] = $langs->trans("About"); $head[$h][2] = 'about'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( // 'entity:+tabname:Title:@dolidacticiel:/dolidacticiel/mypage.php?id=__ID__' //); // to add new tab //$this->tabs = array( // 'entity:-tabname:Title:@dolidacticiel:/dolidacticiel/mypage.php?id=__ID__' //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'dolidacticiel'); return $head; }
/** * \file htdocs/lib/invoice.lib.php * \brief Ensemble de fonctions de base pour le module factures * \ingroup invoice * \version $Id: invoice.lib.php,v 1.15 2011/07/31 23:25:41 eldy Exp $ * * * Ensemble de fonctions de base de dolibarr sous forme d'include */ function facture_prepare_head($object) { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$object->id; $head[$h][1] = $langs->trans('CardBill'); $head[$h][2] = 'compta'; $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id; $head[$h][1] = $langs->trans('BillContacts'); $head[$h][2] = 'contact'; $h++; if ($conf->use_preview_tabs) { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$object->id; $head[$h][1] = $langs->trans('Preview'); $head[$h][2] = 'preview'; $h++; } //if ($fac->mode_reglement_code == 'PRE') if ($conf->prelevement->enabled) { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id; $head[$h][1] = $langs->trans('StandingOrders'); $head[$h][2] = 'standingorders'; $h++; } // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice'); $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id; $head[$h][1] = $langs->trans('Notes'); $head[$h][2] = 'note'; $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id; /*$filesdir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($fac->ref); include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php'); $listoffiles=dol_dir_list($filesdir,'files',1); $head[$h][1] = (sizeof($listoffiles)?$langs->trans('DocumentsNb',sizeof($listoffiles)):$langs->trans('Documents'));*/ $head[$h][1] = $langs->trans('Documents'); $head[$h][2] = 'documents'; $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$object->id; $head[$h][1] = $langs->trans('Info'); $head[$h][2] = 'info'; $h++; return $head; }
/** * Prepare array with list of tabs * * @param BonPrelevement $object Object related to tabs * @return array Array of tabs to show */ function prelevement_prepare_head(BonPrelevement $object) { global $langs, $conf, $user; $langs->load("withdrawals"); $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/compta/prelevement/card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'prelevement'; $h++; $head[$h][0] = DOL_URL_ROOT . '/compta/prelevement/factures.php?id=' . $object->id; $head[$h][1] = $langs->trans("Bills"); $head[$h][2] = 'invoices'; $h++; $head[$h][0] = DOL_URL_ROOT . '/compta/prelevement/fiche-rejet.php?id=' . $object->id; $head[$h][1] = $langs->trans("Rejects"); $head[$h][2] = 'rejects'; $h++; $head[$h][0] = DOL_URL_ROOT . '/compta/prelevement/fiche-stat.php?id=' . $object->id; $head[$h][1] = $langs->trans("Statistics"); $head[$h][2] = 'statistics'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'prelevement'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'prelevement', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @param Object $object Object related to tabs * @return array Array of tabs to shoc */ function trip_prepare_head($object) { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/fiche.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'trip'); $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/document.php?id=' . $object->id; $head[$h][1] = $langs->trans("Documents"); $head[$h][2] = 'documents'; $h++; $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/info.php?id=' . $object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'trip', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @param Donation $object Donation * @return array Array of tabs to show */ function donation_prepare_head($object) { global $db, $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/don/card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation'); require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $upload_dir = $conf->don->dir_output . '/' . get_exdir($filename, 2, 0, 1, $object, 'donation') . '/' . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\\.meta|_preview\\.png)$')); $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT . '/don/document.php?id=' . $object->id; $head[$h][1] = $langs->trans('Documents'); if ($nbFiles + $nbLinks > 0) { $head[$h][1] .= ' <span class="badge">' . ($nbFiles + $nbLinks) . '</span>'; } $head[$h][2] = 'documents'; $h++; $head[$h][0] = DOL_URL_ROOT . '/don/info.php?id=' . $object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @param Contact $object Object related to tabs * @return array Array of tabs to show */ function contact_prepare_head(Contact $object) { global $db, $langs, $conf, $user; $tab = 0; $head = array(); $head[$tab][0] = DOL_URL_ROOT . '/contact/card.php?id=' . $object->id; $head[$tab][1] = $langs->trans("Card"); $head[$tab][2] = 'card'; $tab++; if (!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_CONTACT_ACTIVE)) { $langs->load("ldap"); $head[$tab][0] = DOL_URL_ROOT . '/contact/ldap.php?id=' . $object->id; $head[$tab][1] = $langs->trans("LDAPCard"); $head[$tab][2] = 'ldap'; $tab++; } $head[$tab][0] = DOL_URL_ROOT . '/contact/perso.php?id=' . $object->id; $head[$tab][1] = $langs->trans("PersonalInformations"); $head[$tab][2] = 'perso'; $tab++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $tab, 'contact'); // Notes if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = (empty($object->note_private) ? 0 : 1) + (empty($object->note_public) ? 0 : 1); $head[$tab][0] = DOL_URL_ROOT . '/contact/note.php?id=' . $object->id; $head[$tab][1] = $langs->trans("Note"); if ($nbNote > 0) { $head[$tab][1] .= ' <span class="badge">' . $nbNote . '</span>'; } $head[$tab][2] = 'note'; $tab++; } require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $upload_dir = $conf->societe->dir_output . "/contact/" . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\\.meta|_preview\\.png)$')); $nbLinks = Link::count($db, $object->element, $object->id); $head[$tab][0] = DOL_URL_ROOT . '/contact/document.php?id=' . $object->id; $head[$tab][1] = $langs->trans("Documents"); if ($nbFiles + $nbLinks > 0) { $head[$tab][1] .= ' <span class="badge">' . ($nbFiles + $nbLinks) . '</span>'; } $head[$tab][2] = 'documents'; $tab++; // Info $head[$tab][0] = DOL_URL_ROOT . '/contact/info.php?id=' . $object->id; $head[$tab][1] = $langs->trans("Info"); $head[$tab][2] = 'info'; $tab++; complete_head_from_modules($conf, $langs, $object, $head, $tab, 'contact', 'remove'); return $head; }
/** * Admin page tabs * * @return array Tabs to display */ function sentryAdminPrepareHead() { global $langs, $conf; $langs->load("sentry@sentry"); $h = 0; $head = array(); $head[$h][0] = dol_buildpath("/sentry/admin/about.php", 1); $head[$h][1] = $langs->trans("About"); $head[$h][2] = 'about'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'sentry'); return $head; }
/** * \file htdocs/lib/fichinter.lib.php * \brief Ensemble de fonctions de base pour le module fichinter * \ingroup fichinter * \version $Id: fichinter.lib.php,v 1.15 2011/07/31 23:25:17 eldy Exp $ * * Ensemble de fonctions de base de dolibarr sous forme d'include */ function fichinter_prepare_head($object) { global $langs, $conf, $user; $langs->load("fichinter"); $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT.'/fichinter/fiche.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; $head[$h][0] = DOL_URL_ROOT.'/fichinter/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('InterventionContact'); $head[$h][2] = 'contact'; $h++; if ($conf->use_preview_tabs) { $head[$h][0] = DOL_URL_ROOT.'/fichinter/apercu.php?id='.$object->id; $head[$h][1] = $langs->trans('Preview'); $head[$h][2] = 'preview'; $h++; } // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'intervention'); $head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); $head[$h][2] = 'note'; $h++; $head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); $head[$h][2] = 'documents'; $h++; $head[$h][0] = DOL_URL_ROOT.'/fichinter/info.php?id='.$object->id; $head[$h][1] = $langs->trans('Info'); $head[$h][2] = 'info'; $h++; return $head; }
/** * Enter description here... * * @param $object * @return array */ function stock_prepare_head($object) { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche.php?id='.$object->id; $head[$h][1] = $langs->trans("WarehouseCard"); $head[$h][2] = 'card'; $h++; $head[$h][0] = DOL_URL_ROOT.'/product/stock/mouvement.php?id='.$object->id; $head[$h][1] = $langs->trans("StockMovements"); $head[$h][2] = 'movements'; $h++; /* $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche-valo.php?id='.$object->id; $head[$h][1] = $langs->trans("EnhancedValue"); $head[$h][2] = 'value'; $h++; */ /* Disabled because will never be implemented. Table always empty. if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER) { // Should not be enabled by defaut because does not work yet correctly because // personnal stocks are not tagged into table llx_entrepot $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$object->id; $head[$h][1] = $langs->trans("Users"); $head[$h][2] = 'user'; $h++; } */ // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'stock'); $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; return $head; }
/** * Prepare array with list of tabs * * @param Contact $object Object related to tabs * @return array Array of tabs to show */ function contact_prepare_head(Contact $object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/contact/card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; if (!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_CONTACT_ACTIVE)) { $langs->load("ldap"); $head[$h][0] = DOL_URL_ROOT . '/contact/ldap.php?id=' . $object->id; $head[$h][1] = $langs->trans("LDAPCard"); $head[$h][2] = 'ldap'; $h++; } $head[$h][0] = DOL_URL_ROOT . '/contact/perso.php?id=' . $object->id; $head[$h][1] = $langs->trans("PersonalInformations"); $head[$h][2] = 'perso'; $h++; $head[$h][0] = DOL_URL_ROOT . '/contact/exportimport.php?id=' . $object->id; $head[$h][1] = $langs->trans("ExportImport"); $head[$h][2] = 'exportimport'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'contact'); // Notes $head[$h][0] = DOL_URL_ROOT . '/contact/note.php?id=' . $object->id; $head[$h][1] = $langs->trans("Note"); $head[$h][2] = 'note'; $h++; if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { $type = 4; $head[$h][0] = DOL_URL_ROOT . '/categories/categorie.php?id=' . $object->id . "&type=" . $type; $head[$h][1] = $langs->trans('Categories'); $head[$h][2] = 'category'; $h++; } // Info $head[$h][0] = DOL_URL_ROOT . '/contact/info.php?id=' . $object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'contact', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @param Object $object Object related to tabs * @return array Array of tabs to shoc */ function bank_prepare_head($object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/compta/bank/fiche.php?id=' . $object->id; $head[$h][1] = $langs->trans("AccountCard"); $head[$h][2] = 'bankname'; $h++; if ($object->type == 0 || $object->type == 1) { $head[$h][0] = DOL_URL_ROOT . '/compta/bank/bankid_fr.php?id=' . $object->id; $head[$h][1] = $langs->trans("RIB"); $head[$h][2] = 'bankid'; $h++; } $head[$h][0] = DOL_URL_ROOT . "/compta/bank/account.php?id=" . $object->id; $head[$h][1] = $langs->trans("Transactions"); $head[$h][2] = 'journal'; $h++; // if ($conf->global->MAIN_FEATURES_LEVEL >= 1) // { $head[$h][0] = DOL_URL_ROOT . "/compta/bank/treso.php?account=" . $object->id; $head[$h][1] = $langs->trans("PlannedTransactions"); $head[$h][2] = 'cash'; $h++; // } $head[$h][0] = DOL_URL_ROOT . "/compta/bank/annuel.php?account=" . $object->id; $head[$h][1] = $langs->trans("IOMonthlyReporting"); $head[$h][2] = 'annual'; $h++; $head[$h][0] = DOL_URL_ROOT . "/compta/bank/graph.php?account=" . $object->id; $head[$h][1] = $langs->trans("Graph"); $head[$h][2] = 'graph'; $h++; if ($object->courant != 2) { $head[$h][0] = DOL_URL_ROOT . "/compta/bank/releve.php?account=" . $object->id; $head[$h][1] = $langs->trans("AccountStatements"); $head[$h][2] = 'statement'; $h++; } // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank', 'remove'); return $head; }
/** * Define head array for tabs of marges tools setup pages * * @return Array of head */ function commissions_admin_prepare_head() { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/commissions/admin/commissions.php'; $head[$h][1] = $langs->trans("Parameters"); $head[$h][2] = 'parameters'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf, $langs, '', $head, $h, 'commissionsadmin'); return $head; }
/** * Prepare head for tabs * * @param Object $object Object * @return array Array of head entries */ function resourcePrepareHead($object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = dol_buildpath('/resource/card.php', 1) . '?id=' . $object->id; $head[$h][1] = $langs->trans("ResourceCard"); $head[$h][2] = 'resource'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource'); return $head; }
/** * Enter description here... * * @param $object * @return array */ function contact_prepare_head($object) { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT.'/contact/fiche.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; if ($conf->ldap->enabled && $conf->global->LDAP_CONTACT_ACTIVE) { $langs->load("ldap"); $head[$h][0] = DOL_URL_ROOT.'/contact/ldap.php?id='.$object->id; $head[$h][1] = $langs->trans("LDAPCard"); $head[$h][2] = 'ldap'; $h++; } $head[$h][0] = DOL_URL_ROOT.'/contact/perso.php?id='.$object->id; $head[$h][1] = $langs->trans("PersonalInformations"); $head[$h][2] = 'perso'; $h++; $head[$h][0] = DOL_URL_ROOT.'/contact/exportimport.php?id='.$object->id; $head[$h][1] = $langs->trans("ExportImport"); $head[$h][2] = 'exportimport'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'contact'); $head[$h][0] = DOL_URL_ROOT.'/contact/info.php?id='.$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; return $head; }
/** * \file lib/importdevis.lib.php * \ingroup importdevis * \brief This file is an example module library * Put some comments here */ function subtotalAdminPrepareHead() { global $langs, $conf; $langs->load("subtotal@subtotal"); $h = 0; $head = array(); $head[$h][0] = dol_buildpath("/subtotal/admin/subtotal_setup.php", 1); $head[$h][1] = $langs->trans("Parameters"); $head[$h][2] = 'settings'; $h++; $head[$h][0] = dol_buildpath("/subtotal/admin/subtotal_about.php", 1); $head[$h][1] = $langs->trans("About"); $head[$h][2] = 'about'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'subtotal'); return $head; }
/** * Return array of tabs to used on a cron job * * @param Cronjob $object Object cron * @return array Array of tabs */ function cron_prepare_head(Cronjob $object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = dol_buildpath('/cron/card.php', 1) . '?id=' . $object->id; $head[$h][1] = $langs->trans("CronTask"); $head[$h][2] = 'card'; $h++; $head[$h][0] = dol_buildpath('/cron/info.php', 1) . '?id=' . $object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'cron'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'cron', 'remove'); return $head; }
/** * Return array head with list of tabs to view object informations * * @param Object $object Holiday * @return array head */ function holiday_prepare_head($object) { global $langs, $conf, $user; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/holiday/fiche.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'holiday'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'holiday', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @param AccountingAccount $object Accounting account * @return array Array of tabs to show */ function accounting_prepare_head(AccountingAccount $object) { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = dol_buildpath('/accountancy/admin/card.php', 1) . '?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'accounting_account'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'accounting_account', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @param Object $object Object related to tabs * @return array Array of tabs to show */ function loan_prepare_head($object) { global $db, $langs, $conf; $tab = 0; $head = array(); $head[$tab][0] = DOL_URL_ROOT . '/loan/card.php?id=' . $object->id; $head[$tab][1] = $langs->trans('Card'); $head[$tab][2] = 'card'; $tab++; if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = (empty($object->note_private) ? 0 : 1) + (empty($object->note_public) ? 0 : 1); $head[$tab][0] = DOL_URL_ROOT . "/loan/note.php?id=" . $object->id; $head[$tab][1] = $langs->trans("Notes"); if ($nbNote > 0) { $head[$tab][1] .= ' <span class="badge">' . $nbNote . '</span>'; } $head[$tab][2] = 'note'; $tab++; } // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $tab, 'loan'); require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $upload_dir = $conf->loan->dir_output . "/" . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\\.meta|_preview\\.png)$')); $nbLinks = Link::count($db, $object->element, $object->id); $head[$tab][0] = DOL_URL_ROOT . '/loan/document.php?id=' . $object->id; $head[$tab][1] = $langs->trans("Documents"); if ($nbFiles + $nbLinks > 0) { $head[$tab][1] .= ' <span class="badge">' . ($nbFiles + $nbLinks) . '</span>'; } $head[$tab][2] = 'documents'; $tab++; $head[$tab][0] = DOL_URL_ROOT . '/loan/info.php?id=' . $object->id; $head[$tab][1] = $langs->trans("Info"); $head[$tab][2] = 'info'; $tab++; complete_head_from_modules($conf, $langs, $object, $head, $tab, 'loan', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @return array Array of tabs to show */ function multicurrencyAdminPrepareHead() { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = dol_buildpath("/admin/multicurrency.php", 1); $head[$h][1] = $langs->trans("Parameters"); $head[$h][2] = 'settings'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( // 'entity:+tabname:Title:@quickpriceupdate:/quickpriceupdate/mypage.php?id=__ID__' //); // to add new tab //$this->tabs = array( // 'entity:-tabname:Title:@quickpriceupdate:/quickpriceupdate/mypage.php?id=__ID__' //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'multicurrency'); return $head; }
/** * Returns an array with the tabs for the "Opensurvey poll" section * It loads tabs from modules looking for the entity Opensurveyso * * @param Opensurveysondage $object Current viewing poll * @return array Tabs for the opensurvey section */ function opensurvey_prepare_head(Opensurveysondage $object) { global $langs, $conf; $h = 0; $head = array(); $head[0][0] = 'card.php?id=' . $object->id_sondage; $head[0][1] = $langs->trans("Card"); $head[0][2] = 'general'; $h++; $head[1][0] = 'results.php?id=' . $object->id_sondage; $head[1][1] = $langs->trans("SurveyResults"); $head[1][2] = 'preview'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'opensurveypoll'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'opensurveypoll', 'remove'); return $head; }
/** * Prepare array with list of tabs * * @param Fiscalyear $object Object related to tabs * @return array Array of tabs to show */ function fiscalyear_prepare_head(Fiscalyear $object) { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/fiscalyear_card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'fiscalyear'); $head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/fiscalyear_info.php?id=' . $object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'fiscalyear', 'remove'); return $head; }
/** * Returns an array with the tabs for the "Supplier payment" section * It loads tabs from modules looking for the entity payment_supplier * * @param Paiement $object Current payment object * @return array Tabs for the payment section */ function payment_supplier_prepare_head(Paiement $object) { global $langs, $conf; $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/fourn/paiement/card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'payment'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'payment_supplier'); $head[$h][0] = DOL_URL_ROOT . '/fourn/paiement/info.php?id=' . $object->id; $head[$h][1] = $langs->trans('Info'); $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'payment_supplier', 'remove'); return $head; }