diff --git a/htdocs/admin/tools/ui/class/documentation.class.php b/htdocs/admin/tools/ui/class/documentation.class.php index 584f6c36a7f..8d498125adb 100644 --- a/htdocs/admin/tools/ui/class/documentation.class.php +++ b/htdocs/admin/tools/ui/class/documentation.class.php @@ -126,6 +126,12 @@ class Documentation 'DocButtonSubmenu' => '#buttonsection-submenu', ), ), + 'Icons' => array( + 'url' => dol_buildpath($baseUrl.'/components/icons.php', 1), + 'icon' => 'far fa-flag pictofixedwidth', + 'submenu' => array(), + 'summary' => array(), + ), 'Progress' => array( 'url' => dol_buildpath($baseUrl.'/components/progress-bars.php', 1), 'icon' => 'fas fa-battery-half pictofixedwidth', diff --git a/htdocs/admin/tools/ui/components/event-message.php b/htdocs/admin/tools/ui/components/event-message.php index 98e3080c7d3..2e60227fcc3 100644 --- a/htdocs/admin/tools/ui/components/event-message.php +++ b/htdocs/admin/tools/ui/components/event-message.php @@ -104,7 +104,7 @@ $documentation->showSidebar(); ?> $lines = array( ' + * + * This program and files/directory inner it is free software: you can + * redistribute it and/or modify it under the terms of the + * GNU Affero General Public License (AGPL) 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 AGPL for more details. + * + * You should have received a copy of the GNU AGPL + * along with this program. If not, see . + */ + +$res=0; +if (! $res && file_exists("../../main.inc.php")) : $res=@include '../../main.inc.php'; +endif; +if (! $res && file_exists("../../../main.inc.php")) : $res=@include '../../../main.inc.php'; +endif; +if (! $res && file_exists("../../../../main.inc.php")) : $res=@include '../../../../main.inc.php'; +endif; + +// Protection if external user +if ($user->socid > 0) : accessforbidden(); +endif; + +// Includes +dol_include_once('admin/tools/ui/class/documentation.class.php'); + +// Load documentation translations +$langs->load('uxdocumentation'); + +// +$documentation = new Documentation($db); + +// Output html head + body - Param is Title +$documentation->docHeader('Icons'); + +// Set view for menu and breadcrumb +// Menu must be set in constructor of documentation class +$documentation->view = array('Components','Icons'); + +// Output sidebar +$documentation->showSidebar(); ?> + +
+ + showBreadCrumb(); ?> + +
+ +

trans('DocIconsTitle'); ?>

+

trans('DocIconsMainDescription'); ?>

+ + + showSummary(); ?> + + +
+ + + +

trans('DocIconsList'); ?>

+ trans('DocDocIconsListDescription'); ?>

*/ ?> + + +
+ +
+ + '; + + + print '
+ + '.$iconCode.' + +
+
'. ($iconData[2]??($iconData[0]??'')) .'
+
+
+
+
'.dol_htmlentities($iconCode).'
+
+
+
+
+
'; + } + } + ?> +
+
+
+ +
+
+ +docFooter(); +?> diff --git a/htdocs/admin/tools/ui/css/documentation.css b/htdocs/admin/tools/ui/css/documentation.css index 0bee0aae2bf..3dbd1abdfb2 100644 --- a/htdocs/admin/tools/ui/css/documentation.css +++ b/htdocs/admin/tools/ui/css/documentation.css @@ -78,8 +78,12 @@ body.dolibarr-doc { .doc-wrapper .doc-content-wrapper .documentation-section h2.documentation-title {margin: 0;margin-bottom:16px;padding: 0;color: rgb(38,60,92);} .doc-wrapper .doc-content-wrapper .documentation-section .documentation-example {border:1px dashed #ccc;box-sizing: border-box;padding: 16px;margin-bottom: 16px;} .doc-wrapper .doc-content-wrapper .documentation-section .documentation-code {background: var(--colorbacklinepairchecked);border:1px dashed #ccc;box-sizing: border-box;padding: 16px;margin-bottom: 16px;overflow: auto;} +.doc-wrapper .doc-content-wrapper .documentation-section .info-box .documentation-code {padding: 3px 16px; margin-bottom: 5px;} .doc-wrapper .doc-content-wrapper .documentation-section .documentation-code pre {margin: 0;padding: 0;tab-size: 24px;} /* Documentation scroll indicator */ #documentation-scrollwrapper {height: 5px;position: fixed;bottom: 0;left: 260px;right:0;z-index: 99;} -#documentation-scroll {background: rgb(0, 123, 140);height: 5px;position: absolute;top: 0;left:0} \ No newline at end of file +#documentation-scroll {background: rgb(0, 123, 140);height: 5px;position: absolute;top: 0;left:0} + +/* component icons */ +.documentation-fontawesome-icon-list span{ color: #333; } diff --git a/htdocs/langs/en_US/uxdocumentation.lang b/htdocs/langs/en_US/uxdocumentation.lang index 56d3c587185..d8df8d0de27 100644 --- a/htdocs/langs/en_US/uxdocumentation.lang +++ b/htdocs/langs/en_US/uxdocumentation.lang @@ -79,3 +79,8 @@ DocSetEventMessage = Message #%s DocButtonIconsLowEmphasis = Low emphasis icon buttons DocButtonIconsDescriptionLowEmphasis = An icon button with low emphasis is typically a button that includes only an icon (no accompanying text) and has minimal styling to make it unobtrusive. Icon buttons with low emphasis are ideal for secondary or tertiary actions, like clear field, fill field, bookmarking, or sharing, especially in interfaces that have more prominent primary actions (like "Submit" or "Continue"). DocButtonIconsForTitle = Buttons for list title + +# Fontawesome icons +DocIconsTitle = Icons used by Dolibarr +DocIconsMainDescription = Dolibarr use a part of fontawesome 5 icons +DocIconsList = List of usable font icons