| 1 |
<?php |
| 2 |
/** |
| 3 |
* Booking Resources display controls template. |
| 4 |
* |
| 5 |
* @package Booking Calendar |
| 6 |
* @since 11.6.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
?> |
| 13 |
<script type="text/html" id="tmpl-wpbc-booking-resources-toolbar"> |
| 14 |
<div class="wpbc_ui_listing__display_toolbar" data-wpbc-ui-catalog-display-controls> |
| 15 |
<div class="wpbc_ui_listing__toolbar_actions wpbc_ui_el__buttons_group"> |
| 16 |
<button type="button" class="button button-secondary wpbc_ui_catalog_inline_toggle" data-wpbc-catalog-inline-toggle data-wpbc-ui-catalog-inline-toggle aria-pressed="false"> |
| 17 |
<span class="wpbc-bi-pencil-square" aria-hidden="true"></span> |
| 18 |
<span data-wpbc-catalog-inline-toggle-label data-wpbc-ui-catalog-inline-toggle-label>{{ data.i18n.edit_rows }}</span> |
| 19 |
</button> |
| 20 |
</div> |
| 21 |
<div class="wpbc_ui_listing__view_control"> |
| 22 |
<label for="wpbc_catalog_booking_resources_view">{{ data.i18n.view_label }}</label> |
| 23 |
<select id="wpbc_catalog_booking_resources_view" data-wpbc-ui-catalog-view autocomplete="off"> |
| 24 |
<# _.each( data.views, function ( view ) { #> |
| 25 |
<option value="{{ view.id }}" data-wpbc-ui-catalog-view-fields="{{ view.fields.join( ',' ) }}"<# if ( view.id === data.active_view ) { #> selected<# } #>>{{ view.label }}</option> |
| 26 |
<# } ); #> |
| 27 |
<option value="custom"<# if ( 'custom' === data.active_view ) { #> selected<# } #>>{{ data.i18n.custom_view }}</option> |
| 28 |
</select> |
| 29 |
</div> |
| 30 |
<div class="wpbc_ui_listing__view_control wpbc_booking_resources__layout_control"> |
| 31 |
<label for="wpbc_catalog_booking_resources_layout">{{ data.i18n.layout_label }}</label> |
| 32 |
<select id="wpbc_catalog_booking_resources_layout" data-wpbc-ui-catalog-template-pack autocomplete="off"> |
| 33 |
<# _.each( data.template_packs, function ( template_pack ) { #> |
| 34 |
<option value="{{ template_pack.id }}"<# if ( template_pack.id === data.active_template_pack ) { #> selected<# } #>>{{ template_pack.label }}</option> |
| 35 |
<# } ); #> |
| 36 |
</select> |
| 37 |
</div> |
| 38 |
<details class="wpbc_ui_listing__display_customizer has-viewport-positioning" data-wpbc-ui-catalog-display-customizer> |
| 39 |
<summary class="button button-secondary"> |
| 40 |
<span class="wpbc-bi-sliders" aria-hidden="true"></span> |
| 41 |
{{ data.i18n.customize_columns }} |
| 42 |
</summary> |
| 43 |
<div class="wpbc_ui_listing__display_panel"> |
| 44 |
<button type="button" class="wpbc_ui_listing__display_close" aria-label="{{ data.i18n.close_columns }}" data-wpbc-ui-catalog-display-close> |
| 45 |
<span class="wpbc-bi-x-lg" aria-hidden="true"></span> |
| 46 |
</button> |
| 47 |
<fieldset> |
| 48 |
<legend>{{ data.i18n.columns_legend }}</legend> |
| 49 |
<div class="wpbc_ui_listing__display_field_list" data-wpbc-ui-catalog-column-list> |
| 50 |
<# _.each( data.columns, function ( column, column_index ) { #> |
| 51 |
<div class="wpbc_ui_listing__display_field_item<# if ( column.reorderable ) { #> is-reorderable<# } else { #> is-fixed<# } #>" data-wpbc-ui-catalog-column-item="{{ column.id }}" data-wpbc-ui-catalog-column-default-index="{{ column.default_index }}" data-wpbc-ui-catalog-column-reorderable="<# if ( column.reorderable ) { #>1<# } else { #>0<# } #>"> |
| 52 |
<# if ( column.reorderable ) { #> |
| 53 |
<button type="button" class="wpbc_ui_listing__display_drag_handle" aria-label="{{ column.move_label }}" data-wpbc-ui-catalog-column-drag-handle> |
| 54 |
<span class="wpbc-bi-grip-vertical" aria-hidden="true"></span> |
| 55 |
</button> |
| 56 |
<# } else { #> |
| 57 |
<span class="wpbc_ui_listing__display_fixed_icon" aria-hidden="true"><span class="wpbc-bi-lock-fill"></span></span> |
| 58 |
<# } #> |
| 59 |
<label class="wpbc_ui_listing__display_field" for="wpbc_catalog_column_{{ column.id }}"> |
| 60 |
<input type="checkbox" id="wpbc_catalog_column_{{ column.id }}" value="{{ column.id }}" data-wpbc-ui-catalog-column-visible<# if ( column.visible ) { #> checked<# } #><# if ( column.required ) { #> disabled<# } #>> |
| 61 |
<span>{{ column.label }}</span> |
| 62 |
<span class="wpbc_ui_listing__display_field_meta"> |
| 63 |
<# if ( column.required ) { #><small>{{ data.i18n.always_visible }}</small><# } #> |
| 64 |
<# if ( ! column.reorderable ) { #><small>{{ data.i18n.fixed_position }}</small><# } #> |
| 65 |
</span> |
| 66 |
</label> |
| 67 |
</div> |
| 68 |
<# } ); #> |
| 69 |
</div> |
| 70 |
<p class="screen-reader-text" aria-live="polite" data-wpbc-ui-catalog-column-status></p> |
| 71 |
</fieldset> |
| 72 |
<div class="wpbc_ui_listing__display_actions"> |
| 73 |
<button type="button" class="button-link" data-wpbc-ui-catalog-column-order-reset>{{ data.i18n.reset_order }}</button> |
| 74 |
<button type="button" class="button-link" data-wpbc-ui-catalog-preferences-reset>{{ data.i18n.reset_preferences }}</button> |
| 75 |
</div> |
| 76 |
</div> |
| 77 |
</details> |
| 78 |
</div> |
| 79 |
</script> |
| 80 |
|