info-box.inc.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. <?php
  2. if (!defined('ISLOADEDBYSTEELSHEET')) {
  3. die('Must be call by steelsheet');
  4. } ?>
  5. /* <style type="text/css" > */
  6. /*
  7. * Component: Info Box
  8. * -------------------
  9. */
  10. <?php
  11. include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  12. $prefix = '';
  13. if (getDolGlobalString('THEME_INFOBOX_COLOR_ON_BACKGROUND')) {
  14. $prefix = 'background-';
  15. }
  16. if (!isset($conf->global->THEME_SATURATE_RATIO)) {
  17. $conf->global->THEME_SATURATE_RATIO = 0.7;
  18. }
  19. if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
  20. $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int');
  21. }
  22. ?>
  23. .customer-back {
  24. background-color: #65953d !important;
  25. color: #FFF !important;
  26. padding: 2px;
  27. margin: 2px;
  28. border-radius: 3px;
  29. }
  30. .vendor-back {
  31. background-color: #599caf !important;
  32. color: #FFF !important;
  33. padding: 2px;
  34. margin: 2px;
  35. border-radius: 3px;
  36. }
  37. .user-back {
  38. background-color: #79633f !important;
  39. color: #FFF !important;
  40. padding: 2px;
  41. margin: 2px;
  42. border-radius: 3px;
  43. }
  44. .member-company-back {
  45. padding: 2px 7px 2px 7px;
  46. background-color: #e4e4e4;
  47. color: #666;
  48. border-radius: 10px;
  49. white-space: nowrap;
  50. }
  51. .member-individual-back {
  52. padding: 2px 7px 2px 7px;
  53. background-color: #e4e4e4;
  54. color: #666;
  55. border-radius: 10px;
  56. white-space: nowrap;
  57. }
  58. .bg-infobox-project{
  59. <?php echo $prefix; ?>color: #6c6aa8 !important;
  60. }
  61. .bg-infobox-action{
  62. <?php echo $prefix; ?>color: #a47080 !important;
  63. }
  64. .bg-infobox-propal, .bg-infobox-facture, .bg-infobox-commande {
  65. <?php echo $prefix; ?>color: #65953d !important;
  66. }
  67. .bg-infobox-supplier_proposal, .bg-infobox-invoice_supplier, .bg-infobox-order_supplier {
  68. <?php echo $prefix; ?>color: #599caf !important;
  69. }
  70. .bg-infobox-contrat, .bg-infobox-ticket{
  71. <?php echo $prefix; ?>color: #46a676 !important;
  72. }
  73. .bg-infobox-bank_account{
  74. <?php echo $prefix; ?>color: #b0a53e !important;
  75. }
  76. .bg-infobox-adherent, .bg-infobox-member{
  77. <?php echo $prefix; ?>color: #79633f !important;
  78. }
  79. .bg-infobox-expensereport{
  80. <?php echo $prefix; ?>color: #79633f !important;
  81. }
  82. .bg-infobox-holiday{
  83. <?php echo $prefix; ?>color: #755114 !important;
  84. }
  85. .infobox-adherent, .infobox-member {
  86. color: #79633f;
  87. }
  88. .infobox-project{
  89. color: #6c6aa8;
  90. }
  91. .infobox-action{
  92. color: #a47080;
  93. }
  94. /* Color for customer object */
  95. .infobox-propal:not(.pictotitle):not(.error),
  96. .infobox-facture:not(.pictotitle):not(.error),
  97. .infobox-commande:not(.pictotitle):not(.error) {
  98. color: #65953d;
  99. }
  100. /* Color for vendor object */
  101. .infobox-supplier_proposal:not(.pictotitle):not(.error),
  102. .infobox-invoice_supplier:not(.pictotitle):not(.error),
  103. .infobox-order_supplier:not(.pictotitle):not(.error) {
  104. color: #599caf;
  105. }
  106. .infobox-contrat, .infobox-ticket{
  107. color: #46a676;
  108. }
  109. .infobox-bank_account{
  110. color: #b0a53e;
  111. }
  112. .infobox-adherent, .infobox-member {
  113. color: #79633f;
  114. }
  115. .infobox-expensereport{
  116. color: #79633f;
  117. }
  118. .infobox-holiday{
  119. color: #755114;
  120. }
  121. .info-box-module.--external span.info-box-icon-version {
  122. background: #bbb;
  123. }
  124. a.info-box-text.info-box-text-a {
  125. /* display: table-cell; */
  126. display: contents;
  127. }
  128. a.info-box-text-a i.fa.fa-exclamation-triangle {
  129. font-size: 0.9em;
  130. }
  131. .info-box {
  132. display: block;
  133. position: relative;
  134. min-height: 90px;
  135. background: var(--colorbacklineimpair2);
  136. width: 100%;
  137. /* box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); */
  138. border-radius: 2px;
  139. margin-bottom: 15px;
  140. border: 1px solid #e9e9e9;
  141. }
  142. .info-box.info-box-sm {
  143. min-height: 80px;
  144. margin-bottom: 10px;
  145. }
  146. .info-box-more {
  147. float: right;
  148. top: 4px;
  149. position: absolute;
  150. right: 10px;
  151. }
  152. .info-box small {
  153. font-size: 14px;
  154. }
  155. .info-box:not(.info-box-kanban) .progress {
  156. background: rgba(0, 0, 0, 0.2);
  157. margin: 5px -10px 5px -10px;
  158. height: 2px;
  159. }
  160. .info-box .progress,
  161. .info-box .progress .progress-bar {
  162. border-radius: 0;
  163. }
  164. .info-box:not(.info-box-kanban) .progress .progress-bar {
  165. float: left;
  166. width: 0;
  167. height: 100%;
  168. font-size: 12px;
  169. line-height: 20px;
  170. color: #fff;
  171. text-align: center;
  172. background-color: #337ab7;
  173. -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
  174. box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
  175. -webkit-transition: width .6s ease;
  176. -o-transition: width .6s ease;
  177. transition: width .6s ease;
  178. }
  179. .info-box-icon {
  180. display: block;
  181. overflow: hidden;
  182. float: left;
  183. /* height: 90px; */
  184. width: 86px;
  185. text-align: center;
  186. font-size: 45px;
  187. line-height: 90px;
  188. background: var(--colorbacktitle1) !important;
  189. <?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?>
  190. filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>);
  191. <?php } ?>
  192. }
  193. .info-box-module .info-box-icon {
  194. padding-top: 4px;
  195. padding-bottom: 4px;
  196. }
  197. .info-box-sm .info-box-icon, .info-box-sm .info-box-img {
  198. height: 96px !important; /* must match height of info-box-sm .info-box-content */
  199. width: 80px;
  200. font-size: 25px;
  201. line-height: 92px;
  202. }
  203. .info-box-order {
  204. border-top-left-radius: 2px;
  205. border-top-right-radius: 0;
  206. border-bottom-right-radius: 0;
  207. border-bottom-left-radius: 2px;
  208. display: block;
  209. overflow: hidden;
  210. float: left;
  211. height: 115px;
  212. width: 88px;
  213. text-align: center;
  214. font-size: 2.3em;
  215. line-height: 115px;
  216. margin-right: 10px;
  217. background: var(--colorbacktitle1) !important;
  218. }
  219. .opened-dash-board-wrap .info-box .info-box-icon {
  220. font-size: 2em;
  221. }
  222. .opened-dash-board-wrap .info-box-sm .info-box-icon {
  223. line-height: 80px;
  224. }
  225. .info-box-module .info-box-icon {
  226. height: 98px;
  227. }
  228. .info-box-icon > img {
  229. max-width: 85%;
  230. }
  231. .info-box-module .info-box-icon > img {
  232. max-width: 55%;
  233. }
  234. .info-box-line {
  235. line-height: 1.2em;
  236. }
  237. .info-box-line-text {
  238. overflow: hidden;
  239. width: calc(100% - 76px);
  240. text-overflow: ellipsis;
  241. }
  242. .info-box-icon-text {
  243. box-sizing: border-box;
  244. display: block;
  245. position: absolute;
  246. width: 90px;
  247. bottom: 0px;
  248. color: #ffffff;
  249. background-color: rgba(0,0,0,0.1);
  250. cursor: default;
  251. font-size: 10px;
  252. line-height: 15px;
  253. padding: 0px 3px;
  254. text-align: center;
  255. opacity: 0;
  256. -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
  257. transition: opacity 0.5s, visibility 0s 0.5s;
  258. }
  259. .info-box-icon-version {
  260. box-sizing: border-box;
  261. display: block;
  262. position: absolute;
  263. width: 90px;
  264. bottom: 0px;
  265. color: #ffffff;
  266. background-color: rgba(0,0,0,0.1);
  267. cursor: default;
  268. font-size: 10px;
  269. line-height: 1.5em;
  270. padding: 4px 3px;
  271. text-align: center;
  272. opacity: 1;
  273. -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
  274. transition: opacity 0.5s, visibility 0s 0.5s;
  275. }
  276. .box-flex-item.info-box-module.--disabled {
  277. /* opacity: 0.6; */
  278. }
  279. .info-box-actions {
  280. position: absolute;
  281. right: 0;
  282. bottom: 0;
  283. }
  284. /* customize section img box on list of products */
  285. .info-box-img {
  286. height: 105px !important;
  287. width: 88px;
  288. border-top-left-radius: 2px;
  289. border-top-right-radius: 0;
  290. border-bottom-right-radius: 0;
  291. border-bottom-left-radius: 2px;
  292. display: block;
  293. overflow: hidden;
  294. float: left;
  295. text-align: center;
  296. font-size: 2.8em;
  297. line-height: 90px;
  298. margin-right: 5px;
  299. background: var(--colorbacktitle1) !important;
  300. }
  301. .info-box-img > img {
  302. width: 90%;
  303. position: relative;
  304. top: 50%;
  305. left: 50%;
  306. transform: translate(-50%, -50%);
  307. }
  308. <?php if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_BOXSTATS') && getDolGlobalString('MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD')) { ?>
  309. .info-box-icon-text{
  310. opacity: 1;
  311. }
  312. <?php } ?>
  313. .info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{
  314. overflow: hidden;
  315. width: 80px;
  316. }
  317. .info-box:hover .info-box-icon-text{
  318. opacity: 1;
  319. }
  320. .info-box-content {
  321. padding: 5px 10px;
  322. margin-left: 84px;
  323. }
  324. .info-box-sm .info-box-content {
  325. margin-left: 80px;
  326. height: 86px; /* 96 - margins of .info-box-sm .info-box-content */
  327. }
  328. .info-box-sm .info-box-module-enabled {
  329. /* background: linear-gradient(0.35turn, #fff, #fff, #f6faf8, #e4efe8) */
  330. background: var(--infoboxmoduleenabledbgcolor);
  331. }
  332. .info-box-content-warning span.font-status4 {
  333. color: #bc9526 !important;
  334. }
  335. .info-box-number {
  336. display: block;
  337. font-weight: bold;
  338. font-size: 18px;
  339. }
  340. .progress-description,
  341. .info-box-text,
  342. .info-box-title{
  343. display: block;
  344. font-size: 12px;
  345. white-space: nowrap;
  346. overflow: hidden;
  347. text-overflow: ellipsis;
  348. }
  349. .info-box-title{
  350. text-transform: uppercase;
  351. font-weight: bold;
  352. margin-bottom: 6px;
  353. }
  354. .info-box-title {
  355. width: calc(100% - 20px);
  356. }
  357. .info-box-text{
  358. font-size: 0.90em;
  359. }
  360. .info-box-text:first-letter{text-transform: uppercase}
  361. a.info-box-text{ text-decoration: none;}
  362. .info-box-more {
  363. display: block;
  364. }
  365. .progress-description {
  366. margin: 0;
  367. }
  368. /* ICONS INFO BOX */
  369. <?php
  370. include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  371. $prefix = '';
  372. if (getDolGlobalString('THEME_INFOBOX_COLOR_ON_BACKGROUND')) {
  373. $prefix = 'background-';
  374. }
  375. if (!isset($conf->global->THEME_SATURATE_RATIO)) {
  376. $conf->global->THEME_SATURATE_RATIO = 0.7;
  377. }
  378. if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
  379. $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int');
  380. }
  381. ?>
  382. .bg-infobox-project i.fa{
  383. color: #605ca8 !important;
  384. }
  385. .bg-infobox-action i.fa{
  386. color: #d84b80 !important;
  387. }
  388. .bg-infobox-propal i.fa,
  389. .bg-infobox-facture i.fa,
  390. .bg-infobox-commande i.fa{
  391. color: #abb87b !important;
  392. }
  393. .bg-infobox-supplier_proposal i.fa,
  394. .bg-infobox-invoice_supplier i.fa,
  395. .bg-infobox-order_supplier i.fa{
  396. color: #40b0cf !important;
  397. }
  398. .bg-infobox-contrat i.fa, .bg-infobox-ticket i.fa{
  399. color: #20a68a !important;
  400. }
  401. .bg-infobox-bank_account i.fa{
  402. color: #b0a53e !important;
  403. }
  404. .bg-infobox-adherent i.fa, .bg-infobox-member i.fa{
  405. color: #755114 !important;
  406. }
  407. .bg-infobox-expensereport i.fa{
  408. color: #755114 !important;
  409. }
  410. .bg-infobox-holiday i.fa{
  411. color: #755114 !important;
  412. }
  413. .fa-dol-action:before {
  414. content: "\f073";
  415. }
  416. .fa-dol-propal:before,
  417. .fa-dol-supplier_proposal:before {
  418. content: "\f573";
  419. }
  420. .fa-dol-facture:before,
  421. .fa-dol-invoice_supplier:before {
  422. content: "\f571";
  423. }
  424. .fa-dol-project:before {
  425. content: "\f542";
  426. }
  427. .fa-dol-commande:before,
  428. .fa-dol-order_supplier:before {
  429. content: "\f570";
  430. }
  431. .fa-dol-contrat:before {
  432. content: "\f1e6";
  433. }
  434. .fa-dol-ticket:before {
  435. content: "\f3ff";
  436. }
  437. .fa-dol-bank_account:before {
  438. content: "\f19c";
  439. }
  440. .fa-dol-member:before {
  441. content: "\f0c0";
  442. }
  443. .fa-dol-expensereport:before {
  444. content: "\f555";
  445. }
  446. .fa-dol-holiday:before {
  447. content: "\f5ca";
  448. }
  449. /* USING FONTAWESOME FOR WEATHER */
  450. .info-box-weather .info-box-icon{
  451. background: var(--colorbacktitle1) !important;
  452. }
  453. .fa-weather-level0:before{
  454. content: "\f185";
  455. color : #cfbf00;
  456. }
  457. .fa-weather-level1:before{
  458. content: "\f6c4";
  459. color : #bc9526;
  460. }
  461. .fa-weather-level2:before{
  462. content: "\f743";
  463. color : #b16000;
  464. }
  465. .fa-weather-level3:before{
  466. content: "\f740";
  467. color : #b04000;
  468. }
  469. .fa-weather-level4:before{
  470. content: "\f0e7";
  471. color : #b01000;
  472. }
  473. /* USING IMAGES FOR WEATHER INTEAD OF FONT AWESOME */
  474. /* For other themes just uncomment this part */
  475. /*.info-box-weather-level0,
  476. .info-box-weather-level1,
  477. .info-box-weather-level2,
  478. .info-box-weather-level3,
  479. .info-box-weather-level4 {
  480. background-position: 15px 50%;
  481. background-repeat: no-repeat;
  482. }
  483. .info-box-weather .info-box-icon{
  484. display: none !important;
  485. }
  486. .info-box-weather-level0 {
  487. background-image: url("img/weather/weather-clear.png");
  488. }
  489. .info-box-weather-level1 {
  490. background-image: url("img/weather/weather-few-clouds.png");
  491. }
  492. .info-box-weather-level2 {
  493. background-image: url("img/weather/weather-clouds.png");
  494. }
  495. .info-box-weather-level3 {
  496. background-image: url("img/weather/weather-many-clouds.png");
  497. }
  498. .info-box-weather-level4 {
  499. background-image: url("img/weather/weather-storm.png");
  500. }*/
  501. .box-flex-container{
  502. display: flex; /* or inline-flex */
  503. flex-direction: row;
  504. flex-wrap: wrap;
  505. width: 100%;
  506. margin: 0 0 0 -15px;
  507. /*justify-content: space-between;*/
  508. }
  509. .box-flex-grow-zero{
  510. flex-grow: 0 !important;
  511. }
  512. .box-flex-item{
  513. flex-grow : 1;
  514. flex-shrink: 1;
  515. flex-basis: auto;
  516. width: 280px;
  517. margin: 5px 0px 0px 15px;
  518. }
  519. .box-flex-item.filler{
  520. margin: 0px 0px 0px 15px !important;
  521. height: 0;
  522. }
  523. .info-box-title {
  524. width: calc(100% - 20px);
  525. }
  526. .info-box-module {
  527. min-width: 350px;
  528. max-width: 350px;
  529. }
  530. .info-box-module .info-box-content {
  531. height: 6.3em;
  532. }
  533. .fright {
  534. float:right;
  535. }
  536. @media only screen and (max-width: 1740px) {
  537. .info-box-module {
  538. min-width: 315px;
  539. max-width: 315px;
  540. }
  541. }
  542. @media only screen and (max-width: 767px) {
  543. .info-box-module {
  544. min-width: 260px;
  545. }
  546. .info-box-sm .info-box-icon {
  547. width: 60px;
  548. }
  549. .info-box-sm .info-box-content {
  550. margin-left: 60px;
  551. }
  552. }