* Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ // Load Dolibarr environment require '../../../../main.inc.php'; /** * @var DoliDB $db * @var HookManager $hookmanager * @var Translate $langs * @var User $user */ // Protection if external user if ($user->socid > 0) { accessforbidden(); } // Includes require_once DOL_DOCUMENT_ROOT . '/admin/tools/ui/class/documentation.class.php'; // Load documentation translations $langs->load('uxdocumentation'); // $documentation = new Documentation($db); $morejs = [ '/includes/ace/src/ace.js', '/includes/ace/src/ext-statusbar.js', '/includes/ace/src/ext-language_tools.js', ]; // Output html head + body - Param is Title $documentation->docHeader('Badges', $morejs); // Set view for menu and breadcrumb // Menu must be set in constructor of documentation class $documentation->view = array('Components','Badges'); // Output sidebar $documentation->showSidebar(); ?>
showBreadCrumb(); ?>

trans('DocBadgeTitle'); ?>

trans('DocBadgeMainDescription'); ?>

showSummary(); ?>

trans('DocBasicUsage'); ?>

trans('DocBadgeScaleDescription'); ?>

Example heading New

Example heading New

Example heading New

Example heading New

Example heading New
Example heading New
Example heading New', '

Example heading New

', '

Example heading New

', '

Example heading New

', '
Example heading New
', '
Example heading New
' ); echo $documentation->showCode($lines); ?>

trans('DocBadgeUseOnLinksOrButtons'); ?>

', ' Notifications 4', '', ); echo $documentation->showCode($lines); ?>

trans('DocBadgeWarningAriaHidden1'); ?>

trans('DocBadgeWarningAriaHidden2'); ?>

trans('DocBadgeWarningAriaHidden3'); ?>

', ' Profile 9', ' unread messages', '', ); echo $documentation->showCode($lines); ?>

trans('DocBadgeContextualVariations'); ?>

trans('DocBadgeContextualVariationsDescription'); ?>

Primary Secondary Success Danger Warning Info Light Dark
Primary', 'Secondary', 'Success', 'Danger', 'Warning', 'Info', 'Light', 'Dark', ); echo $documentation->showCode($lines); ?>

trans('DocBadgeContextualVariationsWarning1'); ?>

trans('DocBadgeContextualVariationsWarning2'); ?>

trans('DocBadgeDefaultStatus'); ?>

trans('DocBadgeDefaultStatusDescription'); ?>

status-
status-'.$i.''; endfor; echo $documentation->showCode($lines); ?>

trans('DocBadgePillBadges'); ?>

trans('DocBadgePillBadgesDescription'); ?>

Primary Secondary Success Danger Warning Info Light Dark status
Primary', 'Secondary', 'Success', 'Danger', 'Warning', 'Info', 'Light', 'Dark', ); for ($i = 0; $i <= 9; $i++) : $lines[] = 'status-'.$i.''; endfor; echo $documentation->showCode($lines); ?>

trans('DocBadgeDotBadges'); ?>

trans('DocBadgeDotBadgesDescription'); ?>

', '', '', '', '', '', '', '', ); for ($i = 0; $i <= 9; $i++) : $lines[] = ''; endfor; echo $documentation->showCode($lines); ?>

trans('DocBadgeHelper'); ?>

trans('DocBadgeHelperDescription'); ?>

with html', 'primary'); ?> with html', 'danger', 'pill'); ?>
with html', 'primary');", "print dolGetBadge('your label for accessibility', 'your label with html', 'danger', 'pill');", "print dolGetBadge('your label for accessibility', 'your label', 'warning', 'dot');", ); echo $documentation->showCode($lines, 'php'); ?>
docFooter(); ?>