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