email
2 years ago
icons
2 years ago
interrupt
2 years ago
partials
2 years ago
settings
2 years ago
tables
2 years ago
campaign-builder.blade.php
2 years ago
plugin-group-options.blade.php
2 years ago
quick-stats.blade.php
2 years ago
real_time.blade.php
2 years ago
support.blade.php
2 years ago
updates.blade.php
2 years ago
quick-stats.blade.php
54 lines
| 1 | @php /** @var \IAWP\Plugin_Group[] $plugin_groups */ @endphp |
| 2 | @php /** @var \IAWP\Quick_Stat[] $quick_stats */ @endphp |
| 3 | @php /** @var bool $is_dashboard_widget */ @endphp |
| 4 | |
| 5 | <div id="quick-stats" data-controller="quick-stats" class="{{ esc_attr($quick_stats_html_class) }}"> |
| 6 | @if(!$is_dashboard_widget) |
| 7 | @include('plugin-group-options', [ |
| 8 | 'option_type' => 'quick_stats', |
| 9 | 'option_name' => __('Toggle Stats', 'independent-analytics'), |
| 10 | 'option_icon' => 'visibility', |
| 11 | 'plugin_groups' => $plugin_groups, |
| 12 | 'options' => $quick_stats |
| 13 | ]) |
| 14 | @endif |
| 15 | |
| 16 | {{-- Quick stats --}} |
| 17 | <div class="stats"> |
| 18 | @foreach($quick_stats as $quick_stat) |
| 19 | @if($is_dashboard_widget && !$quick_stat->is_visible_in_dashboard_widget()) |
| 20 | @continue |
| 21 | @endif |
| 22 | |
| 23 | @if(!$quick_stat->is_enabled()) |
| 24 | @continue |
| 25 | @endif |
| 26 | |
| 27 | <div class="stat {{ $quick_stat->id() }} {{ $quick_stat->is_visible() ? 'visible' : ''}}" data-id="{{ $quick_stat->id() }}" data-quick-stats-target="quickStat"> |
| 28 | <div class="metric"> |
| 29 | <span class="metric-name">{{ $quick_stat->name() }}</span> |
| 30 | @if(!is_null($quick_stat->icon())) |
| 31 | <span class="plugin-label">{!! iawp_icon($quick_stat->icon()) !!}</span> |
| 32 | @endif |
| 33 | </div> |
| 34 | <div class="values"> |
| 35 | <span class="count" |
| 36 | test-value="{{ esc_attr(strip_tags($quick_stat->total())) }}"> |
| 37 | {!! wp_kses($quick_stat->total(), ['span' => []]) !!} |
| 38 | @if($quick_stat->unfiltered_total()) |
| 39 | <span class="unfiltered"> / {!! wp_kses($quick_stat->unfiltered_total(), ['span' => []]) !!}</span> |
| 40 | @endif |
| 41 | </span> |
| 42 | </div> |
| 43 | <span class="growth"> |
| 44 | <span class="percentage {{ esc_attr($quick_stat->growth_html_class()) }}" |
| 45 | test-value="{{ esc_attr($quick_stat->unformatted_growth()) }}"> |
| 46 | <span class="dashicons dashicons-arrow-up-alt growth-arrow"></span> |
| 47 | {{ $quick_stat->growth() }} |
| 48 | </span> |
| 49 | <span class="period-label">{{ __('vs. previous period', 'independent-analytics') }}</span> |
| 50 | </span> |
| 51 | </div> |
| 52 | @endforeach |
| 53 | </div> |
| 54 | </div> |