dolibarr 24.0.0-beta
index.php
1<?php
2/*
3 * Copyright (C) 2024 Anthony Damhet <a.damhet@progiseize.fr>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
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 */
19
20// Load Dolibarr environment
21require '../../../main.inc.php';
22
29// Protection if external user
30if ($user->socid > 0) {
32}
33
34// Includes
35require_once DOL_DOCUMENT_ROOT . '/admin/tools/ui/class/documentation.class.php';
36
37// Load documentation translations
38$langs->load('uxdocumentation');
39
40//
41$documentation = new Documentation($db);
42
43// Output html head + body - Param is Title
44$documentation->docHeader();
45
46// Set view for menu and breadcrumb
47$documentation->view = array('DocumentationHome');
48
49// Output sidebar
50$documentation->showSidebar(); ?>
51
52<div class="doc-wrapper">
53
54 <?php $documentation->showBreadCrumb(); ?>
55
56 <div class="doc-content-wrapper">
57 <h1 class="documentation-title"><?php echo $langs->trans('WelcomeToDocumentation'); ?></h1>
58 <p class="documentation-text"><?php echo $langs->trans('WelcomeToDocumentationDescription'); ?></p>
59
60 <div class="doclinks-section">
61 <h2 class="doclinks-title"><?php echo $langs->trans('DocLinkSectionResources'); ?></h2>
62 <div class="doclinks-wrapper" style="justify-content: space-between;">
63 <a class="doc-link size-default" href="<?php print dol_buildpath($documentation->baseUrl.'/resources/contributing.php', 1); ?>">
64 <div class="link-title"><span class="fas fa-info-circle paddingright"></span> <?php print $langs->trans('DocHowContribute'); ?></div>
65 <div class="link-content"><?php print $langs->trans('DocHowContributeDescription'); ?></div>
66 </a>
67 <a class="doc-link size-default" href="https://www.dolibarr.fr/forum/" target="_blank">
68 <div class="link-title"><span class="fas fa-external-link-alt paddingright"></span> Dolibarr community</div>
69 <div class="link-content">Meet and chat with the Dolibarr community on the dedicated forum</div>
70 </a>
71 </div>
72 </div>
73
74 <?php
75 $indexMenu = $documentation->menu;
76
77 // Remove BackToDolibarr and Documentation Home from menu
78 // Remove Resources from menu (Set manually above)
79 unset($indexMenu['BackToDolibarr']);
80 unset($indexMenu['DocumentationHome']);
81 unset($indexMenu['Resources']);
82
83 if (!empty($indexMenu)) {
84 foreach ($indexMenu as $keyMenu => $infosMenu) {
85 print '<div class="doclinks-section">';
86 print '<h2 class="doclinks-title">'.$langs->trans($keyMenu).'</h2>';
87 print '<div class="doclinks-wrapper flex-fix" style="justify-content: flex-start;">';
88 if (!empty($infosMenu['submenu'])) {
89 foreach ($infosMenu['submenu'] as $keySubmenu => $infosSubmenu) {
90 print '<a href="'.$infosSubmenu['url'].'" class="doc-link size-small">';
91 print '<div class="link-icon"><span class="'.$infosSubmenu['icon'].'"></span></div>';
92 print '<div class="link-title">'.$langs->trans($keySubmenu).'</div>';
93 print '</a>';
94 }
95 }
96 print '</div>';
97 print '</div>';
98 }
99 }
100 ?>
101 </div>
102
103</div>
104
105<?php
106// Output close body + html
107$documentation->docFooter();
108?>
Class to manage UI documentation.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.