_agents.php
1 year ago
_complete.php
1 year ago
_default_agent.php
4 months ago
_form_agent.php
1 year ago
_form_service.php
5 months ago
_intro.php
1 year ago
_list_agents.php
1 year ago
_list_services.php
1 year ago
_personal_info.php
4 months ago
_services.php
4 months ago
_settings.php
1 year ago
_work_periods.php
4 months ago
_list_services.php
53 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | ?> |
| 6 | <div class="service-boxes"> |
| 7 | <?php |
| 8 | foreach ( $services as $service ) { ?> |
| 9 | <div class="service-box-w wizard-add-edit-item-trigger" data-id="<?php echo esc_attr($service->id); ?>" |
| 10 | data-route="<?php echo esc_attr(OsRouterHelper::build_route_name( 'wizard', 'add_or_edit_service' )); ?>"> |
| 11 | <?php if ( $service->selection_image_id ) { ?> |
| 12 | <div class="service-image" |
| 13 | style="background-image: url(<?php echo esc_url($service->selection_image_url); ?>)"></div> |
| 14 | <?php } else { ?> |
| 15 | <div class="service-image-placeholder"></div> |
| 16 | <?php } ?> |
| 17 | <div class="service-name"><?php echo esc_html($service->name); ?></div> |
| 18 | <div class="service-agents"> |
| 19 | <?php if ( count( $agents ) > 1 ){ ?> |
| 20 | <div class="agents-avatars"> |
| 21 | <?php foreach ( $service->agents as $index => $agent ) { |
| 22 | if ( $index > 2 ) { |
| 23 | break; |
| 24 | } ?> |
| 25 | <div class="agent-avatar" |
| 26 | style="z-index: <?php echo esc_attr(3 - $index); ?>;background-image: url(<?php echo esc_url( $agent->avatar_url ); ?>)"></div> |
| 27 | <?php } ?> |
| 28 | <?php if ( count( $service->agents ) > 3 ) { |
| 29 | echo '<div class="agents-more">+' . esc_html(( count( $service->agents ) - 3 ) . ' ' . __( 'more', 'latepoint' )) . '</div>'; |
| 30 | } ?> |
| 31 | </div> |
| 32 | <?php } ?> |
| 33 | </div> |
| 34 | |
| 35 | <div class="service-remove-trigger" |
| 36 | data-os-pass-this="yes" |
| 37 | data-os-prompt="<?php echo esc_attr__( 'Are you sure you want to remove this service?', 'latepoint' ); ?>" |
| 38 | data-os-params="<?php echo esc_attr(OsUtilHelper::build_os_params( [ 'id' => $service->id ], 'destroy_service_' . $service->id )); ?>" |
| 39 | data-os-after-call="latepoint_remove_service_box" |
| 40 | data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name( 'services', 'destroy' )); ?>"> |
| 41 | <i class="latepoint-icon latepoint-icon-cross2"></i> |
| 42 | </div> |
| 43 | </div> |
| 44 | <?php |
| 45 | } ?> |
| 46 | <div class="add-service-box wizard-add-edit-item-trigger" |
| 47 | data-route="<?php echo esc_attr(OsRouterHelper::build_route_name( 'wizard', 'add_or_edit_service' )); ?>"> |
| 48 | <div class="add-service-graphic-w"> |
| 49 | <div class="add-service-plus"><i class="latepoint-icon latepoint-icon-plus4"></i></div> |
| 50 | </div> |
| 51 | <div class="add-service-label"><?php esc_html_e( 'Add Another Service', 'latepoint' ); ?></div> |
| 52 | </div> |
| 53 | </div> |