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