| 1 |
<?php |
| 2 |
/** |
| 3 |
* Booking Resources table header 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-header"> |
| 14 |
<tr> |
| 15 |
<# if ( data.selection_enabled ) { #> |
| 16 |
<th scope="col" class="wpbc_ui_listing__column wpbc_ui_listing__column_selection"> |
| 17 |
<label class="wpbc_ui_listing__selection_control" for="wpbc_catalog_booking_resources_select_all"> |
| 18 |
<span class="screen-reader-text">{{ data.i18n.select_all }}</span> |
| 19 |
<input type="checkbox" id="wpbc_catalog_booking_resources_select_all" data-wpbc-ui-catalog-select-all> |
| 20 |
</label> |
| 21 |
</th> |
| 22 |
<# } #> |
| 23 |
<# _.each( data.columns, function ( column ) { #> |
| 24 |
<th scope="col" class="wpbc_ui_listing__column {{ column.class_name }}" data-wpbc-ui-catalog-column="{{ column.id }}"<# if ( column.sort_key ) { #> aria-sort="{{ column.aria_sort }}"<# } #>> |
| 25 |
<# if ( data.hierarchy_enabled && 'resource' === column.id ) { #> |
| 26 |
<button type="button" class="wpbc_ui_listing__hierarchy_all_toggle wpbc_booking_resources__hierarchy_all_toggle" data-wpbc-ui-catalog-hierarchy-toggle-all aria-pressed="<# if ( data.all_expanded ) { #>true<# } else { #>false<# } #>" aria-label="<# if ( data.all_expanded ) { #>{{ data.i18n.collapse_all }}<# } else { #>{{ data.i18n.expand_all }}<# } #>" title="<# if ( data.all_expanded ) { #>{{ data.i18n.collapse_all }}<# } else { #>{{ data.i18n.expand_all }}<# } #>"> |
| 27 |
<span class="wpbc_icn_rotate_90 <# if ( data.all_expanded ) { #>wpbc-bi-arrows-collapse-vertical<# } else { #>wpbc-bi-arrows-expand-vertical<# } #>" data-wpbc-ui-catalog-hierarchy-toggle-all-icon aria-hidden="true"></span> |
| 28 |
</button> |
| 29 |
<# } #> |
| 30 |
<# if ( column.sort_key ) { #> |
| 31 |
<a href="#" class="wpbc_ui_listing__sort_link<# if ( column.is_sorted ) { #> is-active<# } #>" data-wpbc-ui-catalog-sort="{{ column.sort_key }}"> |
| 32 |
<span>{{ column.label }}</span> |
| 33 |
<i class="wpbc_ui_listing__sort_icon {{ column.sort_icon }}" aria-hidden="true"></i> |
| 34 |
</a> |
| 35 |
<# } else { #> |
| 36 |
{{ column.label }} |
| 37 |
<# } #> |
| 38 |
</th> |
| 39 |
<# } ); #> |
| 40 |
</tr> |
| 41 |
</script> |
| 42 |
|