_top_bar.php
96 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | ?> |
| 6 | <div class="latepoint-top-bar-w"> |
| 7 | <a href="#" title="<?php esc_attr_e('Menu', 'latepoint'); ?>" class="latepoint-top-iconed-link latepoint-mobile-top-menu-trigger"> |
| 8 | <i class="latepoint-icon latepoint-icon-menu"></i> |
| 9 | </a> |
| 10 | <div class="latepoint-top-search-w"> |
| 11 | <div class="latepoint-top-search-input-w"> |
| 12 | <i class="latepoint-icon latepoint-icon-x latepoint-mobile-top-search-trigger-cancel"></i> |
| 13 | <input type="text" data-route="<?php echo esc_attr(OsRouterHelper::build_route_name('search', 'query_results')); ?>" |
| 14 | class="latepoint-top-search" |
| 15 | name="search" |
| 16 | placeholder="<?php esc_attr_e('Search...', 'latepoint'); ?>"> |
| 17 | </div> |
| 18 | <div class="latepoint-top-search-results-w"></div> |
| 19 | </div> |
| 20 | <a href="#" title="<?php esc_attr_e('Search', 'latepoint'); ?>" |
| 21 | class="latepoint-top-iconed-link latepoint-mobile-top-search-trigger"><i |
| 22 | class="latepoint-icon latepoint-icon-search1"></i></a> |
| 23 | <?php echo apply_filters('latepoint_upgrade_top_bar_link_html', '<a href="#" '.OsSettingsHelper::get_link_attributes_for_premium_features().' class="latepoint-unlock-features-link"><i class="latepoint-icon latepoint-icon-switch"></i><span>'.esc_html__('Unlock All Features', 'latepoint').'</span></a>'); ?> |
| 24 | <?php do_action('latepoint_top_bar_before_actions'); ?> |
| 25 | <a href="<?php echo esc_url(OsRouterHelper::build_link(['activities', 'index'])); ?>" |
| 26 | title="<?php esc_attr_e('Activity Log', 'latepoint'); ?>" |
| 27 | class="latepoint-top-iconed-link latepoint-top-activity-trigger"> |
| 28 | <i class="latepoint-icon latepoint-icon-clock"></i> |
| 29 | </a> |
| 30 | <a href="<?php echo esc_url(OsRouterHelper::build_link(['bookings', 'pending_approval'])); ?>" |
| 31 | title="<?php esc_attr_e('Pending Bookings', 'latepoint'); ?>" |
| 32 | class="latepoint-top-iconed-link latepoint-top-notifications-trigger"> |
| 33 | <i class="latepoint-icon latepoint-icon-box1"></i> |
| 34 | <?php |
| 35 | $count_pending_bookings = OsBookingHelper::count_pending_bookings(); |
| 36 | if ($count_pending_bookings > 0) echo '<span class="notifications-count">' . esc_html($count_pending_bookings) . '</span>'; ?> |
| 37 | </a> |
| 38 | <a href="#" <?php echo OsOrdersHelper::quick_order_btn_html(); ?> |
| 39 | title="<?php esc_attr_e('New Booking', 'latepoint'); ?>" |
| 40 | class="latepoint-mobile-top-new-appointment-btn-trigger latepoint-top-iconed-link"> |
| 41 | <i class="latepoint-icon latepoint-icon-plus"></i> |
| 42 | </a> |
| 43 | <?php do_action('latepoint_top_bar_after_actions'); ?> |
| 44 | <a href="#" |
| 45 | class="latepoint-top-new-appointment-btn latepoint-btn latepoint-btn-primary" <?php echo OsOrdersHelper::quick_order_btn_html(); ?>> |
| 46 | <i class="latepoint-icon latepoint-icon-plus"></i> |
| 47 | <span><?php esc_html_e('Booking', 'latepoint'); ?></span> |
| 48 | </a> |
| 49 | |
| 50 | <div class="latepoint-top-user-info-w"> |
| 51 | <div class="avatar-w top-user-info-toggler" style="background-image: url('<?php echo esc_url(OsAuthHelper::get_current_user()->get_avatar_url()); ?>');"></div> |
| 52 | <div class="mobile-user-info-w"> |
| 53 | <div class="m-avatar-w" style="background-image: url('<?php echo esc_url(OsAuthHelper::get_current_user()->get_avatar_url()); ?>');"></div> |
| 54 | <div class="muid-info"> |
| 55 | <div class="muid-info-username"><?php echo esc_html(OsAuthHelper::get_current_user()->get_display_name()); ?></div> |
| 56 | <div class="muid-info-usertype"><?php echo esc_html(OsAuthHelper::get_current_user()->get_user_type_label()); ?></div> |
| 57 | </div> |
| 58 | <div class="m-logout"> |
| 59 | <a href="<?php echo esc_url(wp_logout_url()); ?>"> |
| 60 | <i class="latepoint-icon latepoint-icon-cancel"></i> |
| 61 | <span><?php esc_html_e('Logout', 'latepoint'); ?></span> |
| 62 | </a> |
| 63 | </div> |
| 64 | </div> |
| 65 | <div class="latepoint-user-info-dropdown"> |
| 66 | <a href="#" class="latepoint-user-info-close top-user-info-toggler"><i class="latepoint-icon latepoint-icon-x"></i></a> |
| 67 | <div class="latepoint-uid-head"> |
| 68 | <div class="uid-avatar-w"> |
| 69 | <div class="uid-avatar" |
| 70 | style="background-image: url('<?php echo esc_url(OsAuthHelper::get_current_user()->get_avatar_url()); ?>');"></div> |
| 71 | </div> |
| 72 | <div class="uid-info"> |
| 73 | <div class="uid-info-username"><?php echo esc_html(OsAuthHelper::get_current_user()->get_display_name()); ?></div> |
| 74 | <div class="uid-info-usertype"><?php echo esc_html(OsAuthHelper::get_current_user()->get_user_type_label()); ?></div> |
| 75 | </div> |
| 76 | </div> |
| 77 | <?php do_action('latepoint_top_bar_mobile_after_user'); ?> |
| 78 | <ul> |
| 79 | <?php if (OsAuthHelper::get_current_user()->get_link_to_settings()) { ?> |
| 80 | <li> |
| 81 | <a href="<?php echo esc_url(OsAuthHelper::get_current_user()->get_link_to_settings()); ?>"> |
| 82 | <i class="latepoint-icon latepoint-icon-cog1"></i> |
| 83 | <span><?php esc_html_e('Settings', 'latepoint'); ?></span> |
| 84 | </a> |
| 85 | </li> |
| 86 | <?php } ?> |
| 87 | <li> |
| 88 | <a href="<?php echo esc_url(wp_logout_url()); ?>"> |
| 89 | <i class="latepoint-icon latepoint-icon-cancel"></i> |
| 90 | <span><?php esc_html_e('Logout', 'latepoint'); ?></span> |
| 91 | </a> |
| 92 | </li> |
| 93 | </ul> |
| 94 | </div> |
| 95 | </div> |
| 96 | </div> |