layout
3 years ago
learn
3 years ago
settings
3 years ago
table
3 years ago
campaign_builder.php
3 years ago
migration_running.php
3 years ago
quick_stats.php
3 years ago
quick_stats.php
28 lines
| 1 | <?php $class = $is_filtered ? 'quick-stats filtered' : 'quick-stats' ?> |
| 2 | <div id="quick-stats" class="<?php echo esc_attr($class) ?>"> |
| 3 | <?php foreach ($stats as $stat): ?> |
| 4 | <div class="stat <?php echo $stat['class'] ?>"> |
| 5 | <div class="metric"> |
| 6 | <?php echo $stat['title'] ?> |
| 7 | <span class="dashicons dashicons-filter"></span> |
| 8 | <svg class="circle" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> |
| 9 | <circle cx="50" cy="50" r="50"/> |
| 10 | </svg> |
| 11 | </div> |
| 12 | <div class="values"> |
| 13 | <span class="count" test-value="<?php esc_attr_e($stat['count']); ?>"><?php esc_html_e(number_format($stat['count'])) ?></span> |
| 14 | <span class="growth"> |
| 15 | <?php $direction = $stat['growth'] >= 0 ? 'up' : 'down' ?> |
| 16 | <span class="percentage <?php echo esc_attr($direction) ?>" test-value="<?php esc_attr_e($stat['growth']); ?>"> |
| 17 | <span class="dashicons dashicons-arrow-<?php echo esc_attr($direction) ?>"></span> |
| 18 | <?php esc_html_e(number_format($stat['growth'])) ?>% |
| 19 | </span> |
| 20 | </span> |
| 21 | </div> |
| 22 | <div class="period-label"> |
| 23 | <?php esc_html_e('vs. previous period', 'iawp') ?> |
| 24 | </div> |
| 25 | </div> |
| 26 | <?php endforeach; ?> |
| 27 | </div> |
| 28 |