You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.9KB

  1. <div class="panel panel-primary">
  2. <div class="panel-heading">
  3. <h2 class="panel-title">
  4. <span class="glyphicon glyphicon-stats"></span>
  5. <span class="the-title">Opendistrib en quelques chiffres</span>
  6. </h2>
  7. </div>
  8. <div class="panel-body">
  9. <div class="row">
  10. <?= few_numbers_item($countProducersActive, 'Producteurs', 'actifs sur les 3 derniers mois'); ?>
  11. <?= few_numbers_item(few_numbers_format_number($countUsersActive), 'Clients', 'actifs sur les 3 derniers mois'); ?>
  12. </div>
  13. <div class="row">
  14. <?= few_numbers_item(few_numbers_format_number($countPointSalesActive), 'Points de vente', 'actifs sur les 3 derniers mois'); ?>
  15. <?= few_numbers_item(few_numbers_format_number($averageOrdersPerDay), 'Commandes clients / jour', 'en moyenne sur les 7 derniers jours'); ?>
  16. </div>
  17. <div class="row">
  18. <?= few_numbers_item(few_numbers_format_number($averageTurnover).' €', 'CA producteurs / mois', 'moyenne sur les 3 derniers mois'); ?>
  19. <?= few_numbers_item(few_numbers_format_number($numberVisitsMonth), 'Visiteurs', 'le mois dernier'); ?>
  20. </div>
  21. <?php if($countProducersWithOptionTimeSaved): ?>
  22. <div class="row">
  23. <?= few_numbers_item($timeSavedByProducersAverage.' h', 'Heures gagnées par semaine', 'moyenne sur '.$countProducersWithOptionTimeSaved.' producteur'.(($countProducersWithOptionTimeSaved) ? 's' : '')); ?>
  24. </div>
  25. <?php endif; ?>
  26. </div>
  27. </div>
  28. <?php
  29. function few_numbers_item($number, $description, $detail = null) {
  30. $html = '<div class="col-md-6 item"><div class="number">'.$number.'</div><div class="description">'.$description.'</div>';
  31. if($detail) {
  32. $html .= '<div class="detail">'.$detail.'</div>';
  33. }
  34. $html .= '</div>';
  35. return $html;
  36. }
  37. function few_numbers_format_number($number) {
  38. return number_format($number, 0, '', ' ');
  39. }
  40. ?>