PluginProbe
Booking Calendar / 11.7
Booking Calendar v11.7
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
booking / includes / page-catalog-booking-resources / templates / resource-row-cells-wptpl.php

resource-row-cells-wptpl.php in Booking Calendar 11.7, at includes/page-catalog-booking-resources/templates/resource-row-cells-wptpl.php

77 lines 5.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Shared Booking Resource row-cell layout template.
4 *
5 * Parent, child, and flat row wrappers compose this presentation-only partial,
6 * keeping column layout in one identifiable WP template.
7 *
8 * @package Booking Calendar
9 * @since 11.6.0
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15 ?>
16 <script type="text/html" id="tmpl-wpbc-booking-resource-row-cells">
17 <# if ( data.selection_enabled ) { #>
18 <td class="wpbc_ui_listing__column_selection" data-label="" data-wpbc-ui-catalog-inline-changed-host>
19 <label class="wpbc_ui_listing__selection_control" for="wpbc_catalog_booking_resource_select_{{ data.id }}">
20 <span class="screen-reader-text">{{ data.selection_label }}</span>
21 <input type="checkbox" id="wpbc_catalog_booking_resource_select_{{ data.id }}" value="{{ data.id }}" data-wpbc-ui-catalog-select-item>
22 </label>
23 <button type="button" class="wpbc_booking_resources__details_toggle" data-wpbc-booking-resource-action="toggle_details" data-wpbc-booking-resource-id="{{ data.id }}" aria-expanded="false" aria-controls="wpbc_catalog_booking_resource_details_{{ data.id }}" data-show-label="{{ data.i18n.show_details }}" data-hide-label="{{ data.i18n.hide_details }}" aria-label="{{ data.i18n.show_details }}" title="{{ data.i18n.show_details }}">
24 <span class="wpbc-bi-chevron-down" aria-hidden="true"></span>
25 </button>
26 </td>
27 <# } #>
28 <# _.each( data.columns, function ( column ) { #>
29 <td class="wpbc_ui_listing__field {{ column.class_name }}" data-wpbc-ui-catalog-field="{{ column.id }}" data-label="{{ column.label }}">
30 <# if ( 'resource' === column.id ) { #>
31 <div class="wpbc_booking_resources__resource_identity wpbc_booking_resources__resource_identity--{{ data.row_variant }}">
32 <# if ( data.hierarchy.expandable ) { #>
33 <button type="button" class="wpbc_ui_listing__hierarchy_toggle wpbc_booking_resources__hierarchy_toggle" data-wpbc-ui-catalog-hierarchy-toggle="{{ data.hierarchy.node_id }}" data-wpbc-ui-catalog-hierarchy-parent-toggle data-collapse-label="{{ data.collapse_label }}" data-expand-label="{{ data.expand_label }}" aria-expanded="<# if ( data.is_expanded ) { #>true<# } else { #>false<# } #>" aria-label="<# if ( data.is_expanded ) { #>{{ data.collapse_label }}<# } else { #>{{ data.expand_label }}<# } #>" title="<# if ( data.is_expanded ) { #>{{ data.collapse_label }}<# } else { #>{{ data.expand_label }}<# } #>">
34 <span class="<# if ( data.is_expanded ) { #>wpbc-bi-chevron-down<# } else { #>wpbc-bi-chevron-right<# } #>" data-wpbc-ui-catalog-hierarchy-toggle-icon aria-hidden="true"></span>
35 </button>
36 <# } #>
37 <# if ( 'child' === data.row_variant ) { #><span class="wpbc_booking_resources__tree_connector" aria-hidden="true"></span><# } #>
38 <span class="wpbc_ui_listing__table_icon tooltip_top" data-original-title="{{ data.thumbnail_label }}" aria-label="{{ data.thumbnail_label }}" role="img" tabindex="0" title="{{ data.thumbnail_label }}">
39 <# if ( data.picture_url ) { #>
40 <img src="{{ data.picture_url }}" alt="" loading="lazy" decoding="async">
41 <# } else { #>
42 <i class="menu_icon icon-1x wpbc-bi-image-fill" aria-hidden="true"></i>
43 <# } #>
44 </span>
45 <span class="wpbc_ui_listing__item_copy">
46 <strong class="wpbc_ui_listing__item_title" id="wpbc_booking_resource_title_{{ data.id }}" data-wpbc-ui-catalog-overflow-tooltip="{{ data.title }}">
47 {{ data.title }}
48 <# if ( 'parent' === data.row_variant ) { #><span class="wpbc_booking_resources__parent_badge">{{ data.parent_label }}</span><# } #>
49 </strong>
50 <# if ( data.description ) { #><small class="wpbc_ui_listing__item_description" data-wpbc-ui-catalog-overflow-tooltip="{{ data.description }}">{{ data.description }}</small><# } #>
51 </span>
52 </div>
53 <# } else if ( 'labels' === column.id ) { #>
54 <div data-wpbc-booking-resource-labels></div>
55 <# } else if ( 'capacity' === column.id ) { #>
56 {{ data.capacity }}
57 <# } else if ( 'publishing' === column.id ) { #>
58 <code class="wpbc_booking_resources__shortcode" data-wpbc-ui-catalog-overflow-tooltip="{{ data.publishing_shortcode }}">{{ data.publishing_shortcode }}</code>
59 <# } else if ( 'default_form' === column.id ) { #>
60 <span class="wpbc_booking_resources__clipped_text" data-wpbc-ui-catalog-overflow-tooltip="{{ data.default_form }}">{{ data.default_form }}</span>
61 <# } else if ( 'structure' === column.id ) { #>
62 <span class="wpbc_booking_resources__clipped_text" data-wpbc-ui-catalog-overflow-tooltip="{{ data.structure_label }}">{{ data.structure_label }}</span>
63 <# } else if ( 'priority' === column.id ) { #>
64 {{ data.priority }}
65 <# } else if ( 'price' === column.id ) { #>
66 <span data-wpbc-booking-resource-price></span>
67 <# } else if ( 'owner' === column.id ) { #>
68 <span class="wpbc_booking_resources__clipped_text" data-wpbc-ui-catalog-overflow-tooltip="{{ data.owner_display_name }}">{{ data.owner_display_name }}</span>
69 <# } else if ( 'actions' === column.id ) { #>
70 <div data-wpbc-booking-resource-actions></div>
71 <# } else if ( 'id' === column.id ) { #>
72 {{ data.id }}
73 <# } #>
74 </td>
75 <# } ); #>
76 </script>
77