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