info-box.inc.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  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 (!empty($conf->global->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 !important;
  87. }
  88. .infobox-project{
  89. color: #6c6aa8 !important;
  90. }
  91. .infobox-action{
  92. color: #a47080 !important;
  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 !important;
  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 !important;
  105. }
  106. .infobox-contrat, .infobox-ticket{
  107. color: #46a676 !important;
  108. }
  109. .infobox-bank_account{
  110. color: #b0a53e !important;
  111. }
  112. .infobox-adherent, .infobox-member {
  113. color: #79633f !important;
  114. }
  115. .infobox-expensereport{
  116. color: #79633f !important;
  117. }
  118. .infobox-holiday{
  119. color: #755114 !important;
  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. }
  127. a.info-box-text-a i.fa.fa-exclamation-triangle {
  128. font-size: 0.9em;
  129. }
  130. .info-box {
  131. display: block;
  132. position: relative;
  133. min-height: 90px;
  134. background: var(--colorbacklineimpair2);
  135. width: 100%;
  136. /* box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); */
  137. border-radius: 2px;
  138. margin-bottom: 15px;
  139. border: 1px solid #e9e9e9;
  140. }
  141. .info-box.info-box-sm {
  142. min-height: 80px;
  143. margin-bottom: 10px;
  144. }
  145. .info-box-more {
  146. float: right;
  147. top: 4px;
  148. position: absolute;
  149. right: 10px;
  150. }
  151. .info-box small {
  152. font-size: 14px;
  153. }
  154. .info-box .progress {
  155. background: rgba(0, 0, 0, 0.2);
  156. margin: 5px -10px 5px -10px;
  157. height: 2px;
  158. }
  159. .info-box .progress,
  160. .info-box .progress .progress-bar {
  161. border-radius: 0;
  162. }
  163. .info-box .progress .progress-bar {
  164. float: left;
  165. width: 0;
  166. height: 100%;
  167. font-size: 12px;
  168. line-height: 20px;
  169. color: #fff;
  170. text-align: center;
  171. background-color: #337ab7;
  172. -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
  173. box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
  174. -webkit-transition: width .6s ease;
  175. -o-transition: width .6s ease;
  176. transition: width .6s ease;
  177. }
  178. .info-box-icon {
  179. display: block;
  180. overflow: hidden;
  181. float: left;
  182. /* height: 90px; */
  183. width: 90px;
  184. text-align: center;
  185. font-size: 45px;
  186. line-height: 90px;
  187. background: var(--colorbacktitle1) !important;
  188. <?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?>
  189. filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>);
  190. <?php } ?>
  191. }
  192. .info-box-sm .info-box-icon {
  193. height: 96px;
  194. width: 80px;
  195. font-size: 25px;
  196. line-height: 92px;
  197. }
  198. .info-box-module .info-box-icon {
  199. padding-top: 4px;
  200. padding-bottom: 4px;
  201. }
  202. .opened-dash-board-wrap .info-box .info-box-icon {
  203. font-size: 2em;
  204. }
  205. .opened-dash-board-wrap .info-box-sm .info-box-icon {
  206. line-height: 80px;
  207. }
  208. .info-box-module .info-box-icon {
  209. height: 98px;
  210. }
  211. .info-box-icon > img {
  212. max-width: 85%;
  213. }
  214. .info-box-module .info-box-icon > img {
  215. max-width: 55%;
  216. }
  217. .info-box-icon-text{
  218. box-sizing: border-box;
  219. display: block;
  220. position: absolute;
  221. width: 90px;
  222. bottom: 0px;
  223. color: #ffffff;
  224. background-color: rgba(0,0,0,0.1);
  225. cursor: default;
  226. font-size: 10px;
  227. line-height: 15px;
  228. padding: 0px 3px;
  229. text-align: center;
  230. opacity: 0;
  231. -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
  232. transition: opacity 0.5s, visibility 0s 0.5s;
  233. }
  234. .info-box-icon-version {
  235. box-sizing: border-box;
  236. display: block;
  237. position: absolute;
  238. width: 90px;
  239. bottom: 0px;
  240. color: #ffffff;
  241. background-color: rgba(0,0,0,0.1);
  242. cursor: default;
  243. font-size: 10px;
  244. line-height: 1.5em;
  245. padding: 4px 3px;
  246. text-align: center;
  247. opacity: 1;
  248. -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
  249. transition: opacity 0.5s, visibility 0s 0.5s;
  250. }
  251. .box-flex-item.info-box-module.--disabled {
  252. /* opacity: 0.6; */
  253. }
  254. .info-box-actions {
  255. position: absolute;
  256. right: 0;
  257. bottom: 0;
  258. }
  259. <?php if (empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?>
  260. .info-box-icon-text{
  261. opacity: 1;
  262. }
  263. <?php } ?>
  264. .info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{
  265. overflow: hidden;
  266. width: 80px;
  267. }
  268. .info-box:hover .info-box-icon-text{
  269. opacity: 1;
  270. }
  271. .info-box-content {
  272. padding: 5px 10px;
  273. margin-left: 84px;
  274. }
  275. .info-box-sm .info-box-content {
  276. margin-left: 80px;
  277. height: 86px; /* 96 - margins of .info-box-sm .info-box-content */
  278. }
  279. .info-box-sm .info-box-module-enabled {
  280. /* background: linear-gradient(0.35turn, #fff, #fff, #f6faf8, #e4efe8) */
  281. background: var(--infoboxmoduleenabledbgcolor);
  282. }
  283. .info-box-content-warning span.font-status4 {
  284. color: #bc9526 !important;
  285. }
  286. .info-box-number {
  287. display: block;
  288. font-weight: bold;
  289. font-size: 18px;
  290. }
  291. .progress-description,
  292. .info-box-text,
  293. .info-box-title{
  294. display: block;
  295. font-size: 12px;
  296. white-space: nowrap;
  297. overflow: hidden;
  298. text-overflow: ellipsis;
  299. }
  300. .info-box-title{
  301. text-transform: uppercase;
  302. font-weight: bold;
  303. margin-bottom: 6px;
  304. }
  305. .info-box-title {
  306. width: calc(100% - 20px);
  307. }
  308. .info-box-text{
  309. font-size: 0.92em;
  310. }
  311. .info-box-text:first-letter{text-transform: uppercase}
  312. a.info-box-text{ text-decoration: none;}
  313. .info-box-more {
  314. display: block;
  315. }
  316. .progress-description {
  317. margin: 0;
  318. }
  319. /* ICONS INFO BOX */
  320. <?php
  321. include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  322. $prefix = '';
  323. if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) {
  324. $prefix = 'background-';
  325. }
  326. if (!isset($conf->global->THEME_SATURATE_RATIO)) {
  327. $conf->global->THEME_SATURATE_RATIO = 0.7;
  328. }
  329. if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
  330. $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int');
  331. }
  332. ?>
  333. .bg-infobox-project i.fa{
  334. color: #605ca8 !important;
  335. }
  336. .bg-infobox-action i.fa{
  337. color: #d84b80 !important;
  338. }
  339. .bg-infobox-propal i.fa,
  340. .bg-infobox-facture i.fa,
  341. .bg-infobox-commande i.fa{
  342. color: #abb87b !important;
  343. }
  344. .bg-infobox-supplier_proposal i.fa,
  345. .bg-infobox-invoice_supplier i.fa,
  346. .bg-infobox-order_supplier i.fa{
  347. color: #40b0cf !important;
  348. }
  349. .bg-infobox-contrat i.fa, .bg-infobox-ticket i.fa{
  350. color: #20a68a !important;
  351. }
  352. .bg-infobox-bank_account i.fa{
  353. color: #b0a53e !important;
  354. }
  355. .bg-infobox-adherent i.fa, .bg-infobox-member i.fa{
  356. color: #755114 !important;
  357. }
  358. .bg-infobox-expensereport i.fa{
  359. color: #755114 !important;
  360. }
  361. .bg-infobox-holiday i.fa{
  362. color: #755114 !important;
  363. }
  364. .fa-dol-action:before {
  365. content: "\f073";
  366. }
  367. .fa-dol-propal:before,
  368. .fa-dol-supplier_proposal:before {
  369. content: "\f573";
  370. }
  371. .fa-dol-facture:before,
  372. .fa-dol-invoice_supplier:before {
  373. content: "\f571";
  374. }
  375. .fa-dol-project:before {
  376. content: "\f542";
  377. }
  378. .fa-dol-commande:before,
  379. .fa-dol-order_supplier:before {
  380. content: "\f570";
  381. }
  382. .fa-dol-contrat:before {
  383. content: "\f1e6";
  384. }
  385. .fa-dol-ticket:before {
  386. content: "\f3ff";
  387. }
  388. .fa-dol-bank_account:before {
  389. content: "\f19c";
  390. }
  391. .fa-dol-member:before {
  392. content: "\f0c0";
  393. }
  394. .fa-dol-expensereport:before {
  395. content: "\f555";
  396. }
  397. .fa-dol-holiday:before {
  398. content: "\f5ca";
  399. }
  400. /* USING FONTAWESOME FOR WEATHER */
  401. .info-box-weather .info-box-icon{
  402. background: var(--colorbacktitle1) !important;
  403. }
  404. .fa-weather-level0:before{
  405. content: "\f185";
  406. color : #cfbf00;
  407. }
  408. .fa-weather-level1:before{
  409. content: "\f6c4";
  410. color : #bc9526;
  411. }
  412. .fa-weather-level2:before{
  413. content: "\f743";
  414. color : #b16000;
  415. }
  416. .fa-weather-level3:before{
  417. content: "\f740";
  418. color : #b04000;
  419. }
  420. .fa-weather-level4:before{
  421. content: "\f0e7";
  422. color : #b01000;
  423. }
  424. /* USING IMAGES FOR WEATHER INTEAD OF FONT AWESOME */
  425. /* For other themes just uncomment this part */
  426. /*.info-box-weather-level0,
  427. .info-box-weather-level1,
  428. .info-box-weather-level2,
  429. .info-box-weather-level3,
  430. .info-box-weather-level4 {
  431. background-position: 15px 50%;
  432. background-repeat: no-repeat;
  433. }
  434. .info-box-weather .info-box-icon{
  435. display: none !important;
  436. }
  437. .info-box-weather-level0 {
  438. background-image: url("img/weather/weather-clear.png");
  439. }
  440. .info-box-weather-level1 {
  441. background-image: url("img/weather/weather-few-clouds.png");
  442. }
  443. .info-box-weather-level2 {
  444. background-image: url("img/weather/weather-clouds.png");
  445. }
  446. .info-box-weather-level3 {
  447. background-image: url("img/weather/weather-many-clouds.png");
  448. }
  449. .info-box-weather-level4 {
  450. background-image: url("img/weather/weather-storm.png");
  451. }*/
  452. .box-flex-container{
  453. display: flex; /* or inline-flex */
  454. flex-direction: row;
  455. flex-wrap: wrap;
  456. width: 100%;
  457. margin: 0 0 0 -15px;
  458. /*justify-content: space-between;*/
  459. }
  460. .box-flex-grow-zero{
  461. flex-grow: 0 !important;
  462. }
  463. .box-flex-item{
  464. flex-grow : 1;
  465. flex-shrink: 1;
  466. flex-basis: auto;
  467. width: 280px;
  468. margin: 5px 0px 0px 15px;
  469. }
  470. .box-flex-item.filler{
  471. margin: 0px 0px 0px 15px !important;
  472. height: 0;
  473. }
  474. .info-box-title {
  475. width: calc(100% - 20px);
  476. }
  477. .info-box-module {
  478. min-width: 350px;
  479. max-width: 350px;
  480. }
  481. .info-box-module .info-box-content {
  482. height: 6.3em;
  483. }
  484. @media only screen and (max-width: 1740px) {
  485. .info-box-module {
  486. min-width: 315px;
  487. max-width: 315px;
  488. }
  489. }
  490. @media only screen and (max-width: 767px) {
  491. .info-box-module {
  492. min-width: 260px;
  493. }
  494. .info-box-sm .info-box-icon {
  495. width: 60px;
  496. }
  497. .info-box-sm .info-box-content {
  498. margin-left: 60px;
  499. }
  500. }