dolibarr 23.0.3
info-box.inc.php
1<?php
2/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 */
5if (!defined('ISLOADEDBYSTEELSHEET')) {
6 die('Must be call by steelsheet');
7}
8
13// Expected to be defined by including parent
14'
15@phan-var-force string $right
16@phan-var-force string $left
17';
18
19$borderradius = getDolGlobalString('THEME_ELDY_USEBORDERONTABLE') ? getDolGlobalInt('THEME_ELDY_BORDER_RADIUS', 6) : 0;
20
21?>
22
23/* IDE Hack <style type="text/css"> */
24
25
26/*
27 * Component: Info Box
28 * -------------------
29 */
30
31<?php
32include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
33
34$prefix = '';
35if (getDolGlobalString('THEME_INFOBOX_COLOR_ON_BACKGROUND')) {
36 $prefix = 'background-';
37}
38
39if (!isset($conf->global->THEME_SATURATE_RATIO)) {
40 $conf->global->THEME_SATURATE_RATIO = 0.8;
41}
42if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
43 $conf->global->THEME_SATURATE_RATIO = GETPOSTFLOAT('THEME_SATURATE_RATIO');
44}
45
46?>
47
48.spannature {
49 padding-top: 5px !important;
50 padding-bottom: 6px !important;
51 vertical-align: middle;
52 white-space: nowrap;
53 display: inline-block;
54}
55
56.nonature-back {
57 background-color: #EEE;
58 padding: 2px;
59 margin: 2px;
60 border-radius: 3px;
61}
62.prospect-back {
63 background-color: #a7c5b0 !important;
64 color: #FFF !important;
65 padding: 2px;
66 margin: 2px;
67 border-radius: 3px;
68}
69.customer-back {
70 background-color: #65953d !important;
71 color: #FFF !important;
72 padding: 2px;
73 margin: 2px;
74 border-radius: 3px;
75}
76.vendor-back {
77 background-color: #599caf !important;
78 color: #FFF !important;
79 padding: 2px;
80 margin: 2px;
81 border-radius: 3px;
82}
83.user-back {
84 background-color: #79633f !important;
85 color: #FFF !important;
86 padding: 2px;
87 margin: 2px;
88 border-radius: 3px;
89}
90.member-company-back {
91 padding: 2px;
92 margin: 2px;
93 background-color: #e4e4e4;
94 color: #666;
95 border-radius: 3px;
96 white-space: nowrap;
97}
98.member-individual-back {
99 padding: 2px;
100 margin: 2px;
101 background-color: #e4e4e4;
102 color: #666;
103 border-radius: 3px;
104 white-space: nowrap;
105}
106
107.bg-infobox-project{
108 <?php echo $prefix; ?>color: #6c6aa8 !important;
109}
110.bg-infobox-action{
111 <?php echo $prefix; ?>color: #906080 !important;
112}
113.bg-infobox-propal, .bg-infobox-facture, .bg-infobox-commande {
114 <?php echo $prefix; ?>color: #65953d !important;
115}
116.bg-infobox-supplier_proposal, .bg-infobox-invoice_supplier, .bg-infobox-order_supplier {
117 <?php echo $prefix; ?>color: #599caf !important;
118}
119.bg-infobox-contrat, .bg-infobox-ticket{
120 <?php echo $prefix; ?>color: #46a676 !important;
121}
122.bg-infobox-bank_account{
123 <?php echo $prefix; ?>color: #b0a53e !important;
124}
125.bg-infobox-adherent, .bg-infobox-member{
126 <?php echo $prefix; ?>color: #79633f !important;
127}
128.bg-infobox-expensereport{
129 <?php echo $prefix; ?>color: #79633f !important;
130}
131.bg-infobox-holiday{
132 <?php echo $prefix; ?>color: #755114 !important;
133}
134.bg-infobox-cubes{
135 <?php echo $prefix; ?>color: #b0a53e !important;
136}
137
138/* Disable colors on left vmenu */
139a.vmenu span, span.vmenu, span.vmenu span {
140 /* To force no color on picto in left menu */
141 /* color: var(--colortextbackvmenu) !important; */
142}
143div.login_block_other:not(.takepos) a {
144 color: var(--colortextbackvmenu);
145}
146
147.infobox-adherent, .infobox-member, .infobox-expensereport {
148 color: #79633f;
149}
150.infobox-project{
151 color: #6c6aa8;
152}
153.infobox-action{
154 color: #906080;
155}
156/* Color for customer object */
157.infobox-propal:not(.pictotitle):not(.error),
158.infobox-facture:not(.pictotitle):not(.error),
159.infobox-commande:not(.pictotitle):not(.error) {
160 color: #65953d;
161}
162/* Color for vendor object */
163.infobox-supplier_proposal:not(.pictotitle):not(.error),
164.infobox-invoice_supplier:not(.pictotitle):not(.error),
165.infobox-order_supplier:not(.pictotitle):not(.error) {
166 color: #599caf;
167}
168
169.infobox-contrat, .infobox-ticket{
170 color: #46a676;
171}
172.infobox-bank_account{
173 color: #b0a53e;
174}
175.infobox-holiday{
176 color: #755114;
177}
178
179
180.info-box-module.--external span.info-box-icon-version {
181 background: #bbb;
182}
183
184a.info-box-text.info-box-text-a {
185 /* display: table-cell; */
186 display: contents;
187}
188a.info-box-text-a i.fa.fa-exclamation-triangle, span.badge i.fa.fa-exclamation-triangle {
189 font-size: 0.9em;
190}
191
192.info-box {
193 display: block;
194 position: relative;
195 min-height: 94px;
196 background: var(--colorbacklineimpair2);
197 width: 100%;
198 /* box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); */
199 border-radius: 2px;
200 margin-bottom: 15px;
201 border: 1px solid #e9e9e9;
202 border-radius: <?php print $borderradius; ?>px;
203}
204.info-box.info-box-sm {
205 min-height: 80px;
206 margin-bottom: 10px;
207}
208.info-box-more {
209 float: right;
210 top: 4px;
211 position: absolute;
212 right: 10px;
213}
214
215.info-box small {
216 font-size: 14px;
217}
218.info-box:not(.info-box-kanban) .progress {
219 background: rgba(0, 0, 0, 0.2);
220 margin: 5px -10px 5px -10px;
221 height: 2px;
222}
223.info-box .progress,
224.info-box .progress .progress-bar {
225 border-radius: 0;
226}
227
228.info-box:not(.info-box-kanban) .progress .progress-bar {
229 float: left;
230 width: 0;
231 height: 100%;
232 font-size: 12px;
233 line-height: 20px;
234 color: #fff;
235 text-align: center;
236 background-color: #337ab7;
237 box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
238 -webkit-transition: width .6s ease;
239 -o-transition: width .6s ease;
240 transition: width .6s ease;
241}
242.info-box-icon {
243 display: block;
244 overflow: hidden;
245 float: left;
246 text-align: center;
247 font-size: 45px;
248 line-height: 94px; /* must be same height as min-height of .info-box */
249 height: 94px; /* must be same height as min-height of .info-box */
250 width: 86px;
251 background: var(--colorbacktitle1) !important;
252 border-top-left-radius: <?php print $borderradius; ?>px;
253 border-bottom-left-radius: <?php print $borderradius; ?>px;
254 <?php if (getDolGlobalString('THEME_SATURATE_RATIO')) { ?>
255 filter: saturate(<?php echo getDolGlobalString('THEME_SATURATE_RATIO'); ?>);
256 <?php } ?>
257}
258
259.info-box-module .info-box-icon {
260 padding-top: 4px;
261 padding-bottom: 4px;
262}
263.info-box-sm .info-box-icon, .info-box-sm .info-box-img {
264 height: 96px !important; /* must match height of info-box-sm .info-box-content */
265 width: 80px;
266 font-size: 25px;
267 line-height: 92px;
268}
269.info-box-order {
270 border-top-left-radius: 2px;
271 border-top-right-radius: 0;
272 border-bottom-right-radius: 0;
273 border-bottom-left-radius: 2px;
274 display: block;
275 overflow: hidden;
276 float: left;
277 height: 115px;
278 width: 88px;
279 text-align: center;
280 font-size: 2.3em;
281 line-height: 115px;
282 margin-right: 10px;
283 background: var(--colorbacktitle1) !important;
284}
285.opened-dash-board-wrap .info-box .info-box-icon {
286 font-size: 2em;
287}
288.opened-dash-board-wrap .info-box-sm .info-box-icon {
289 line-height: 80px;
290}
291.info-box-module .info-box-icon {
292 height: 98px;
293}
294.info-box-icon > img {
295 max-width: 85%;
296}
297.info-box-module .info-box-icon > img {
298 max-width: 55%;
299}
300
301.info-box-line {
302 line-height: 1.2em;
303}
304.info-box-line-text {
305 overflow: hidden;
306 width: calc(100% - 92px);
307 max-width: calc(100% - 82px);
308 text-overflow: ellipsis;
309}
310
311.info-box-icon-text {
312 box-sizing: border-box;
313 display: block;
314 position: absolute;
315 width: 90px;
316 bottom: 0px;
317 color: #ffffff;
318 background-color: rgba(0,0,0,0.1);
319 cursor: default;
320
321 font-size: 10px;
322 line-height: 15px;
323 padding: 0px 3px;
324 text-align: center;
325 opacity: 0;
326 -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
327 transition: opacity 0.5s, visibility 0s 0.5s;
328}
329
330.info-box-icon-version {
331 box-sizing: border-box;
332 display: block;
333 position: absolute;
334 width: 90px;
335 bottom: 0px;
336 color: #ffffff;
337 background-color: rgba(0,0,0,0.1);
338 cursor: default;
339
340 font-size: 10px;
341 line-height: 1.5em;
342 padding: 4px 3px;
343 text-align: center;
344 opacity: 1;
345 -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
346 transition: opacity 0.5s, visibility 0s 0.5s;
347}
348
349.box-flex-item.info-box-module.--disabled {
350 /* opacity: 0.6; */
351}
352
353.info-box-actions {
354 position: absolute;
355 right: 0;
356 bottom: 0;
357}
358
359/* customize section img box on list of products */
360.info-box-img {
361 height: 105px !important;
362 width: 88px;
363 border-top-left-radius: 2px;
364 border-top-right-radius: 0;
365 border-bottom-right-radius: 0;
366 border-bottom-left-radius: 2px;
367 display: block;
368 overflow: hidden;
369 float: left;
370 text-align: center;
371 font-size: 2.8em;
372 line-height: 90px;
373 margin-right: 5px;
374 background: var(--colorbacktitle1) !important;
375}
376.info-box-img > img {
377 width: 90%;
378 position: relative;
379 top: 50%;
380 left: 50%;
381 transform: translate(-50%, -50%);
382}
383
384
385<?php if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_BOXSTATS') && getDolGlobalString('MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD')) { ?>
386.info-box-icon-text{
387 opacity: 1;
388}
389<?php } ?>
390
391.info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{
392 overflow: hidden;
393 width: 80px;
394}
395.info-box:hover .info-box-icon-text{
396 opacity: 1;
397}
398
399.info-box-content {
400 padding-top: 5px;
401 padding-bottom: 5px;
402 padding-left: 10px;
403 padding-right: 5px;
404 margin-left: 84px;
405}
406.info-box-sm .info-box-content {
407 margin-left: 80px;
408 height: 86px; /* 96 - margins of .info-box-sm .info-box-content */
409}
410.info-box-sm .info-box-module-enabled {
411 /* background: linear-gradient(0.35turn, #fff, #fff, #f6faf8, #e4efe8) */
412 background: var(--infoboxmoduleenabledbgcolor);
413 border-radius: 6px;
414}
415.info-box-content-warning span.font-status4 {
416 color: #bc9526 !important;
417}
418
419.info-box-number {
420 display: block;
421 font-weight: bold;
422 font-size: 18px;
423}
424.progress-description,
425.info-box-text,
426.info-box-title{
427 display: block;
428 font-size: 12px;
429 white-space: nowrap;
430 overflow: hidden;
431 text-overflow: ellipsis;
432}
433.info-box-title{
434 text-transform: uppercase;
435 font-weight: bold;
436 margin-bottom: 6px;
437}
438.info-box-title {
439 width: calc(100% - 20px);
440}
441.info-box-text{
442 font-size: 0.90em;
443}
444/* Force values for small screen 480 */
445/*
446@media only screen and (max-width: 480px)
447{
448 .info-box-text {
449 font-size: 0.85em;
450 }
451}
452*/
453.info-box-text:first-letter{text-transform: uppercase}
454a.info-box-text{ text-decoration: none;}
455
456
457.info-box-more {
458 display: block;
459}
460.progress-description {
461 margin: 0;
462}
463
464
465
466/* ICONS INFO BOX */
467<?php
468include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
469
470$prefix = '';
471if (getDolGlobalString('THEME_INFOBOX_COLOR_ON_BACKGROUND')) {
472 $prefix = 'background-';
473}
474
475if (!isset($conf->global->THEME_SATURATE_RATIO)) {
476 $conf->global->THEME_SATURATE_RATIO = 0.8;
477}
478if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
479 $conf->global->THEME_SATURATE_RATIO = GETPOSTFLOAT('THEME_SATURATE_RATIO');
480}
481?>
482.bg-infobox-project i.fa{
483 color: #605ca8 !important;
484}
485.bg-infobox-action i.fa{
486 color: #906080 !important;
487}
488.bg-infobox-propal i.fa,
489.bg-infobox-facture i.fa,
490.bg-infobox-commande i.fa{
491 color: #abb87b !important;
492}
493.bg-infobox-supplier_proposal i.fa,
494.bg-infobox-invoice_supplier i.fa,
495.bg-infobox-order_supplier i.fa{
496 color: #40b0cf !important;
497}
498.bg-infobox-contrat i.fa, .bg-infobox-ticket i.fa{
499 color: #20a68a !important;
500}
501.bg-infobox-bank_account i.fa{
502 color: #b0a53e !important;
503}
504.bg-infobox-adherent i.fa, .bg-infobox-member i.fa{
505 color: #755114 !important;
506}
507.bg-infobox-expensereport i.fa{
508 color: #755114 !important;
509}
510.bg-infobox-holiday i.fa{
511 color: #755114 !important;
512}
513.bg-infobox-cubes i.fa{
514 color: #b0a53e !important;
515}
516
517
518.fa-dol-action:before {
519 content: "\f073";
520}
521.fa-dol-propal:before,
522.fa-dol-supplier_proposal:before {
523 content: "\f573";
524}
525.fa-dol-facture:before,
526.fa-dol-invoice_supplier:before {
527 content: "\f571";
528}
529.fa-dol-project:before {
530 content: "\f542";
531}
532.fa-dol-commande:before,
533.fa-dol-order_supplier:before {
534 content: "\f570";
535}
536.fa-dol-contrat:before {
537 content: "\f1e6";
538}
539.fa-dol-ticket:before {
540 content: "\f3ff";
541}
542.fa-dol-bank_account:before {
543 content: "\f19c";
544}
545.fa-dol-member:before {
546 content: "\f0c0";
547}
548.fa-dol-expensereport:before {
549 content: "\f555";
550}
551.fa-dol-holiday:before {
552 content: "\f5ca";
553}
554.fa-dol-cubes:before {
555 content: "\f1b3";
556}
557
558
559/* USING FONTAWESOME FOR WEATHER */
560.info-box-weather .info-box-icon{
561 background: var(--colorbacktitle1) !important;
562}
563.fa-weather-level0:before{
564 content: "\f185";
565 color : #cfbf00;
566}
567.fa-weather-level1:before{
568 content: "\f6c4";
569 color : #bc9526;
570}
571.fa-weather-level2:before{
572 content: "\f743";
573 color : #b16000;
574}
575.fa-weather-level3:before{
576 content: "\f740";
577 color : #b04000;
578}
579.fa-weather-level4:before{
580 content: "\f0e7";
581 color : #993013;
582}
583
584
585
586
587
588.box-flex-container{
589 display: flex; /* or inline-flex */
590 flex-direction: row;
591 flex-wrap: wrap;
592 width: 100%;
593 margin: 0 0 0 -10px;
594 /* justify-content: space-between; Do not use this: If there is 3 elements on last line and previous has 4, then the 3 are centered */
595}
596.box-flex-container-columns {
597 display: flex; /* or inline-flex */
598 flex-direction: row;
599 flex-wrap: nowrap;
600 justify-content: space-between;
601}
602.box-flex-container-column {
603 flex-grow: 1;
604}
605.box-flex-container-column:not(:last-of-type) {
606 border-right: 1px solid #AAA;
607}
608
609.box-flex-container-column.kanban {
610 flex: 1;
611}
612.kanban.kanbancollapsed {
613 flex: unset;
614 width: 80px;
615 max-width: 80px;
616 overflow: hidden;
617}
618.kanban.kanbancollapsed .kanbanlabel, .text-vertical {
619 writing-mode: vertical-rl;
620}
621
622.box-flex-grow-zero{
623 flex-grow: 0 !important;
624}
625
626.box-flex-item {
627 flex-grow : 1;
628 flex-shrink: 1;
629 flex-basis: auto;
630 width: 300px;
631}
632.box-flex-item.filler{
633 height: 0;
634}
635.box-flex-item, .kanbanlabel {
636 margin-top: 5px;
637 margin-<?php echo $right; ?>: 10px;
638 margin-bottom: 0px;
639 margin-<?php echo $left; ?>: 10px;
640}
641.kanbanlabel {
642 background: var(--colorbacktitle1);
643 padding: 5px;
644 margin-bottom: 10px;
645 border-radius: 5px;
646}
647.kanban .box-flex-item {
648 line-height: 1.4em;
649}
650.kanban .box-flex-item-5lines {
651 line-height: 1.18em;
652}
653
654/* css for small kanban */
655.box-flex-item-small {
656 width: 200px !important;
657}
658.box-flex-item-small .info-box-sm .info-box-content {
659 margin-left: 0;
660}
661.box-flex-item-small .info-box-icon.bg-infobox-action {
662 display: none;
663}
664
665
666@media only screen and (max-width: 767px)
667{
668 .box-flex-container {
669 margin: 0 0 0 0 !important;
670 }
671}
672
673.info-box-title {
674 width: calc(100% - 20px);
675}
676.info-box-module {
677 min-width: 350px;
678 max-width: 350px;
679}
680.info-box-module .info-box-content {
681 height: 94px;
682}
683.fright {
684 float:right;
685}
686
687@media only screen and (max-width: 1740px) {
688 .info-box-module {
689 min-width: 315px;
690 max-width: 315px;
691 }
692}
693@media only screen and (max-width: 768px) {
694 .info-box-module {
695 min-width: 260px;
696 }
697 .info-box-sm .info-box-icon {
698 width: 60px;
699 }
700 .info-box-sm .info-box-content {
701 margin-left: 60px;
702 }
703 .info-box-content {
704 padding-top: 5px;
705 padding-bottom: 5px;
706 padding-left: 10px;
707 padding-right: 2px;
708 }
709 /*
710 .info-box-line-text {
711 width: calc(100% - 92px);
712 max-width: calc(100% - 82px);
713 }
714 */
715}
716
717@media only screen and (max-width: 480px) {
718 .info-box-module {
719 min-width: 250px;
720 }
721 .box-flex-item {
722 width: 250px;
723 }
724}
725
726/* customize section for home box link */
727.infobox-haslink .info-box-icon i {
728 transition: opacity 0.2s ease-in-out;
729}
730.infobox-haslink .info-box-icon:hover i {
731 opacity: 0.2;
732}
733.infobox-haslink .info-box-icon .info-box-createlink {
734 height:100%;
735 width:100%;
736 display:block;
737 position:absolute;
738 top:0;
739 left:0;
740 font-size:0.6em;
741 display: flex;
742 opacity: 0;
743 transition: opacity 0.2s ease-in-out;
744 color:inherit;
745 text-decoration: none;
746}
747.infobox-haslink .info-box-icon:hover .info-box-createlink {
748 opacity: 1;
749}
750.infobox-haslink .info-box-icon .info-box-createlink span.fas {
751 margin:auto;
752}
print $object position
Definition edit.php:207
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOSTFLOAT($paramname, $rounding='', $option=2)
Return the value of a $_GET or $_POST supervariable, converted into float.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
a disabled
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
Definition repair.php:125