agenda.lib.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <?php
  2. /* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
  4. * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. * or see https://www.gnu.org/
  19. */
  20. /**
  21. * \file htdocs/core/lib/agenda.lib.php
  22. * \brief Set of function for the agenda module
  23. */
  24. /**
  25. * Show filter form in agenda view
  26. *
  27. * @param Form $form Form object
  28. * @param int $canedit Can edit filter fields
  29. * @param int $status Status
  30. * @param int $year Year
  31. * @param int $month Month
  32. * @param int $day Day
  33. * @param int $showbirthday Show birthday
  34. * @param string $filtera Filter on create by user
  35. * @param string $filtert Filter on assigned to user
  36. * @param string $filterd Filter of done by user
  37. * @param int $pid Product id
  38. * @param int $socid Third party id
  39. * @param string $action Action string
  40. * @param array $showextcals Array with list of external calendars (used to show links to select calendar), or -1 to show no legend
  41. * @param string|array $actioncode Preselected value(s) of actioncode for filter on event type
  42. * @param int $usergroupid Id of group to filter on users
  43. * @param string $excludetype A type to exclude ('systemauto', 'system', '')
  44. * @param int $resourceid Preselected value of resource for filter on resource
  45. * @return void
  46. */
  47. function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '', $excludetype = '', $resourceid = 0)
  48. {
  49. global $conf, $user, $langs, $db, $hookmanager;
  50. global $begin_h, $end_h, $begin_d, $end_d;
  51. global $massaction;
  52. $langs->load("companies");
  53. include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
  54. $formactions = new FormActions($db);
  55. // Filters
  56. //print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">';
  57. print '<input type="hidden" name="token" value="'.newToken().'">';
  58. print '<input type="hidden" name="year" value="'.((int) $year).'">';
  59. print '<input type="hidden" name="month" value="'.((int) $month).'">';
  60. print '<input type="hidden" name="day" value="'.((int) $day).'">';
  61. if ($massaction != 'predelete' && $massaction != 'preaffecttag') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system.
  62. print '<input type="hidden" name="action" value="'.$action.'">';
  63. }
  64. print '<input type="hidden" name="search_showbirthday" value="'.((int) $showbirthday).'">';
  65. if ($canedit) {
  66. print '<div class="divsearchfield">';
  67. // Type
  68. $multiselect = 0;
  69. if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) { // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
  70. $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
  71. }
  72. print img_picto($langs->trans("ActionType"), 'square', 'class="pictofixedwidth inline-block" style="color: #ddd;"');
  73. print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500 widthcentpercentminusx');
  74. print '</div>';
  75. // Assigned to user
  76. print '<div class="divsearchfield">';
  77. print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="pictofixedwidth inline-block"');
  78. print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'minwidth150 maxwidth500 widthcentpercentminusxx');
  79. print '</div>';
  80. // Assigned to user group
  81. print '<div class="divsearchfield">';
  82. print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="pictofixedwidth inline-block"');
  83. print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'minwidth100 maxwidth500 widthcentpercentminusxx');
  84. print '</div>';
  85. if (!empty($conf->resource->enabled)) {
  86. include_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
  87. $formresource = new FormResource($db);
  88. // Resource
  89. print '<div class="divsearchfield">';
  90. print img_picto($langs->trans("Resource"), 'object_resource', 'class="pictofixedwidth inline-block"');
  91. print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500');
  92. print '</div>';
  93. }
  94. }
  95. if (!empty($conf->societe->enabled) && !empty($user->rights->societe->lire)) {
  96. print '<div class="divsearchfield">';
  97. print img_picto($langs->trans("ThirdParty"), 'company', 'class="pictofixedwidth inline-block"');
  98. print $form->select_company($socid, 'search_socid', '', '&nbsp;', 0, 0, null, 0, 'minwidth100 maxwidth500');
  99. print '</div>';
  100. }
  101. if (!empty($conf->projet->enabled) && !empty($user->rights->projet->lire)) {
  102. require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
  103. $formproject = new FormProjets($db);
  104. print '<div class="divsearchfield">';
  105. print img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth inline-block"');
  106. print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
  107. print '</div>';
  108. }
  109. if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) {
  110. // Status
  111. print '<div class="divsearchfield">';
  112. print img_picto($langs->trans("Status"), 'setup', 'class="pictofixedwidth inline-block"');
  113. $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
  114. print '</div>';
  115. }
  116. // Hooks
  117. $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid);
  118. $object = null;
  119. $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
  120. print '<div style="clear:both"></div>';
  121. }
  122. /**
  123. * Show actions to do array
  124. *
  125. * @param int $max Max nb of records
  126. * @return void
  127. */
  128. function show_array_actions_to_do($max = 5)
  129. {
  130. global $langs, $conf, $user, $db, $socid;
  131. $now = dol_now();
  132. include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
  133. include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
  134. $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent";
  135. $sql .= ", c.code, c.libelle as type_label";
  136. $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
  137. $sql .= ", s.code_client, s.code_compta, s.client";
  138. $sql .= ", s.logo, s.email, s.entity";
  139. $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
  140. $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
  141. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
  142. if (empty($user->rights->societe->client->voir) && !$socid) {
  143. $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
  144. }
  145. $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
  146. $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
  147. if (empty($user->rights->societe->client->voir) && !$socid) {
  148. $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
  149. }
  150. if ($socid) {
  151. $sql .= " AND s.rowid = ".((int) $socid);
  152. }
  153. $sql .= " ORDER BY a.datep DESC, a.id DESC";
  154. $sql .= $db->plimit($max, 0);
  155. $resql = $db->query($sql);
  156. if ($resql) {
  157. $num = $db->num_rows($resql);
  158. print '<div class="div-table-responsive-no-min">';
  159. print '<table class="noborder centpercent">';
  160. print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
  161. print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&status=todo">'.$langs->trans("FullList").'</a></th>';
  162. print '</tr>';
  163. $i = 0;
  164. $staticaction = new ActionComm($db);
  165. $customerstatic = new Client($db);
  166. while ($i < $num) {
  167. $obj = $db->fetch_object($resql);
  168. print '<tr class="oddeven">';
  169. $staticaction->type_code = $obj->code;
  170. $staticaction->label = ($obj->label ? $obj->label : $obj->type_label);
  171. $staticaction->id = $obj->id;
  172. print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
  173. // print '<td>'.dol_trunc($obj->label,22).'</td>';
  174. print '<td>';
  175. if ($obj->socid > 0) {
  176. $customerstatic->id = $obj->socid;
  177. $customerstatic->name = $obj->name;
  178. //$customerstatic->name_alias = $obj->name_alias;
  179. $customerstatic->code_client = $obj->code_client;
  180. $customerstatic->code_compta = $obj->code_compta;
  181. $customerstatic->client = $obj->client;
  182. $customerstatic->logo = $obj->logo;
  183. $customerstatic->email = $obj->email;
  184. $customerstatic->entity = $obj->entity;
  185. print $customerstatic->getNomUrl(1, '', 40);
  186. }
  187. print '</td>';
  188. $datep = $db->jdate($obj->dp);
  189. $datep2 = $db->jdate($obj->dp2);
  190. // Date
  191. print '<td width="100" class="right tddate">'.dol_print_date($datep, 'day').'&nbsp;';
  192. $late = 0;
  193. if ($obj->percent == 0 && $datep && $datep < time()) {
  194. $late = 1;
  195. }
  196. if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) {
  197. $late = 1;
  198. }
  199. if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) {
  200. $late = 1;
  201. }
  202. if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) {
  203. $late = 1;
  204. }
  205. if ($late) {
  206. print img_warning($langs->trans("Late"));
  207. }
  208. print "</td>";
  209. // Statut
  210. print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
  211. print "</tr>\n";
  212. $i++;
  213. }
  214. print "</table></div><br>";
  215. $db->free($resql);
  216. } else {
  217. dol_print_error($db);
  218. }
  219. }
  220. /**
  221. * Show last actions array
  222. *
  223. * @param int $max Max nb of records
  224. * @return void
  225. */
  226. function show_array_last_actions_done($max = 5)
  227. {
  228. global $langs, $conf, $user, $db, $socid;
  229. $now = dol_now();
  230. $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label";
  231. $sql .= ", c.code, c.libelle";
  232. $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
  233. $sql .= ", s.code_client, s.code_compta, s.client";
  234. $sql .= ", s.logo, s.email, s.entity";
  235. $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
  236. $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
  237. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
  238. if (empty($user->rights->societe->client->voir) && !$socid) {
  239. $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
  240. }
  241. $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
  242. $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
  243. if (empty($user->rights->societe->client->voir) && !$socid) {
  244. $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
  245. }
  246. if ($socid) {
  247. $sql .= " AND s.rowid = ".((int) $socid);
  248. }
  249. $sql .= " ORDER BY a.datep2 DESC";
  250. $sql .= $db->plimit($max, 0);
  251. $resql = $db->query($sql);
  252. if ($resql) {
  253. $num = $db->num_rows($resql);
  254. print '<div class="div-table-responsive-no-min">';
  255. print '<table class="noborder centpercent">';
  256. print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
  257. print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&status=done">'.$langs->trans("FullList").'</a></th>';
  258. print '</tr>';
  259. $i = 0;
  260. $staticaction = new ActionComm($db);
  261. $customerstatic = new Societe($db);
  262. while ($i < $num) {
  263. $obj = $db->fetch_object($resql);
  264. print '<tr class="oddeven">';
  265. $staticaction->type_code = $obj->code;
  266. $staticaction->libelle = $obj->label;
  267. $staticaction->id = $obj->id;
  268. print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
  269. //print '<td>'.dol_trunc($obj->label,24).'</td>';
  270. print '<td>';
  271. if ($obj->socid > 0) {
  272. $customerstatic->id = $obj->socid;
  273. $customerstatic->name = $obj->name;
  274. //$customerstatic->name_alias = $obj->name_alias;
  275. $customerstatic->code_client = $obj->code_client;
  276. $customerstatic->code_compta = $obj->code_compta;
  277. $customerstatic->client = $obj->client;
  278. $customerstatic->logo = $obj->logo;
  279. $customerstatic->email = $obj->email;
  280. $customerstatic->entity = $obj->entity;
  281. print $customerstatic->getNomUrl(1, '', 30);
  282. }
  283. print '</td>';
  284. // Date
  285. print '<td width="100" class="right tddate">'.dol_print_date($db->jdate($obj->da2), 'day');
  286. print "</td>";
  287. // Status
  288. print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
  289. print "</tr>\n";
  290. $i++;
  291. }
  292. // TODO Ajouter rappel pour "il y a des contrats a mettre en service"
  293. // TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
  294. print "</table></div><br>";
  295. $db->free($resql);
  296. } else {
  297. dol_print_error($db);
  298. }
  299. }
  300. /**
  301. * Prepare array with list of tabs
  302. *
  303. * @return array Array of tabs to show
  304. */
  305. function agenda_prepare_head()
  306. {
  307. global $langs, $conf, $user;
  308. $h = 0;
  309. $head = array();
  310. $head[$h][0] = DOL_URL_ROOT."/admin/agenda_other.php";
  311. $head[$h][1] = $langs->trans("Miscellaneous");
  312. $head[$h][2] = 'other';
  313. $h++;
  314. $head[$h][0] = DOL_URL_ROOT."/admin/agenda.php";
  315. $head[$h][1] = $langs->trans("AutoActions");
  316. $head[$h][2] = 'autoactions';
  317. $h++;
  318. $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
  319. $head[$h][1] = $langs->trans("Reminders");
  320. $head[$h][2] = 'reminders';
  321. $h++;
  322. $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php";
  323. $head[$h][1] = $langs->trans("ExportCal");
  324. $head[$h][2] = 'xcal';
  325. $h++;
  326. $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php";
  327. $head[$h][1] = $langs->trans("ExtSites");
  328. $head[$h][2] = 'extsites';
  329. $h++;
  330. complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin');
  331. $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
  332. $head[$h][1] = $langs->trans("ExtraFields");
  333. $head[$h][2] = 'attributes';
  334. $h++;
  335. complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin', 'remove');
  336. return $head;
  337. }
  338. /**
  339. * Prepare array with list of tabs
  340. *
  341. * @param object $object Object related to tabs
  342. * @return array Array of tabs to show
  343. */
  344. function actions_prepare_head($object)
  345. {
  346. global $db, $langs, $conf, $user;
  347. $h = 0;
  348. $head = array();
  349. $head[$h][0] = DOL_URL_ROOT.'/comm/action/card.php?id='.$object->id;
  350. $head[$h][1] = $langs->trans("CardAction");
  351. $head[$h][2] = 'card';
  352. $h++;
  353. // Tab to link resources
  354. if ($conf->resource->enabled) {
  355. include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
  356. $resource = new DolResource($db);
  357. $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id;
  358. $listofresourcelinked = $resource->getElementResources($object->element, $object->id);
  359. $nbResources = (is_array($listofresourcelinked) ?count($listofresourcelinked) : 0);
  360. $head[$h][1] = $langs->trans("Resources");
  361. if ($nbResources > 0) {
  362. $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.($nbResources).'</span>' : '');
  363. }
  364. $head[$h][2] = 'resources';
  365. $h++;
  366. }
  367. // Attached files
  368. require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
  369. require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
  370. $upload_dir = $conf->agenda->dir_output."/".$object->id;
  371. $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
  372. $nbLinks = Link::count($db, $object->element, $object->id);
  373. $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
  374. $head[$h][1] = $langs->trans("Documents");
  375. if (($nbFiles + $nbLinks) > 0) {
  376. $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>' : '');
  377. }
  378. $head[$h][2] = 'documents';
  379. $h++;
  380. $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id;
  381. $head[$h][1] = $langs->trans('Info');
  382. $head[$h][2] = 'info';
  383. $h++;
  384. complete_head_from_modules($conf, $langs, $object, $head, $h, 'action');
  385. complete_head_from_modules($conf, $langs, $object, $head, $h, 'action', 'remove');
  386. return $head;
  387. }
  388. /**
  389. * Define head array for tabs of agenda setup pages
  390. *
  391. * @param string $param Parameters to add to url
  392. * @return array Array of head
  393. */
  394. function calendars_prepare_head($param)
  395. {
  396. global $langs, $conf, $user;
  397. $h = 0;
  398. $head = array();
  399. $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?mode=show_list'.($param ? '&'.$param : '');
  400. $head[$h][1] = $langs->trans("ViewList");
  401. $head[$h][2] = 'cardlist';
  402. $h++;
  403. $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_month'.($param ? '&'.$param : '');
  404. $head[$h][1] = $langs->trans("ViewCal");
  405. $head[$h][2] = 'cardmonth';
  406. $h++;
  407. $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_week'.($param ? '&'.$param : '');
  408. $head[$h][1] = $langs->trans("ViewWeek");
  409. $head[$h][2] = 'cardweek';
  410. $h++;
  411. $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_day'.($param ? '&'.$param : '');
  412. $head[$h][1] = $langs->trans("ViewDay");
  413. $head[$h][2] = 'cardday';
  414. $h++;
  415. //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
  416. if (!empty($conf->global->AGENDA_SHOW_PERTYPE)) {
  417. $head[$h][0] = DOL_URL_ROOT.'/comm/action/pertype.php'.($param ? '?'.$param : '');
  418. $head[$h][1] = $langs->trans("ViewPerType");
  419. $head[$h][2] = 'cardpertype';
  420. $h++;
  421. }
  422. $newparam = $param;
  423. $newparam = preg_replace('/&?search_filtert=\d+/', '', $newparam);
  424. $head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($newparam ? '?'.$newparam : '');
  425. $head[$h][1] = $langs->trans("ViewPerUser");
  426. $head[$h][2] = 'cardperuser';
  427. $h++;
  428. // Show more tabs from modules
  429. // Entries must be declared in modules descriptor with line
  430. // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
  431. // $this->tabs = array('entity:-tabname); to remove a tab
  432. complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda');
  433. complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda', 'remove');
  434. return $head;
  435. }