| 1 |
<div class="ag-field--paginator" x-data="age_gate_pagination('<?php echo esc_attr($field['taxonomy']) ?>')"> |
| 2 |
<textarea name="ag_settings[terms][]" style="display: none;" x-model="selectedstring"></textarea> |
| 3 |
|
| 4 |
<div class="ag-paginator--tools" x-show="total || searchTerm"> |
| 5 |
<strong><span x-text="selectedCount"></span> <?php echo esc_html(strtolower($field['label'])) ?> selected</strong> |
| 6 |
<span> |
| 7 |
<input type="text" placeholder="<?php echo esc_attr(__('Search', 'age-gate')) ?>" x-model="searchText" @keydown.enter.prevent="search($el.value)" /> <button type="button" :disabled="!searchTerm" class="button button-link ag-pagninator--clear" @click="search(null)"><?php echo esc_html(__('Clear', 'age-gate')) ?></button> |
| 8 |
</span> |
| 9 |
</div> |
| 10 |
<template x-if="loading"> |
| 11 |
<div> |
| 12 |
<img src="/wp-admin/images/loading.gif" /> <?php // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage ?> |
| 13 |
</div> |
| 14 |
</template> |
| 15 |
<div class="ag-paginator--options" :style="loading ? 'opacity: .5' : ''"> |
| 16 |
<template x-for="item in data" x-key="item.key"> |
| 17 |
<div> |
| 18 |
<label class="ag-switch ag-switch--small"> |
| 19 |
<input type="checkbox" @change="selected[item.id] = $el.checked" :checked="selected[item.id]"> |
| 20 |
<span class="ag-switch__slider"></span> |
| 21 |
</label> |
| 22 |
<template x-if="item.lang"> |
| 23 |
<small><span x-text="item.lang"></span></small> |
| 24 |
</template> |
| 25 |
<span x-text="item.name"></span> |
| 26 |
</div> |
| 27 |
</template> |
| 28 |
</div> |
| 29 |
|
| 30 |
<div class="tablenav-pages"> |
| 31 |
<button class="button button-link" @click="all()" x-show="total" type="button"><?php echo esc_html__('Select/Deselect All', 'age-gate') ?></button> |
| 32 |
|
| 33 |
<div x-show="initialised"> |
| 34 |
<span class="displaying-num"><span x-text="formattedTotal"></span> items</span> |
| 35 |
<span class="pagination-links"> |
| 36 |
<template x-if="pages > 1"> |
| 37 |
<span> |
| 38 |
<button type="button" class="first-page button" :disabled="current == 1 || loading" @click="page(1)"><span class="screen-reader-text"><?php echo esc_html__('First page', 'age-gate') ?></span><span aria-hidden="true">«</span></button> |
| 39 |
<button type="button" class="prev-page button" :disabled="current == 1 || loading" @click="page(current - 1)"><span class="screen-reader-text"><?php echo esc_html__('Previous page', 'age-gate') ?></span><span aria-hidden="true">‹</span></button> |
| 40 |
</span> |
| 41 |
</template> |
| 42 |
<template x-if="pages > 1"> |
| 43 |
<span class="paging-input"> |
| 44 |
<span> |
| 45 |
<label for="current-page-selector" class="screen-reader-text"><?php echo esc_html__('Current Page', 'age-gate') ?></label> |
| 46 |
<input class="current-page" min="1" :max="pages" :disabled="loading" type="number" name="paged" :value="current" size="3" aria-describedby="table-paging" @keydown.enter.prevent="page($el.value)"> |
| 47 |
</span> |
| 48 |
|
| 49 |
<span class="tablenav-paging-text"> of <span class="total-pages"><span x-text="pages"></span></span></span> |
| 50 |
</span> |
| 51 |
</template> |
| 52 |
|
| 53 |
<template x-if="pages > 1"> |
| 54 |
<span> |
| 55 |
<button type="button" class="next-page button" :disabled="current == pages || loading" @click="page(current + 1)"><span class="screen-reader-text"><?php echo esc_html__('Next page', 'age-gate') ?></span><span aria-hidden="true">›</span></button> |
| 56 |
|
| 57 |
<button type="button" class="last-page button" :disabled="current == pages || loading" @click="page(pages)"><span class="screen-reader-text"><?php echo esc_html__('Last page', 'age-gate') ?></span><span aria-hidden="true">»</span></button> |
| 58 |
</span> |
| 59 |
</template> |
| 60 |
</span> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
|