info-box.inc.php 11 KB

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