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