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