date-picker
1 year ago
email
2 years ago
icons
1 year ago
interrupt
1 year ago
partials
1 year ago
settings
1 year ago
tables
2 years ago
campaign-builder.blade.php
2 years ago
chart.blade.php
1 year ago
plugin-group-options.blade.php
1 year ago
quick-stats.blade.php
2 years ago
real_time.blade.php
2 years ago
support.blade.php
1 year ago
updates.blade.php
1 year ago
plugin-group-options.blade.php
114 lines
| 1 | @php /** @var \IAWP\Plugin_Group[] $plugin_groups */ @endphp |
| 2 | @php /** @var \IAWP\Plugin_Group_Option[] $options */ @endphp |
| 3 | @php /** @var string $option_type */ @endphp |
| 4 | @php /** @var string $option_name */ @endphp |
| 5 | @php /** @var string $option_icon */ @endphp |
| 6 | |
| 7 | {{-- Array indicies are used to add section headers. Make sure there are no gaps. --}} |
| 8 | @php $options = array_values($options); @endphp |
| 9 | |
| 10 | <div data-controller="plugin-group-options" |
| 11 | data-plugin-group-options-option-type-value="{{ $option_type }}" |
| 12 | class="button-modal-container" |
| 13 | > |
| 14 | {{-- Toggle button --}} |
| 15 | <button id="" |
| 16 | class="stats-toggle-button iawp-button" |
| 17 | data-plugin-group-options-target="modalButton" |
| 18 | data-action="plugin-group-options#toggleModal" |
| 19 | > |
| 20 | <span class="dashicons dashicons-{{ $option_icon }}"></span> |
| 21 | {{ $option_name }} |
| 22 | </button> |
| 23 | |
| 24 | {{-- Toggle modal --}} |
| 25 | <div data-plugin-group-options-target="modal" |
| 26 | class="stats-toggle" |
| 27 | > |
| 28 | <div class="top title-small"> |
| 29 | <?php esc_html_e('Choose Stats to Display', 'independent-analytics'); ?> |
| 30 | <span data-plugin-group-options-target="spinner" class="dashicons dashicons-update spin hidden"></span> |
| 31 | </div> |
| 32 | <div class="inner"> |
| 33 | <div id="stats-toggle-sidebar" class="sidebar"> |
| 34 | <ul> |
| 35 | @foreach($plugin_groups as $plugin_group) |
| 36 | <li> |
| 37 | <a class="link-dark {{ $plugin_group->id() === 'general' ? 'current' : '' }}" |
| 38 | data-option-id="{{ $plugin_group->id() }}" |
| 39 | data-action="plugin-group-options#requestGroupChange" |
| 40 | data-plugin-group-options-target="tab" |
| 41 | href="#" |
| 42 | > |
| 43 | <span>{{ $plugin_group->name() }}</span> |
| 44 | @if($plugin_group->requires_pro() && iawp_is_free()) |
| 45 | <span class="pro-label"><?php esc_html_e('PRO', 'independent-analytics'); ?></span> |
| 46 | @endif |
| 47 | </a> |
| 48 | </li> |
| 49 | @endforeach |
| 50 | </ul> |
| 51 | </div> |
| 52 | <div class="main"> |
| 53 | @foreach($plugin_groups as $plugin_group) |
| 54 | <div class="checkbox-container {{ $plugin_group->id() === 'general' ? 'current' : '' }}" |
| 55 | data-option-id="{{ $plugin_group->id() }}" |
| 56 | data-plugin-group-options-target="checkboxContainer" |
| 57 | {{-- data-metric-category="{{ $plugin_group->id() }}"--}} |
| 58 | > |
| 59 | <span class="metrics-title">{{ $plugin_group->name() }}</span> |
| 60 | |
| 61 | @foreach($options as $index => $option) |
| 62 | @if(!$option->is_subgroup_plugin_enabled() || !$option->is_member_of_plugin_group($plugin_group->id())) |
| 63 | @continue |
| 64 | @endif |
| 65 | |
| 66 | @if(is_string($option->plugin_group_header()) && array_key_exists($index - 1, $options) && ($options[$index -1])->plugin_group_header() !== $option->plugin_group_header()) |
| 67 | <span class="metrics-subtitle">{{ $option->plugin_group_header() }}</span> |
| 68 | @endif |
| 69 | |
| 70 | <label class="{{ !$option->is_group_plugin_enabled() ? 'disabled' : '' }}"> |
| 71 | @if(!$option->is_group_plugin_enabled()) |
| 72 | <input id="iawp_{{ $option_type }}_{{$option->id()}}" |
| 73 | type="checkbox" |
| 74 | disabled="disabled"> |
| 75 | @else |
| 76 | <input id="iawp_{{ $option_type }}_{{$option->id()}}" |
| 77 | type="checkbox" |
| 78 | data-action="plugin-group-options#toggleOption" |
| 79 | data-plugin-group-options-target="checkbox" |
| 80 | name="{{ $option->id() }}" |
| 81 | {{ checked(true, $option->is_visible(), true) }} |
| 82 | /> |
| 83 | @endif |
| 84 | <span>{{ $option->name() }}</span> |
| 85 | </label> |
| 86 | @endforeach |
| 87 | |
| 88 | @if($plugin_group->requires_pro() && iawp_is_free()) |
| 89 | <div class="required-plugin-note"> |
| 90 | <p>{{ $plugin_group->upgrade_message() }}</p> |
| 91 | <p><a href="{{ $plugin_group->upgrade_link() }}" |
| 92 | class="link-purple" |
| 93 | target="_blank"><?php esc_html_e('Learn more', 'independent-analytics'); ?></a> |
| 94 | </p> |
| 95 | </div> |
| 96 | @elseif(!$plugin_group->has_active_group_plugins() && iawp_is_pro()) |
| 97 | <div class="required-plugin-note"> |
| 98 | <p>{{ $plugin_group->activate_message() }}</p> |
| 99 | <p><a href="{{ $plugin_group->activate_link() }}" |
| 100 | class="link-purple" |
| 101 | target="_blank"><?php esc_html_e('Learn more', 'independent-analytics'); ?></a> |
| 102 | </p> |
| 103 | </div> |
| 104 | @elseif(!$plugin_group->has_tracked_data()) |
| 105 | <div class="required-plugin-note"> |
| 106 | <p>{{$plugin_group->no_tracked_data_message()}}</p> |
| 107 | </div> |
| 108 | @endif |
| 109 | </div> |
| 110 | @endforeach |
| 111 | </div> |
| 112 | </div> |
| 113 | </div> |
| 114 | </div> |