| 1 |
<?php |
| 2 |
/** |
| 3 |
* Appointment Service Provider-labels WP template. |
| 4 |
* |
| 5 |
* Presents only Provider identity and availability links already authorized |
| 6 |
* and sanitized by the Service DTO. |
| 7 |
* |
| 8 |
* @package Booking Calendar |
| 9 |
* @since 11.6.0 |
| 10 |
*/ |
| 11 |
if ( ! defined( 'ABSPATH' ) ) { exit; } |
| 12 |
?> |
| 13 |
<script type="text/html" id="tmpl-wpbc-appointment-service-provider-labels"> |
| 14 |
<# if ( data.providers.length ) { var visible_providers = data.providers.slice( 0, data.max_visible || 3 ); #> |
| 15 |
<div class="wpbc_appointment_services__provider_stack"> |
| 16 |
<# _.each( visible_providers, function ( provider ) { #> |
| 17 |
<# if ( provider.availability_url ) { #> |
| 18 |
<a class="wpbc_appointment_services__provider_avatar<# if ( ! provider.has_weekly_availability ) { #> has-no-availability<# } #>" href="{{ provider.availability_url }}" title="{{ provider.title }}" aria-label="{{ provider.title }}"> |
| 19 |
<# if ( provider.avatar_url ) { #><img src="{{ provider.avatar_url }}" alt="" loading="lazy"><# } else { #>{{ provider.initials }}<# } #> |
| 20 |
</a> |
| 21 |
<# } else { #> |
| 22 |
<span class="wpbc_appointment_services__provider_avatar<# if ( ! provider.has_weekly_availability ) { #> has-no-availability<# } #>" title="{{ provider.title }}" aria-label="{{ provider.title }}"> |
| 23 |
<# if ( provider.avatar_url ) { #><img src="{{ provider.avatar_url }}" alt="" loading="lazy"><# } else { #>{{ provider.initials }}<# } #> |
| 24 |
</span> |
| 25 |
<# } #> |
| 26 |
<# } ); #> |
| 27 |
<# if ( data.providers.length > visible_providers.length ) { #><span class="wpbc_appointment_services__provider_more" title="{{ data.more_label }}">+{{ data.providers.length - visible_providers.length }}</span><# } #> |
| 28 |
</div> |
| 29 |
<# } else { #><span class="wpbc_appointment_services__no_provider">{{ data.empty_label }}</span><# } #> |
| 30 |
</script> |
| 31 |
|