Origin commit
This commit is contained in:
87
templates/single-property/preview/gallery-metro.php
Executable file
87
templates/single-property/preview/gallery-metro.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<div class="property-preview property-preview-custom-size">
|
||||
<?php
|
||||
global $property;
|
||||
$galleries = $property->get_gallery();
|
||||
|
||||
|
||||
$image_size = opalestate_get_option( 'opalestate_thumbnail_size' );
|
||||
if ( ! empty( $galleries ) && isset( $galleries ) ):
|
||||
?>
|
||||
<?php
|
||||
$_id = 'posts-block-' . rand( 1, 9 );
|
||||
$item = apply_filters( 'opalesate_related_property_column', 1 );
|
||||
|
||||
$data = [
|
||||
'slidesPerView' => 1,
|
||||
'spaceBetween' => 0,
|
||||
'effect' => 'fade',
|
||||
'loop' => true,
|
||||
'pagination' => 0,
|
||||
'breakpoints' => [ 1024 => [ "slidesPerView" => 1 ] ],
|
||||
];
|
||||
|
||||
$columns = apply_filters( 'opalestate_thumbnail_nav_column', 5 );
|
||||
$src = wp_get_attachment_url( get_post_thumbnail_id() );
|
||||
|
||||
$show = 9;
|
||||
$items = array_chunk( $galleries, $show );
|
||||
|
||||
if ( count( $items[0] ) < $show ) {
|
||||
for ( $i = count( $items[0] ); $i < $show; $i++ ) {
|
||||
$items[0][ $i ] = 'none';
|
||||
}
|
||||
$hasMore = false;
|
||||
} else {
|
||||
$hasMore = true;
|
||||
}
|
||||
|
||||
// echo '<pre>' . print_r( $items,1 );die;
|
||||
?>
|
||||
|
||||
|
||||
<div class="gallery-metro-preview opalestate-gallery">
|
||||
<div class="metro-big">
|
||||
<a href="<?php echo esc_url( $src ); ?>" style="background-image:url('<?php echo esc_url( $src ); ?>')"></a>
|
||||
</div>
|
||||
<div class="metro-group-small">
|
||||
<?php if ( isset( $items[0] ) && is_array( $items[0] ) ): ?>
|
||||
<?php foreach ( $items[0] as $key => $src ): ?>
|
||||
<?php if ( $src == "none" ) : ?>
|
||||
<div class="metro-small no-image">
|
||||
<div class="show-first-photo">
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="metro-small">
|
||||
<?php if ( $hasMore && $key == count( $items[0] ) - 1 ):
|
||||
$content = $show . "+"; ?>
|
||||
<a href="<?php echo esc_url( $src ); ?>" class="has-more" style="background-image:url('<?php echo esc_url( $src ); ?>')">
|
||||
<span><em><?php echo $content; ?></em></span>
|
||||
</a>
|
||||
<?php if ( isset( $items[1] ) ): ?>
|
||||
<?php foreach ( $items[1] as $_src ): ?>
|
||||
<a class="hide" href="<?php echo esc_url( $_src ); ?>" style="background-image:url('<?php echo esc_url( $_src ); ?>')"></a>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else : ?>
|
||||
<a href="<?php echo esc_url( $src ); ?>" style="background-image:url('<?php echo esc_url( $src ); ?>')"></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
<div class="property-thumbnail">
|
||||
<?php the_post_thumbnail( 'full' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
78
templates/single-property/preview/gallery-slider.php
Executable file
78
templates/single-property/preview/gallery-slider.php
Executable file
@@ -0,0 +1,78 @@
|
||||
<div class="property-preview">
|
||||
<div class="preview-gallery-slider">
|
||||
<?php
|
||||
global $property;
|
||||
$galleries = $property->get_gallery();
|
||||
|
||||
|
||||
$image_size = opalestate_get_option( 'opalestate_thumbnail_size' );
|
||||
if ( ! empty( $galleries ) && isset( $galleries ) ):
|
||||
?>
|
||||
<?php
|
||||
$_id = 'posts-block-' . rand( 1, 9 );
|
||||
$item = apply_filters( 'opalesate_related_property_column', 1 );
|
||||
|
||||
$data = [
|
||||
'slidesPerView' => 1,
|
||||
'autoHeight' => 1,
|
||||
'spaceBetween' => 0,
|
||||
'effect' => 'fade',
|
||||
'loop' => true,
|
||||
'pagination' => 0,
|
||||
'breakpoints' => [ 1024 => [ "slidesPerView" => 1 ] ],
|
||||
];
|
||||
|
||||
$columns = apply_filters( 'opalestate_thumbnail_nav_column', 5 );
|
||||
?>
|
||||
|
||||
<div class="opalestate-swiper-wrap">
|
||||
<div class="opalestate-swiper-play swiper-container"
|
||||
id="postcarousel-<?php echo esc_attr( $_id ); ?>"
|
||||
data-swiper="<?php echo esc_attr( wp_json_encode( $data ) ); ?>">
|
||||
<div class="swiper-wrapper">
|
||||
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
<div class="swiper-slide"><?php the_post_thumbnail( opalestate_get_option( 'featured_image_size', 'full' ) ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( isset( $galleries ) && is_array( $galleries ) ): ?>
|
||||
<?php foreach ( $galleries as $src ): ?>
|
||||
<div class="swiper-slide"><img src="<?php echo esc_url( $src ); ?>" alt="gallery"></div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
<div class="property-thumbnail">
|
||||
<?php the_post_thumbnail( 'full' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ( isset( $showinfo ) && $showinfo ): ?>
|
||||
<div class="property-abs-info">
|
||||
<div class="property-meta">
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
<div class="property-address clearfix">
|
||||
<div class="pull-left">
|
||||
<?php if ( $property->latitude && $property->longitude ) : ?>
|
||||
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
|
||||
<span class="property-view-map">
|
||||
<i class="fa fa-map-marker"></i>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php echo esc_html( $property->get_address() ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php opalestate_get_single_short_meta(); ?>
|
||||
|
||||
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
56
templates/single-property/preview/map.php
Executable file
56
templates/single-property/preview/map.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
global $property;
|
||||
$maps = $property->get_map();
|
||||
|
||||
if ( !empty($maps) ):
|
||||
$id = time();
|
||||
?>
|
||||
<div class="property-preview property-preview-custom-size">
|
||||
|
||||
<div id="property-map<?php echo esc_attr($id); ?>" class="property-preview-map" data-latitude="<?php echo (isset($maps['latitude']) ? $maps['latitude'] : ''); ?>" data-longitude="<?php echo (isset($maps['longitude']) ? $maps['longitude'] : ''); ?>" data-icon="<?php echo esc_url(OPALESTATE_CLUSTER_ICON_URL);?>"></div>
|
||||
|
||||
<div id="property-search-places" class="property-search-places">
|
||||
<div class="place-buttons">
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="hospital" data-type="hospital" data-icon="hospital.png">
|
||||
<i class="fa fa-hospital-o" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Hospital', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="library" data-type="library" data-icon="libraries.png">
|
||||
<i class="fa fa-bank" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Library', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="pharmacy" data-type="pharmacy" data-icon="pharmacy.png">
|
||||
<i class="fa fa-plus-square" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Pharmacy', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
|
||||
<div class="btn-map-search" data-group="school" data-type="school" data-icon="school.png">
|
||||
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'School', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="shopping" data-type="grocery_or_supermarket" data-icon="supermarket.png">
|
||||
<i class="fa fa-shopping-basket" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Shopping', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="trainstation" data-type="bus_station" data-icon="transportation.png">
|
||||
<i class="fa fa-subway" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Trainstation', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif;?>
|
||||
32
templates/single-property/preview/mark-picture.php
Executable file
32
templates/single-property/preview/mark-picture.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php global $property; ?>
|
||||
<div class="property-preview property-mark-pics-preview">
|
||||
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
<div class="property-thumbnail">
|
||||
<?php the_post_thumbnail( 'full' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="container property-heading-top">
|
||||
<div class="property-single-info">
|
||||
<div class="group-items">
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
<?php opalestate_property_status(); ?>
|
||||
|
||||
<div class="property-meta">
|
||||
<div class="property-address clearfix">
|
||||
<div class="pull-left">
|
||||
<?php if ( $property->latitude && $property->longitude ) : ?>
|
||||
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
|
||||
<span class="property-view-map"><i class="fa fa-map-marker"></i></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php echo esc_html( $property->get_address() ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
97
templates/single-property/preview/tabs.php
Executable file
97
templates/single-property/preview/tabs.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
global $property;
|
||||
$maps = $property->get_map();
|
||||
|
||||
if ( ! empty( $maps ) ):
|
||||
|
||||
$id = time();
|
||||
|
||||
?>
|
||||
<div class="opalestate-preview opalestate-preview-tabs">
|
||||
<div class="google-map-tabs opalestate-tab" data-active="tab-<?php echo esc_attr( $tab_active ); ?>">
|
||||
<div class="opalestate-tab-wrap">
|
||||
|
||||
<div class="nav opalestate-tab-head" role="tablist">
|
||||
<a aria-expanded="false" href="#tab-gallery-slider" role="tab" class="tab-item"><i class="fa fa-picture-o"></i> <span><?php esc_html_e( 'Gallery', 'opalestate-pro' ); ?></span></a>
|
||||
|
||||
<a aria-expanded="false" href="#tab-google-map" role="tab" class="tab-item"><i class="fa fa-map"></i> <span><?php esc_html_e( 'Map', 'opalestate-pro' ); ?></span></a>
|
||||
<?php if ( $property->enable_google_mapview() ) : ?>
|
||||
<a aria-expanded="true" href="#tab-street-view-map" role="tab" class="tab-item tab-google-street-view-btn" data-target=".tab-google-street-view-btn"><i
|
||||
class="fa fa-street-view"></i> <span><?php esc_html_e( 'Street View', 'opalestate-pro' ); ?></span></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="opalestate-map-content">
|
||||
<div class="opalestate-tab-content" id="tab-gallery-slider">
|
||||
<?php echo opalestate_load_template_path( 'single-property/preview/gallery-slider' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="opalestate-tab-content" id="tab-google-map">
|
||||
<div class="property-preview property-preview-custom-size">
|
||||
|
||||
<div id="property-map<?php echo esc_attr( $id ); ?>" class="property-preview-map" data-latitude="<?php echo( isset( $maps['latitude'] ) ? $maps['latitude'] : '' ); ?>"
|
||||
data-longitude="<?php echo( isset( $maps['longitude'] ) ? $maps['longitude'] : '' ); ?>" data-icon="<?php echo esc_url( OPALESTATE_CLUSTER_ICON_URL ); ?>"></div>
|
||||
|
||||
|
||||
<div id="property-search-places" class="property-search-places">
|
||||
<div class="place-buttons">
|
||||
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="hospital" data-type="hospital" data-icon="hospital.png">
|
||||
<i class="fa fa-hospital-o" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Hospital', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="library" data-type="library" data-icon="libraries.png">
|
||||
<i class="fa fa-bank" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Library', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="pharmacy" data-type="pharmacy" data-icon="pharmacy.png">
|
||||
<i class="fa fa-plus-square" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Pharmacy', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
|
||||
<div class="btn-map-search" data-group="school" data-type="school" data-icon="school.png">
|
||||
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'School', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="shopping" data-type="grocery_or_supermarket" data-icon="supermarket.png">
|
||||
<i class="fa fa-shopping-basket" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Shopping', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nearby-container">
|
||||
<div class="btn-map-search" data-group="trainstation" data-type="bus_station" data-icon="transportation.png">
|
||||
<i class="fa fa-subway" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e( 'Trainstation', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( $property->enable_google_mapview() ) : ?>
|
||||
|
||||
<div class="opalestate-tab-content" id="tab-street-view-map">
|
||||
<div class="property-preview property-preview-custom-size property-preview-street-map" style="min-height:580px"
|
||||
data-latitude="<?php echo( isset( $maps['latitude'] ) ? $maps['latitude'] : '' ); ?>"
|
||||
data-longitude="<?php echo( isset( $maps['longitude'] ) ? $maps['longitude'] : '' ); ?>" id="property-streep-map-<?php echo esc_attr( $id ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
15
templates/single-property/preview/virtualtour.php
Executable file
15
templates/single-property/preview/virtualtour.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
global $property;
|
||||
$virtualTour = $property->get_virtual_tour();
|
||||
?>
|
||||
<?php if( $virtualTour ) : ?>
|
||||
<div class="property-preview property-preview-custom-size">
|
||||
<?php echo do_shortcode( $virtualTour ); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php if ( has_post_thumbnail() ): ?>
|
||||
<div class="property-thumbnail">
|
||||
<?php the_post_thumbnail( 'full' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user