dolibarr 20.0.2
header.tpl.php
1<?php
2/* Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18// Protection to avoid direct call of template
19if (empty($context) || !is_object($context)) {
20 print "Error, template page can't be called as URL";
21 exit(1);
22}
23
24if (!empty($context->title)) {
25 $title = $context->title;
26} else {
27 $title = 'WebPortal';
28}
29
30$head = '<link rel="stylesheet" href="'.$context->rootUrl.'css/global.css.php">'."\n";
31
32//$jNotifyCSSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.css', 2);
33//$head .= '<link rel="stylesheet" href="'.$jNotifyCSSUrl.' ">'."\n";
34
35if (getDolGlobalString('WEBPORTAL_CUSTOM_CSS')) {
36 $head .= '<link rel="stylesheet" type="text/css" href="'.$context->rootUrl.'css/themes/custom.css.php?revision='.getDolGlobalInt('WEBPORTAL_PARAMS_REV').'">'."\n";
37}
38// JQuery
39//$jQueryJSUrl = $context->rootUrl.'includes/jquery/js/jquery.js';
40//$jQueryJSUrl = dol_buildpath('/includes/jquery/js/jquery.js', 2);
41//$head .= '<script src="'.$jQueryJSUrl.'"></script>'."\n";
42
43// JNotify
44//$jNotifyJSUrl = $context->rootUrl.'includes/jquery/plugins/jnotify/jquery.jnotify.js';
45//$jNotifyJSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.js', 2);
46//$head .= '<script src="'.$jNotifyJSUrl.'"></script>'."\n";
47
48top_htmlhead($head, $title);
49?>
50<body
51 data-theme="custom"
52 data-controller="<?php print dol_escape_htmltag($context->controller); ?>"
53>
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.