| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
// Important Information Section - Professional UX Design |
| 7 |
// Expected variables: $trip |
| 8 |
?> |
| 9 |
<section class="yatra-trip-section" id="important-info"> |
| 10 |
<h2 class="yatra-trip-section-title"> |
| 11 |
<?php yatra_render_tab_icon($tab->icon ?? null, 'info', 'yatra-trip-section-title-icon', $tab->label ?? __('Important Information', 'yatra')); ?> |
| 12 |
<?php echo esc_html(isset($tab->label) ? $tab->label : __('Important Information', 'yatra')); ?> |
| 13 |
</h2> |
| 14 |
<p class="yatra-section-description"> |
| 15 |
<?php esc_html_e('Essential information you need to know before booking this trip', 'yatra'); ?> |
| 16 |
</p> |
| 17 |
<div class="yatra-important-info-grid"> |
| 18 |
<?php if (!empty($trip->getPhysicalRequirements())): ?> |
| 19 |
<div class="yatra-important-info-card"> |
| 20 |
<div class="yatra-important-info-icon yatra-icon-physical"> |
| 21 |
<?php echo yatra_svg_icon('activity', 'yatra-icon-lg'); ?> |
| 22 |
</div> |
| 23 |
<div class="yatra-important-info-content-wrapper"> |
| 24 |
<h3 class="yatra-important-info-title"> |
| 25 |
<?php echo yatra_svg_icon('activity', 'yatra-icon-inline'); ?> |
| 26 |
<?php esc_html_e('Physical Requirements', 'yatra'); ?> |
| 27 |
</h3> |
| 28 |
<div class="yatra-important-info-content"><?php echo wp_kses_post(wpautop($trip->getPhysicalRequirements())); ?></div> |
| 29 |
</div> |
| 30 |
</div> |
| 31 |
<?php endif; ?> |
| 32 |
|
| 33 |
<?php if (!empty($trip->getVisaRequirements())): ?> |
| 34 |
<div class="yatra-important-info-card"> |
| 35 |
<div class="yatra-important-info-icon yatra-icon-visa"> |
| 36 |
<?php echo yatra_svg_icon('globe', 'yatra-icon-lg'); ?> |
| 37 |
</div> |
| 38 |
<div class="yatra-important-info-content-wrapper"> |
| 39 |
<h3 class="yatra-important-info-title"> |
| 40 |
<?php echo yatra_svg_icon('globe', 'yatra-icon-inline'); ?> |
| 41 |
<?php esc_html_e('Visa Requirements', 'yatra'); ?> |
| 42 |
</h3> |
| 43 |
<div class="yatra-important-info-content"><?php echo wp_kses_post(wpautop($trip->getVisaRequirements())); ?></div> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
<?php endif; ?> |
| 47 |
|
| 48 |
<?php if (!empty($trip->getVaccinationRequirements())): ?> |
| 49 |
<div class="yatra-important-info-card"> |
| 50 |
<div class="yatra-important-info-icon yatra-icon-health"> |
| 51 |
<?php echo yatra_svg_icon('heart', 'yatra-icon-lg'); ?> |
| 52 |
</div> |
| 53 |
<div class="yatra-important-info-content-wrapper"> |
| 54 |
<h3 class="yatra-important-info-title"> |
| 55 |
<?php echo yatra_svg_icon('heart', 'yatra-icon-inline'); ?> |
| 56 |
<?php esc_html_e('Health & Vaccination', 'yatra'); ?> |
| 57 |
</h3> |
| 58 |
<div class="yatra-important-info-content"><?php echo wp_kses_post(wpautop($trip->getVaccinationRequirements())); ?></div> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
<?php endif; ?> |
| 62 |
|
| 63 |
<?php if (!empty($trip->getCancellationPolicy())): ?> |
| 64 |
<div class="yatra-important-info-card"> |
| 65 |
<div class="yatra-important-info-icon yatra-icon-policy"> |
| 66 |
<?php echo yatra_svg_icon('x', 'yatra-icon-lg'); ?> |
| 67 |
</div> |
| 68 |
<div class="yatra-important-info-content-wrapper"> |
| 69 |
<h3 class="yatra-important-info-title"> |
| 70 |
<?php echo yatra_svg_icon('x', 'yatra-icon-inline'); ?> |
| 71 |
<?php esc_html_e('Cancellation Policy', 'yatra'); ?> |
| 72 |
</h3> |
| 73 |
<div class="yatra-important-info-content"><?php echo wp_kses_post(wpautop($trip->getCancellationPolicy())); ?></div> |
| 74 |
</div> |
| 75 |
</div> |
| 76 |
<?php endif; ?> |
| 77 |
|
| 78 |
<?php if (!empty($trip->age_min) || !empty($trip->age_max)): ?> |
| 79 |
<div class="yatra-important-info-card"> |
| 80 |
<div class="yatra-important-info-icon yatra-icon-age"> |
| 81 |
<?php echo yatra_svg_icon('users', 'yatra-icon-lg'); ?> |
| 82 |
</div> |
| 83 |
<div class="yatra-important-info-content-wrapper"> |
| 84 |
<h3 class="yatra-important-info-title"> |
| 85 |
<?php echo yatra_svg_icon('users', 'yatra-icon-inline'); ?> |
| 86 |
<?php esc_html_e('Age Requirements', 'yatra'); ?> |
| 87 |
</h3> |
| 88 |
<div class="yatra-important-info-content"> |
| 89 |
<div class="yatra-info-detail-row"> |
| 90 |
<span class="yatra-info-label"><?php esc_html_e('Minimum Age:', 'yatra'); ?></span> |
| 91 |
<span class="yatra-info-value"><?php echo esc_html($trip->age_min ?? __('No minimum', 'yatra')); ?> <?php echo !empty($trip->age_min) ? esc_html__('years', 'yatra') : ''; ?></span> |
| 92 |
</div> |
| 93 |
<?php if (!empty($trip->age_max)): ?> |
| 94 |
<div class="yatra-info-detail-row"> |
| 95 |
<span class="yatra-info-label"><?php esc_html_e('Maximum Age:', 'yatra'); ?></span> |
| 96 |
<span class="yatra-info-value"><?php echo esc_html($trip->age_max); ?> <?php esc_html_e('years', 'yatra'); ?></span> |
| 97 |
</div> |
| 98 |
<?php endif; ?> |
| 99 |
</div> |
| 100 |
</div> |
| 101 |
</div> |
| 102 |
<?php endif; ?> |
| 103 |
|
| 104 |
<?php if (!empty($trip->accommodation_type) || !empty($trip->meal_plan) || !empty($trip->accommodation_details)): ?> |
| 105 |
<div class="yatra-important-info-card"> |
| 106 |
<div class="yatra-important-info-icon yatra-icon-accommodation"> |
| 107 |
<?php echo yatra_svg_icon('hotel', 'yatra-icon-lg'); ?> |
| 108 |
</div> |
| 109 |
<div class="yatra-important-info-content-wrapper"> |
| 110 |
<h3 class="yatra-important-info-title"> |
| 111 |
<?php echo yatra_svg_icon('hotel', 'yatra-icon-inline'); ?> |
| 112 |
<?php esc_html_e('Accommodation', 'yatra'); ?> |
| 113 |
</h3> |
| 114 |
<div class="yatra-important-info-content"> |
| 115 |
<?php if (!empty($trip->accommodation_type)): ?> |
| 116 |
<div class="yatra-info-detail-row"> |
| 117 |
<span class="yatra-info-label"><?php esc_html_e('Type:', 'yatra'); ?></span> |
| 118 |
<span class="yatra-info-value"><?php echo esc_html($trip->accommodation_type); ?></span> |
| 119 |
</div> |
| 120 |
<?php endif; ?> |
| 121 |
<?php if (!empty($trip->meal_plan)): ?> |
| 122 |
<div class="yatra-info-detail-row"> |
| 123 |
<span class="yatra-info-label"> |
| 124 |
<?php echo yatra_svg_icon('utensils', 'yatra-icon-tiny'); ?> |
| 125 |
<?php esc_html_e('Meal Plan:', 'yatra'); ?> |
| 126 |
</span> |
| 127 |
<span class="yatra-info-value"><?php echo esc_html(yatra_meal_plan_label((string) $trip->meal_plan)); ?></span> |
| 128 |
</div> |
| 129 |
<?php endif; ?> |
| 130 |
<?php if (!empty($trip->accommodation_details)): ?> |
| 131 |
<div class="yatra-info-description"> |
| 132 |
<?php echo wp_kses_post(wpautop($trip->accommodation_details)); ?> |
| 133 |
</div> |
| 134 |
<?php endif; ?> |
| 135 |
</div> |
| 136 |
</div> |
| 137 |
</div> |
| 138 |
<?php endif; ?> |
| 139 |
|
| 140 |
<?php if ($trip->transportation_included || !empty($trip->pickup_location) || !empty($trip->dropoff_location) || !empty($trip->transportation_details)): ?> |
| 141 |
<div class="yatra-important-info-card"> |
| 142 |
<div class="yatra-important-info-icon yatra-icon-transport"> |
| 143 |
<?php echo yatra_svg_icon('car', 'yatra-icon-lg'); ?> |
| 144 |
</div> |
| 145 |
<div class="yatra-important-info-content-wrapper"> |
| 146 |
<h3 class="yatra-important-info-title"> |
| 147 |
<?php echo yatra_svg_icon('car', 'yatra-icon-inline'); ?> |
| 148 |
<?php esc_html_e('Transportation', 'yatra'); ?> |
| 149 |
</h3> |
| 150 |
<div class="yatra-important-info-content"> |
| 151 |
<?php if ($trip->transportation_included): ?> |
| 152 |
<div class="yatra-info-badge yatra-badge-included"> |
| 153 |
<?php echo yatra_svg_icon('check', 'yatra-icon-tiny'); ?> |
| 154 |
<?php esc_html_e('Transportation Included', 'yatra'); ?> |
| 155 |
</div> |
| 156 |
<?php endif; ?> |
| 157 |
<?php if (!empty($trip->pickup_location)): ?> |
| 158 |
<div class="yatra-info-detail-row"> |
| 159 |
<span class="yatra-info-label"> |
| 160 |
<?php echo yatra_svg_icon('map-pin', 'yatra-icon-tiny'); ?> |
| 161 |
<?php esc_html_e('Pickup:', 'yatra'); ?> |
| 162 |
</span> |
| 163 |
<span class="yatra-info-value"><?php echo esc_html($trip->pickup_location); ?></span> |
| 164 |
</div> |
| 165 |
<?php endif; ?> |
| 166 |
<?php if (!empty($trip->dropoff_location)): ?> |
| 167 |
<div class="yatra-info-detail-row"> |
| 168 |
<span class="yatra-info-label"> |
| 169 |
<?php echo yatra_svg_icon('map-pin', 'yatra-icon-tiny'); ?> |
| 170 |
<?php esc_html_e('Dropoff:', 'yatra'); ?> |
| 171 |
</span> |
| 172 |
<span class="yatra-info-value"><?php echo esc_html($trip->dropoff_location); ?></span> |
| 173 |
</div> |
| 174 |
<?php endif; ?> |
| 175 |
<?php if (!empty($trip->transportation_details)): ?> |
| 176 |
<div class="yatra-info-description"> |
| 177 |
<?php echo wp_kses_post(wpautop($trip->transportation_details)); ?> |
| 178 |
</div> |
| 179 |
<?php endif; ?> |
| 180 |
</div> |
| 181 |
</div> |
| 182 |
</div> |
| 183 |
<?php endif; ?> |
| 184 |
</div> |
| 185 |
</section> |
| 186 |
|