File: /var/www/vhosts/greenclinic.kz/httpdocs/wp-content/themes/GreenClinic/single-departments.php
<?php get_header(); ?>
<div class="page__banner--bread">
<div class="bread-line">
<div class="container">
<?php if( function_exists('dimox_breadcrumbs') ) dimox_breadcrumbs(); ?>
</div>
</div>
</div>
<section class="section__margin">
<div class="container">
<div class="section__title">
<h3 class="service__title title space-title"><?php the_title(); ?></h3>
</div>
<div class="section__polyclinic--background">
<img class="section__polyclinic--img" src="<?php echo get_field('photo'); ?>" alt="<?php the_field( the_title()); ?> в Нур-Султане" title="<?php the_field( the_title()); ?> в Нур-Султане" />
<div class="white-block wb-top white-ruk">
<div class="page__blocktext">
<p class="section__polyclinic--title"><span><?php echo get_field('otdelenie'); ?></span></p>
<p class="ruk-name"><?php echo get_field('ruk'); ?></p>
<p class="ruk-class"><?php echo get_field('rukovoditel_tekst'); ?></p>
</div>
<img src="<?php echo get_field('rukovoditel_foto'); ?>" alt="<?php echo get_field('ruk'); ?>" title="<?php echo get_field('ruk'); ?>" class="ruk-img" />
</div>
<?php if(get_field('rukovoditel_telefon') !== ''){ ?>
<div class="white-block wb-top white-ruk green-block">
<div class="page__blocktext blocktext-flex ">
<svg width="69" height="69" viewBox="0 0 69 69" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M67.4172 50.695V60.57C67.4209 61.4867 67.2331 62.3941 66.8659 63.2341C66.4986 64.0741 65.96 64.8281 65.2844 65.4478C64.6089 66.0675 63.8114 66.5394 62.943 66.8331C62.0746 67.1268 61.1544 67.2358 60.2414 67.1533C50.1124 66.0527 40.3827 62.5916 31.8343 57.0479C23.881 51.9941 17.1381 45.2511 12.0843 37.2979C6.52129 28.7106 3.05933 18.9337 1.97887 8.75916C1.89661 7.84891 2.00479 6.9315 2.29651 6.06534C2.58824 5.19919 3.05712 4.40326 3.6733 3.72825C4.28949 3.05323 5.03947 2.51391 5.87551 2.14463C6.71155 1.77534 7.61532 1.58419 8.52928 1.58333H18.4043C20.0017 1.5676 21.5504 2.13329 22.7617 3.17496C23.9729 4.21662 24.764 5.66317 24.9876 7.24499C25.4044 10.4052 26.1774 13.5081 27.2918 16.4946C27.7347 17.6727 27.8305 18.9532 27.568 20.1841C27.3054 21.4151 26.6955 22.545 25.8105 23.44L21.6301 27.6204C26.316 35.8612 33.1393 42.6845 41.3801 47.3704L45.5605 43.19C46.4555 42.305 47.5854 41.6951 48.8164 41.4326C50.0473 41.17 51.3278 41.2659 52.5059 41.7087C55.4924 42.8231 58.5953 43.5961 61.7555 44.0129C63.3545 44.2385 64.8148 45.0439 65.8587 46.2759C66.9026 47.5079 67.4572 49.0807 67.4172 50.695Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<div class="blocktext-text">
<p class="blocktext-text"></p>
<div class="blocktext-number">
<a href="tel:<?php echo get_field('rukovoditel_telefon'); ?>" class="blocktext-number"><?php echo get_field('rukovoditel_telefon'); ?></a>
</div>
</div>
</div>
</div>
<?php } ?>
<div class="white-block wb-top">
<div class="page__blocktext">
<?php the_content(); ?>
</div>
</div>
<!---------------vidi pomoshi--------------------------->
<?php if(get_field('name_vid_pom') != ""){ ?>
<div class="vid-block ">
<h3 class="service__title title space-title"><?php echo get_field('name_vid_pom'); ?> </h3>
<?php while(has_sub_field('vid_pom')): ?>
<div class="pom-block">
<img class="" src="<?php the_sub_field('foto_vid'); ?>" alt="<?php the_field( the_title()); ?>" title="<?php the_field( the_title()); ?>" />
<div class="pom-block__text">
<p class="pom-title"><?php the_sub_field('foto_title'); ?> </p>
<?php the_sub_field('foto_text'); ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php } ?>
<!------------------------ambula------------>
<?php if(get_field('per_pom') != ""){ ?>
<div class="perech-block ">
<?php while(has_sub_field('per_pom')): ?>
<div class="w-perech">
<img class="per-foto" src="https://greenclinic.kz/wp-content/uploads/2022/09/group-3064.svg" alt="<?php the_field( the_title()); ?>" title="<?php the_field( the_title()); ?>" />
<div class="perech-block__text">
<?php the_sub_field('per_title'); ?> <br>
<a href="<?php the_sub_field('per_url'); ?>" class="perech-url">Перейти</a>
</div>
</div>
<?php endwhile; ?>
</div>
<?php } ?>
<!-------------------------------------------------------->
<div class="white-block ">
<div class="page__blocktext">
<?php echo get_field('zagolovka'); ?>
</div>
</div>
<!---------uskugi-------->
<section class="service service-stac-top">
<h3 class="e title">Услуги</h3>
<div class="services-btn">
<div class="flex usl_flex">
<?php $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (strpos($url,'otdelenie-luchevoj-diagnostiki') !== false) {
$control17 = new WP_Query( array(
'orderby' => 'date', // тип сортировки (в данном случае по дате)
'posts_per_page' => -1,
'order' => 'ASC',
'post_type' => 'control',
'tax_query' => array(
array (
'taxonomy' => 'control_category',
'field' => 'term_id',
'terms' => 18
)
),
));
?>
<?php ?>
<?php while ( $control17->have_posts() ) { $control17->the_post(); ?>
<?php get_template_part( 'components/component', 'service17' ); ?>
<?php } ?>
<?php //endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?
} else {
$control17 = new WP_Query( array(
'orderby' => 'date', // тип сортировки (в данном случае по дате)
'posts_per_page' => -1,
'order' => 'ASC',
'post_type' => 'control',
'tax_query' => array(
array (
'taxonomy' => 'control_category',
'field' => 'term_id',
'terms' => 58
)
),
));
?>
<?php ?>
<?php while ( $control17->have_posts() ) { $control17->the_post(); ?>
<?php get_template_part( 'components/component', 'service17' ); ?>
<?php } ?>
<?php //endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<? }
?>
</section>
<!------------>
<div class="section__polyclinic--inside section__margin">
<div class="section__polyclinic--content">
<!--------------
<div class="section__polyclinic--blocks">
<?php wp_reset_postdata(); ?>
<?php foreach(get_field('uslugi') as $uslugi) { ?>
<?php setup_postdata($uslugi); ?>
<div class="swiper-slide services__filter--item services__filter__item--active">
<div class="services__filter--itemblock">
<div class="services__filter__item--img">
<?php echo get_the_post_thumbnail($uslugi->ID, 'thumbnail'); ?>
</div>
<div class="services__filter__item--title">
<?php //echo $uslugi->post_title; ?>
<?php echo get_the_title($uslugi->ID); ?>
</div>
<a href="<?php echo get_permalink($uslugi->ID); ?>" class="services__filter__item--linck">Подробнее</a>
</div>
</div>
<?php } ?>
<?php wp_reset_postdata(); ?>
</div>
-------------------->
<!-----------grafic--------------->
<?php if(get_field('name_1graf') != ""){ ?>
<div class="grafic-block">
<div class="container">
<h3 class="title space-title">График работы участков </h3>
<div class="tabs">
<div class="tabs__nav">
<button class="tabs__btn tabs__btn_active"><?php echo get_field('name_1graf'); ?></button>
<?php while(has_sub_field('graf_2')): ?>
<button class="tabs__btn"><?php the_sub_field('graf_name'); ?></button>
<?php endwhile; ?>
</div>
<div class="tabs__content">
<div class="tabs__pane tabs__pane_show">
<table>
<tr class="green-stroke">
<td class="td-f">№</td>
<td>Ф.И.О</td>
<td>Каб</td>
<td>Адреса</td>
<td>Номер телефона</td>
<td>Пн</td>
<td>Вт</td>
<td>Ср</td>
<td>Чт</td>
<td>Пт</td>
<td>Примечание</td>
</tr>
<?php while(has_sub_field('graf_1')): ?>
<tr>
<td class="td-f"><?php the_sub_field('number'); ?></td>
<td><?php the_sub_field('fio'); ?></td>
<td><?php the_sub_field('cab'); ?></td>
<td><?php the_sub_field('adress'); ?></td>
<td><?php the_sub_field('telefon'); ?></td>
<td><?php the_sub_field('pn'); ?></td>
<td><?php the_sub_field('vt'); ?></td>
<td><?php the_sub_field('sr'); ?></td>
<td><?php the_sub_field('cht'); ?></td>
<td><?php the_sub_field('pt'); ?></td>
<td><?php the_sub_field('prim'); ?></td>
</tr>
<?php endwhile; ?>
</table>
</div>
<?php while(has_sub_field('graf_2')): ?>
<div class="tabs__pane">
<table>
<tr class="green-stroke">
<td class="td-f">№</td>
<td>Ф.И.О</td>
<td>Каб</td>
<td>Адреса</td>
<td>Номер телефона</td>
<td>Пн</td>
<td>Вт</td>
<td>Ср</td>
<td>Чт</td>
<td>Пт</td>
<td>Примечание</td>
</tr>
<?php while(has_sub_field('graf_3')): ?>
<tr>
<td class="td-f"><?php the_sub_field('nomer'); ?></td>
<td><?php the_sub_field('graf_fio'); ?></td>
<td><?php the_sub_field('graf_cab'); ?></td>
<td><?php the_sub_field('graf_adress'); ?></td>
<td><?php the_sub_field('graf_tel'); ?></td>
<td><?php the_sub_field('graf_pn'); ?></td>
<td><?php the_sub_field('graf_vt'); ?></td>
<td><?php the_sub_field('graf_sr'); ?></td>
<td><?php the_sub_field('graf_cht'); ?></td>
<td><?php the_sub_field('graf_pt'); ?></td>
<td><?php the_sub_field('graf_prim'); ?></td>
</tr>
<?php endwhile; ?>
</table>
</div>
<?php endwhile; ?>
</div>
</div>
</div></div>
<?php } ?>
<!----------------------------------->
<div class="container">
<h3 class="service__title title space-title">Галерея </h3>
<section class="news docs" style="margin-bottom:0">
<div class="news-slider3">
<div class="swiper-wrapper">
<?php while(has_sub_field('foto-2')): ?>
<div class="news-slide swiper-slide">
<div class="gallery-img">
<img src="<?php the_sub_field('foto_otdeleniya-2'); ?>" alt="">
</div>
</div>
<?php endwhile; ?>
</div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</section>
</div>
<!--------------
<div class="section__partners section__margin">
<div class="container space_foto_otd">
<div class="section__title">
<div class="section__title--main">
<?php the_field('zagolovok_foto_otdeleniya'); ?>
</div>
</div>
<div class="partners__slider-2 slider__block">
<div class="swiper-wrapper">
<?php while(has_sub_field('foto-2')): ?>
<div class="swiper-slide">
<img src="<?php the_sub_field('foto_otdeleniya-2'); ?>" alt="Фото отделения" class="foto_otd" title="Фото отделения">
</div>
<?php endwhile; ?>
</div>
<div class="partners__pagination pagination__block"></div>
</div>
</div>
</div>
------------------>
</div>
</div>
</div>
<?php
$host = $_SERVER['REQUEST_URI'];
if(($host == '/ru/departments/poliklinika/') || ($host == '/kz/departments/poliklinika/') || ($host == '/en/departments/poliklinika/')) {
get_template_part( 'components/component', 'form');
}
?>
</div>
</section>
<script>
class ItcTabs {
constructor(target, config) {
const defaultConfig = {};
this._config = Object.assign(defaultConfig, config);
this._elTabs = typeof target === 'string' ? document.querySelector(target) : target;
this._elButtons = this._elTabs.querySelectorAll('.tabs__btn');
this._elPanes = this._elTabs.querySelectorAll('.tabs__pane');
this._eventShow = new Event('tab.itc.change');
this._init();
this._events();
}
_init() {
this._elTabs.setAttribute('role', 'tablist');
this._elButtons.forEach((el, index) => {
el.dataset.index = index;
el.setAttribute('role', 'tab');
this._elPanes[index].setAttribute('role', 'tabpanel');
});
}
show(elLinkTarget) {
const elPaneTarget = this._elPanes[elLinkTarget.dataset.index];
const elLinkActive = this._elTabs.querySelector('.tabs__btn_active');
const elPaneShow = this._elTabs.querySelector('.tabs__pane_show');
if (elLinkTarget === elLinkActive) {
return;
}
elLinkActive ? elLinkActive.classList.remove('tabs__btn_active') : null;
elPaneShow ? elPaneShow.classList.remove('tabs__pane_show') : null;
elLinkTarget.classList.add('tabs__btn_active');
elPaneTarget.classList.add('tabs__pane_show');
this._elTabs.dispatchEvent(this._eventShow);
elLinkTarget.focus();
}
showByIndex(index) {
const elLinkTarget = this._elButtons[index];
elLinkTarget ? this.show(elLinkTarget) : null;
};
_events() {
this._elTabs.addEventListener('click', (e) => {
const target = e.target.closest('.tabs__btn');
if (target) {
e.preventDefault();
this.show(target);
}
});
}
}
// инициализация .tabs как табов
new ItcTabs('.tabs');
</script>
<?php get_footer(); ?>