_form.php
1 year ago
_service_index_item.php
1 year ago
edit_form.php
1 year ago
index.php
1 year ago
new_form.php
1 year ago
index.php
73 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | ?> |
| 6 | <?php if($uncategorized_services){ ?> |
| 7 | <div class="os-item-category-w"> |
| 8 | <div class="os-form-sub-header sub-level"><h3><?php esc_html_e('Uncategorized', 'latepoint'); ?></h3></div> |
| 9 | <div class="os-services-list"> |
| 10 | <?php foreach ($uncategorized_services as $service): ?> |
| 11 | <?php include('_service_index_item.php'); ?> |
| 12 | <?php endforeach; ?> |
| 13 | <a class="create-service-link-w" href="<?php echo esc_url(OsRouterHelper::build_link(OsRouterHelper::build_route_name('services', 'new_form') )); ?>"> |
| 14 | <div class="create-service-link-i"> |
| 15 | <div class="add-service-graphic-w"> |
| 16 | <div class="add-service-plus"><i class="latepoint-icon latepoint-icon-plus4"></i></div> |
| 17 | </div> |
| 18 | <div class="add-service-label"><?php esc_html_e('Add Service', 'latepoint'); ?></div> |
| 19 | </div> |
| 20 | </a> |
| 21 | </div> |
| 22 | </div> |
| 23 | <?php } ?> |
| 24 | <?php if($service_categories){ ?> |
| 25 | <?php foreach ($service_categories as $service_category): ?> |
| 26 | <div class="os-item-category-w"> |
| 27 | <div class="os-form-sub-header sub-level"><h3><?php echo esc_html($service_category->name); ?></h3></div> |
| 28 | <div class="os-services-list"> |
| 29 | <?php |
| 30 | if($service_category->get_active_services(true)){ ?> |
| 31 | <?php foreach ($service_category->services as $service): ?> |
| 32 | <?php include('_service_index_item.php'); ?> |
| 33 | <?php endforeach; ?> |
| 34 | <?php |
| 35 | } ?> |
| 36 | <a class="create-service-link-w" href="<?php echo esc_url(OsRouterHelper::build_link(['services', 'new_form'], ['service_category_id' => $service_category->id] )); ?>"> |
| 37 | <div class="create-service-link-i"> |
| 38 | <div class="add-service-graphic-w"> |
| 39 | <div class="add-service-plus"><i class="latepoint-icon latepoint-icon-plus4"></i></div> |
| 40 | </div> |
| 41 | <div class="add-service-label"><?php esc_html_e('Add Service', 'latepoint'); ?></div> |
| 42 | </div> |
| 43 | </a> |
| 44 | </div> |
| 45 | </div> |
| 46 | <?php endforeach; ?> |
| 47 | |
| 48 | <?php }else{ ?> |
| 49 | <?php if(!$uncategorized_services){ ?> |
| 50 | <div class="no-results-w"> |
| 51 | <div class="icon-w"><i class="latepoint-icon latepoint-icon-book"></i></div> |
| 52 | <h2><?php esc_html_e('No Active Services Found', 'latepoint'); ?></h2> |
| 53 | <a href="<?php echo esc_url(OsRouterHelper::build_link(OsRouterHelper::build_route_name('services', 'new_form') )); ?>" class="latepoint-btn"> |
| 54 | <i class="latepoint-icon latepoint-icon-plus-square"></i> |
| 55 | <span><?php esc_html_e('Add Service', 'latepoint'); ?></span> |
| 56 | </a> |
| 57 | </div> |
| 58 | <?php } ?> |
| 59 | <?php } ?> |
| 60 | |
| 61 | |
| 62 | <?php if($disabled_services){ |
| 63 | echo '<div class="disabled-items-wrapper">'; |
| 64 | // translators: %d number of services |
| 65 | echo '<div class="disabled-items-open-trigger"><span>'.esc_html(sprintf(_n('%d Disabled Service', '%d Disabled Services', count($disabled_services),'latepoint'), count($disabled_services))).'</span><i class="latepoint-icon latepoint-icon-chevron-down"></i></div>'; |
| 66 | echo '<div class="os-services-list disabled-items-boxes">'; |
| 67 | foreach($disabled_services as $service){ |
| 68 | include('_service_index_item.php'); |
| 69 | } |
| 70 | echo '</div>'; |
| 71 | echo '</div>'; |
| 72 | } |
| 73 |