|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <div class="panel panel-primary">
- <div class="panel-heading">
- <h2 class="panel-title">
- <span class="glyphicon glyphicon-stats"></span>
- <span class="the-title">Opendistrib en quelques chiffres</span>
- </h2>
- </div>
- <div class="panel-body">
- <div class="row">
- <?= few_numbers_item($countProducersActive, 'Producteurs', 'actifs sur les 3 derniers mois'); ?>
- <?= few_numbers_item(few_numbers_format_number($countUsersActive), 'Clients', 'actifs sur les 3 derniers mois'); ?>
- </div>
- <div class="row">
- <?= few_numbers_item(few_numbers_format_number($countPointSalesActive), 'Points de vente', 'actifs sur les 3 derniers mois'); ?>
- <?= few_numbers_item(few_numbers_format_number($averageOrdersPerDay), 'Commandes clients / jour', 'en moyenne sur les 7 derniers jours'); ?>
- </div>
- <div class="row">
- <?= few_numbers_item(few_numbers_format_number($averageTurnover).' €', 'CA producteurs / mois', 'moyenne sur les 3 derniers mois'); ?>
- <?= few_numbers_item(few_numbers_format_number($numberVisitsMonth), 'Visiteurs', 'le mois dernier'); ?>
- </div>
- <?php if($countProducersWithOptionTimeSaved): ?>
- <div class="row">
- <?= few_numbers_item($timeSavedByProducersAverage.' h', 'Heures gagnées par semaine', 'moyenne sur '.$countProducersWithOptionTimeSaved.' producteur'.(($countProducersWithOptionTimeSaved) ? 's' : '')); ?>
- </div>
- <?php endif; ?>
- </div>
- </div>
-
- <?php
-
- function few_numbers_item($number, $description, $detail = null) {
- $html = '<div class="col-md-6 item"><div class="number">'.$number.'</div><div class="description">'.$description.'</div>';
-
- if($detail) {
- $html .= '<div class="detail">'.$detail.'</div>';
- }
-
- $html .= '</div>';
-
- return $html;
- }
-
- function few_numbers_format_number($number) {
- return number_format($number, 0, '', ' ');
- }
-
- ?>
|