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