PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.64
Timetics – Appointment Booking Calendar & Scheduling v1.0.64
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.64, at core/frontend/templates/meeting-list.php

133 lines 6.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 use Timetics\Core\Appointments\Appointment as Appointment;
5 use Timetics\Core\Staffs\Staff;
6
7 $timetics_args = [
8 'posts_per_page' => $timetics_limit
9 ];
10
11 if ( ! current_user_can( 'manage_options' ) ) {
12 $timetics_args['visibility'] = 'enabled';
13 }
14
15 $timetics_meetings = Appointment::all($timetics_args);
16
17 $timetics_staffs = Staff::all();
18 $timetics_terms = get_terms( [
19 'taxonomy' => 'timetics-meeting-category',
20 'hide_empty' => false,
21 ] );
22
23 ?>
24 <?php if ( $timetics_show_filter ) : ?>
25 <div class="timetics-meeting-filter timetics-input">
26 <div class="timetics-select-wrapper ant-select">
27 <!-- Category List -->
28 <select type="select" id="timetics-filter-category" class="timetics-select ant-select-selector">
29 <option value=""><?php esc_html_e( 'All Department', 'timetics' ); ?></option>
30 <?php if ( $timetics_terms ): ?>
31 <?php foreach( $timetics_terms as $timetics_term ): ?>
32 <option value="<?php echo esc_attr( $timetics_term->term_id ); ?>"><?php echo esc_html( $timetics_term->name ); ?></option>
33 <?php endforeach; ?>
34 <?php endif; ?>
35 </select>
36 <!-- End Category List -->
37
38 <!-- Staff List -->
39 <select type="select" id="timetics-filter-staff"class="timetics-select ant-select-selector">
40 <option value=""><?php esc_html_e( 'All Organizers', 'timetics' ); ?></option>
41 <?php if ( $timetics_staffs ): ?>
42 <?php foreach( $timetics_staffs['items'] as $timetics_staff ): ?>
43 <?php
44 $timetics_staff = new Staff( $timetics_staff->ID );
45 ?>
46 <option value="<?php echo esc_attr( $timetics_staff->get_id() ); ?>"><?php echo esc_attr( $timetics_staff->get_full_name() ); ?></option>
47 <?php endforeach; ?>
48 <?php endif; ?>
49 </select>
50 </div>
51 <!-- Staff List End -->
52 </div>
53 <?php endif; ?>
54
55 <div class="tt-meeting-list-wrapper toplevel_page_timetics">
56 <?php if(!empty($timetics_meetings['items'])) : ?>
57 <?php
58 foreach ($timetics_meetings['items'] as $timetics_item) {
59 $timetics_meeting = new Appointment($timetics_item->ID);
60 $timetics_staffs = $timetics_meeting->get_staff();
61 $timetics_locations = $timetics_meeting->get_locations();
62 $timetics_id = $timetics_meeting->get_id();
63 $timetics_prices = $timetics_meeting->get_price();
64 ?>
65 <div class="tt-meeting-list-item">
66 <!-- meeting description -->
67 <div class="tt-meeting-information">
68 <?php
69 if (!empty($timetics_staffs)) {
70
71 // Display both image and full name if there are two or fewer staff members
72 ?>
73 <ul class="tt-author">
74 <?php
75 foreach ($timetics_staffs as $timetics_key => $timetics_staff) {
76 ?>
77 <li>
78 <?php if ($timetics_staff['image']) {
79 ?>
80 <img src="<?php echo esc_url($timetics_staff['image']); ?>" alt="<?php echo esc_attr($timetics_staff['full_name']); ?>" />
81 <?php } ?>
82 <span><?php echo esc_html($timetics_staff['full_name']); ?></span>
83 </li>
84 <?php
85 }
86 ?>
87 </ul>
88 <?php
89
90 }
91 ?>
92 </ul>
93 <h3 class="tt-title">
94 <?php
95 echo esc_html($timetics_meeting->get_name());
96 ?>
97 </h3>
98 <?php
99 if($timetics_meeting->get_description()) {
100 ?>
101 <p><?php echo esc_html($timetics_meeting->get_description()); ?></p>
102 <?php
103 }
104 ?>
105 </div>
106 <div class="tt-meeting-action">
107 <!-- meeting info -->
108 <ul class="meeting-info-list">
109 <!-- meeting duration -->
110 <?php if (!empty($timetics_meeting->get_duration())) : ?>
111 <li>
112 <svg width="20" height="20" viewBox="0 0 20 20" fill="CurrentColor" xmlns="http://www.w3.org/2000/svg">
113 <path fill-rule="evenodd" clip-rule="evenodd" d="M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10ZM10 3.6C10.5523 3.6 11 4.04772 11 4.6V9.38197L14.0472 10.9056C14.5412 11.1526 14.7414 11.7532 14.4944 12.2472C14.2474 12.7412 13.6468 12.9414 13.1528 12.6944L9.55279 10.8944C9.214 10.725 9 10.3788 9 10V4.6C9 4.04772 9.44771 3.6 10 3.6Z"/>
114 </svg>
115 <?php echo esc_html($timetics_meeting->get_duration()); ?>
116 </li>
117 <?php endif; ?>
118 <!-- meeting price -->
119
120 </ul>
121 <button class="ant-btn ant-btn-primary ant-btn-block" data-id="<?php echo esc_attr($timetics_id); ?>">
122 <?php echo esc_html__("Book Now", "timetics"); ?>
123 </button>
124 </div>
125 </div>
126 <?php
127 }
128 ?>
129 <?php else: ?>
130 <p><?php echo esc_html__("No meetings found", "timetics")?></p>
131 <?php endif ;?>
132 <div class="timetics-booking-modal"></div>
133 </div>