info-box.inc.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. <?php
  2. if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
  3. /* <style type="text/css" > */
  4. /*
  5. * Component: Info Box
  6. * -------------------
  7. */
  8. .info-box-module-external span.info-box-icon-version {
  9. background: #bbb;
  10. }
  11. .info-box {
  12. display: block;
  13. position: relative;
  14. min-height: 90px;
  15. /* background: #fff; */
  16. width: 100%;
  17. box-shadow: 1px 1px 15px rgba(192, 192, 192, 0.2);
  18. border-radius: 2px;
  19. border: 1px solid #e9e9e9;
  20. margin-bottom: 15px;
  21. }
  22. .info-box.info-box-sm {
  23. min-height: 80px;
  24. margin-bottom: 10px;
  25. /* background: #fff; */
  26. }
  27. .opened-dash-board-wrap .info-box.info-box-sm {
  28. border-radius: 0 0 0 20px;
  29. }
  30. .info-box-more {
  31. float: right;
  32. top: 5px;
  33. position: absolute;
  34. right: 8px;
  35. }
  36. .info-box small {
  37. font-size: 14px;
  38. }
  39. .info-box .progress {
  40. background: rgba(0, 0, 0, 0.2);
  41. margin: 5px -10px 5px -10px;
  42. height: 2px;
  43. }
  44. .info-box .progress,
  45. .info-box .progress .progress-bar {
  46. border-radius: 0;
  47. }
  48. .info-box .progress .progress-bar {
  49. float: left;
  50. width: 0;
  51. height: 100%;
  52. font-size: 12px;
  53. line-height: 20px;
  54. color: #fff;
  55. text-align: center;
  56. background-color: #337ab7;
  57. -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
  58. box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
  59. -webkit-transition: width .6s ease;
  60. -o-transition: width .6s ease;
  61. transition: width .6s ease;
  62. }
  63. .info-box-icon {
  64. border-top-left-radius: 2px;
  65. border-top-right-radius: 0;
  66. border-bottom-right-radius: 0;
  67. border-bottom-left-radius: 2px;
  68. display: block;
  69. overflow: hidden;
  70. float: left;
  71. height: 90px;
  72. width: 90px;
  73. text-align: center;
  74. font-size: 45px;
  75. line-height: 90px;
  76. background: rgba(0, 0, 0, 0.08) !important;
  77. }
  78. .info-box-module .info-box-icon {
  79. padding-top: 5px;
  80. padding-bottom: 5px;
  81. }
  82. .info-box-sm .info-box-icon {
  83. height: 80px;
  84. width: 78px;
  85. font-size: 25px;
  86. line-height: 92px;
  87. }
  88. .opened-dash-board-wrap .info-box-sm .info-box-icon {
  89. border-radius: 0 0 0 20px;
  90. }
  91. .opened-dash-board-wrap .info-box-sm .info-box-icon {
  92. line-height: 80px;
  93. }
  94. .info-box-module .info-box-icon {
  95. height: 98px;
  96. }
  97. .info-box-icon > img {
  98. max-width: 100%;
  99. }
  100. .info-box-module .info-box-icon > img {
  101. max-width: 60%;
  102. }
  103. a.info-box-text.info-box-text-a {
  104. display: table-cell;
  105. }
  106. a.info-box-text-a i.fa.fa-exclamation-triangle {
  107. font-size: 0.9em;
  108. }
  109. .info-box-icon-text{
  110. box-sizing: border-box;
  111. display: block;
  112. position: absolute;
  113. width: 90px;
  114. bottom: 0px;
  115. color: #ffffff;
  116. background-color: rgba(0,0,0,0.1);
  117. cursor: default;
  118. font-size: 10px;
  119. line-height: 15px;
  120. padding: 0px 3px;
  121. text-align: center;
  122. opacity: 0;
  123. -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
  124. transition: opacity 0.5s, visibility 0s 0.5s;
  125. }
  126. .info-box-icon-version {
  127. box-sizing: border-box;
  128. display: block;
  129. position: absolute;
  130. width: 90px;
  131. bottom: 0px;
  132. color: #ffffff;
  133. background-color: rgba(0,0,0,0.1);
  134. cursor: default;
  135. font-size: 10px;
  136. line-height: 22px;
  137. padding: 0px 3px;
  138. text-align: center;
  139. opacity: 1;
  140. -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
  141. transition: opacity 0.5s, visibility 0s 0.5s;
  142. }
  143. .box-flex-item.info-box-module.info-box-module-disabled {
  144. /* opacity: 0.6; */
  145. }
  146. .info-box-actions {
  147. position: absolute;
  148. right: 0;
  149. bottom: 0;
  150. }
  151. <?php if (empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?>
  152. .info-box-icon-text{
  153. opacity: 1;
  154. }
  155. <?php } ?>
  156. .info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{
  157. overflow: hidden;
  158. width: 80px;
  159. }
  160. .info-box:hover .info-box-icon-text{
  161. opacity: 1;
  162. }
  163. .info-box-content {
  164. padding: 5px 10px;
  165. margin-left: 84px;
  166. }
  167. .info-box-sm .info-box-content{
  168. margin-left: 80px;
  169. }
  170. .info-box-sm .info-box-module-enabled {
  171. /* background: linear-gradient(0.35turn, #fff, #fff, #f6faf8, #e4efe8) */
  172. background: var(--infoboxmoduleenabledbgcolor);
  173. }
  174. .info-box-content-warning span.font-status4 {
  175. color: #bc9526 !important;
  176. }
  177. /*.info-box-sm .info-box-content-warning {
  178. background: #ffd7a3;
  179. }*/
  180. /*.info-box-icon.info-box-icon-module-enabled {
  181. background: #e4f0e4 !important;
  182. }*/
  183. .info-box-number {
  184. display: block;
  185. font-weight: bold;
  186. font-size: 18px;
  187. }
  188. .progress-description,
  189. .info-box-text,
  190. .info-box-title{
  191. display: block;
  192. font-size: 12px;
  193. white-space: nowrap;
  194. overflow: hidden;
  195. text-overflow: ellipsis;
  196. }
  197. .info-box-title{
  198. text-transform: uppercase;
  199. font-weight: bold;
  200. margin-bottom: 3px; /* not too much space so we can add another lines */
  201. opacity: 0.6;
  202. /* color: var(--colortexttitlenotab); */
  203. }
  204. .info-box-text{
  205. font-size: 0.92em;
  206. }
  207. .info-box-text:first-letter{text-transform: uppercase}
  208. a.info-box-text{ text-decoration: none;}
  209. .info-box-more {
  210. display: block;
  211. }
  212. .progress-description {
  213. margin: 0;
  214. }
  215. /* ICONS INFO BOX */
  216. <?php
  217. include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  218. $prefix = 'background-';
  219. if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-';
  220. if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.7;
  221. if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int');
  222. ?>
  223. .info-box-icon {
  224. <?php if ($prefix) { ?>
  225. color: #fff !important;
  226. <?php } ?>
  227. opacity: 0.95;
  228. <?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?>
  229. filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>);
  230. <?php } ?>
  231. }
  232. .customer-back, .vendor-back, .user-back {
  233. display: inline-block;
  234. width: 20px;
  235. height: 20px;
  236. line-height: 20px;
  237. font-size: 12px;
  238. border-radius: 50%;
  239. font-weight: bold;
  240. margin-right: 0.25rem;
  241. }
  242. .customer-back:only-child, .vendor-back:only-child, .user-back:only-child, .customer-back:last-child {
  243. margin-right: 0;
  244. }
  245. .customer-back {
  246. background: #727cf5 !important;
  247. color: #FFF !important;
  248. }
  249. .vendor-back {
  250. background: #FF8A65 !important;
  251. color: #FFF !important;
  252. }
  253. .user-back {
  254. background: #79633f !important;
  255. color: #FFF !important;
  256. }
  257. /* INFO-BOXES COLORS */
  258. .infobox-general .widget-icon {background-color: #727cf5!important;}
  259. .infobox-general a, .infobox-general {color: #727cf5 !important;}
  260. .infobox-project .widget-icon {background-color: #a29bfe !important;}
  261. .infobox-project a {color: #a29bfe !important;}
  262. .infobox-action .widget-icon {background-color: #ff7675 !important;}
  263. .infobox-action a {color: #ff7675 !important;}
  264. .infobox-propal .widget-icon, .infobox-facture .widget-icon, .infobox-commande .widget-icon {background-color: #74b9ff !important;}
  265. .infobox-propal a, .infobox-facture a, .infobox-commande a {color: #74b9ff !important;}
  266. .infobox-supplier_proposal .widget-icon, .infobox-invoice_supplier .widget-icon, .infobox-order_supplier .widget-icon {background-color: #599caf !important;}
  267. .infobox-supplier_proposal a, .infobox-invoice_supplier a, .infobox-order_supplier a {color: #599caf !important;}
  268. .infobox-contrat .widget-icon, .infobox-ticket .widget-icon{background-color: #3bbfa8 !important;}
  269. .infobox-contrat a, .infobox-ticket a{color: #3bbfa8 !important;}
  270. .infobox-bank_account .widget-icon{background-color: #e17055 !important;}
  271. .infobox-bank_account a{color: #e17055 !important;}
  272. .infobox-adherent .widget-icon, .infobox-member .widget-icon{background-color: #00cec9 !important;}
  273. .infobox-adherent a, .infobox-member a{color: #00cec9 !important;}
  274. .infobox-expensereport .widget-icon{background-color: #00cec9 !important;}
  275. .infobox-expensereport a{color: #00cec9 !important;}
  276. .infobox-holiday .widget-icon {background-color: #fdcb6e !important;}
  277. .infobox-holiday a {color: #fdcb6e !important;}
  278. .card.widget-flat div[class*="infobox-"] a:hover {
  279. filter: brightness(1.1);
  280. }
  281. /* INFO-BOXES ICONS */
  282. .fa-dol-action:before {
  283. content: "\f073";
  284. }
  285. .fa-dol-propal:before,
  286. .fa-dol-supplier_proposal:before {
  287. content: "\f573";
  288. }
  289. .fa-dol-facture:before,
  290. .fa-dol-invoice_supplier:before {
  291. content: "\f571";
  292. }
  293. .fa-dol-project:before {
  294. content: "\f0e8";
  295. }
  296. .fa-dol-commande:before,
  297. .fa-dol-order_supplier:before {
  298. content: "\f570";
  299. }
  300. .fa-dol-contrat:before {
  301. content: "\f1e6";
  302. }
  303. .fa-dol-ticket:before {
  304. content: "\f3ff";
  305. }
  306. .fa-dol-bank_account:before {
  307. content: "\f19c";
  308. }
  309. .fa-dol-member:before {
  310. content: "\f0c0";
  311. }
  312. .fa-dol-expensereport:before {
  313. content: "\f555";
  314. }
  315. .fa-dol-holiday:before {
  316. content: "\f5ca";
  317. }
  318. /* USING FONTAWESOME FOR WEATHER */
  319. .fa-weather-level0:before{
  320. content: "\f185";
  321. }
  322. .fa-weather-level1:before{
  323. content: "\f6c4";
  324. }
  325. .fa-weather-level2:before{
  326. content: "\f743";
  327. }
  328. .fa-weather-level3:before{
  329. content: "\f740";
  330. }
  331. .fa-weather-level4:before{
  332. content: "\f0e7";
  333. }
  334. .box-flex-container{
  335. display: flex; /* or inline-flex */
  336. flex-direction: row;
  337. flex-wrap: wrap;
  338. width: calc(100% + 14px);
  339. margin: 0 -8px 0 -8px;
  340. /*justify-content: space-between;*/
  341. }
  342. .box-flex-item{
  343. flex-grow : 1;
  344. flex-shrink: 1;
  345. flex-basis: auto;
  346. width: 280px;
  347. margin: 5px 8px 0px 8px;
  348. }
  349. .box-flex-item.filler{
  350. margin: 0px 0px 0px 15px !important;
  351. height: 0;
  352. }
  353. .info-box-title {
  354. width: calc(100% - 20px);
  355. }
  356. .info-box-module {
  357. min-width: 350px;
  358. max-width: 350px;
  359. }
  360. @media only screen and (max-width: 1740px) {
  361. .info-box-module {
  362. min-width: 315px;
  363. max-width: 315px;
  364. }
  365. }
  366. @media only screen and (max-width: 767px) {
  367. .info-box-module {
  368. min-width: 260px;
  369. }
  370. }
  371. .info-box-module .info-box-content {
  372. height: 98px;
  373. }
  374. /* Disabled. This break the responsive on smartphone
  375. .box{
  376. overflow: visible;
  377. }
  378. */
  379. @media only screen and (max-width: 767px)
  380. {
  381. .box-flex-container {
  382. margin: 0 0 0 0px !important;
  383. width: 100% !important;
  384. }
  385. .info-box-module {
  386. width: 100%;
  387. max-width: unset;
  388. }
  389. .info-box-sm .info-box-icon {
  390. width: 60px;
  391. }
  392. .info-box-sm .info-box-content {
  393. margin-left: 60px;
  394. }
  395. .info-box {
  396. border: 1px solid #e0e0e0;
  397. }
  398. }
  399. }