info-box.inc.php 10 KB

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