PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.10
Timetics – Appointment Booking Calendar & Scheduling v1.0.10
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
timetics / core / frontend / templates / meeting-list.php

meeting-list.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.10, at core/frontend/templates/meeting-list.php

126 lines 5.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use Timetics\Core\Appointments\Appointment as Appointment;
4 use Timetics\Core\Staffs\Staff;
5
6 $meetings = Appointment::all();
7 $staffs = Staff::all();
8 $terms = get_terms( [
9 'taxonomy' => 'timetics-meeting-category',
10 'hide_empty' => false,
11 ] );
12
13 ?>
14 <?php if ( $show_filter ) : ?>
15 <div class="timetics-meeting-filter ant-row timetics-input">
16 <div class="timetics-select-wrapper ant-select">
17 <!-- Category List -->
18 <select type="select" id="timetics-filter-category" class="timetics-select ant-select-selector">
19 <option value=""><?php esc_html_e( 'All Department', 'timetics' ); ?></option>
20 <?php if ( $terms ): ?>
21 <?php foreach( $terms as $term ): ?>
22 <option value="<?php echo esc_attr( $term->term_id ); ?>"><?php echo esc_html( $term->name ); ?></option>
23 <?php endforeach; ?>
24 <?php endif; ?>
25 </select>
26 <!-- End Category List -->
27
28 <!-- Staff List -->
29 <select type="select" id="timetics-filter-staff"class="timetics-select ant-select-selector">
30 <option value=""><?php esc_html_e( 'All Staff', 'timetics' ); ?></option>
31 <?php if ( $staffs ): ?>
32 <?php foreach( $staffs['items'] as $staff ): ?>
33 <?php
34 $staff = new Staff( $staff->ID );
35 ?>
36 <option value="<?php echo esc_attr( $staff->get_id() ); ?>"><?php echo $staff->get_display_name(); ?></option>
37 <?php endforeach; ?>
38 <?php endif; ?>
39 </select>
40 </div>
41 <!-- Staff List End -->
42 </div>
43 <?php endif; ?>
44
45 <div class="tt-meeting-list-wrapper toplevel_page_timetics ant-row">
46 <?php
47 foreach ($meetings['items'] as $item) {
48 $meeting = new Appointment($item->ID);
49 $staffs = $meeting->get_staff();
50 $locations = $meeting->get_locations();
51 $id = $meeting->get_id();
52 $prices = $meeting->get_price();
53 ?>
54 <div class="ant-col-8 ant-col-xs-24 ant-col-md-8">
55 <div class="tt-meeting-list-item">
56 <?php
57 if (!empty($staffs)) {
58 if (count($staffs) > 2) {
59 // Display only image for staff members if there are more than two
60 ?>
61 <ul class="tt-author tt-author-avatar-list">
62 <?php
63 foreach ($staffs as $key => $staff) {
64 ?>
65 <li class="tt-single-host">
66 <img src="<?php echo esc_url($staff['image']); ?>" alt="<?php echo esc_attr($staff['full_name']); ?>" />
67 <div class="tt-tooltip-text"><?php echo esc_html($staff['full_name']); ?></div>
68 </li>
69 <?php
70 }
71 ?>
72 </ul>
73 <?php
74 } else {
75 // Display both image and full name if there are two or fewer staff members
76 ?>
77 <ul class="tt-author">
78 <?php
79 foreach ($staffs as $key => $staff) {
80 ?>
81 <li>
82 <img src="<?php echo esc_url($staff['image']); ?>" alt="<?php echo esc_attr($staff['full_name']); ?>" />
83 <span><?php echo esc_html($staff['full_name']); ?></span>
84 </li>
85 <?php
86 }
87 ?>
88 </ul>
89 <?php
90 }
91 }
92 ?>
93 </ul>
94 <h3 class="tt-title">
95 <?php
96 echo esc_html($meeting->get_name());
97 ?>
98 </h3>
99 <!-- meeting description -->
100 <p><?php echo esc_html($meeting->get_description()); ?></p>
101
102 <!-- meeting info -->
103 <ul class="meeting-info-list">
104 <!-- meeting duration -->
105 <?php if (!empty($meeting->get_duration())) : ?>
106 <li>
107 <svg fill="#3263F8" width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
108 <path d="M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z" />
109 </svg>
110 <?php echo esc_html($meeting->get_duration()); ?>
111 </li>
112 <?php endif; ?>
113 <!-- meeting price -->
114
115 </ul>
116 <button class="ant-btn ant-btn-primary ant-btn-block" data-id="<?php echo esc_attr($id); ?>">
117 <?php echo esc_html__("Book Appointment", "timetics"); ?>
118 </button>
119
120 <div class="timetics-booking-modal"></div>
121 </div>
122 </div>
123 <?php
124 }
125 ?>
126 </div>