Opal-Estate-Pro/templates/user/my-properties.php

52 lines
2.0 KiB
PHP
Raw Normal View History

2019-09-25 12:07:35 +02:00
<?php
$statuses = [
'all' => esc_html__( 'All', 'opalestate-pro' ),
'published' => esc_html__( 'Published', 'opalestate-pro' ),
'pending' => esc_html__( 'Pending', 'opalestate-pro' ),
'expired' => esc_html__( 'Expired', 'opalestate-pro' ),
];
2019-09-10 06:27:33 +02:00
2019-09-25 12:07:35 +02:00
$gstatus = isset( $_GET['status'] ) ? $_GET['status'] : 'all';
2019-09-10 06:27:33 +02:00
?>
<?php do_action( "opalestate_submission_listing_before" ); ?>
2019-09-25 12:07:35 +02:00
<div class="property-listing my-properties">
2019-09-10 06:27:33 +02:00
2019-09-25 12:07:35 +02:00
<div class="list-tabs">
<div class="tabs">
<ul class="clearfix">
<?php foreach ( $statuses as $status => $label ): ?>
<li <?php if ( $status == $gstatus ): ?> class="active" <?php endif; ?>>
<a href="<?php echo esc_url( opalestate_get_current_url( [ 'status' => $status ] ) ); ?>"><?php echo esc_attr( $label ); ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
2019-09-10 06:27:33 +02:00
</div>
2019-09-25 12:07:35 +02:00
<div class="opalestate-admin-box">
<div class="box-content">
<?php if ( $loop->have_posts() ): ?>
<div class="opalestate-rows">
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<?php $cnt = 0;
while ( $loop->have_posts() ) : $loop->the_post();
global $post; ?>
<div class="col-lg-12 col-md-12 col-sm-12">
<?php echo opalestate_load_template_path( 'user/content-property' ); ?>
</div>
<?php endwhile; ?>
</div>
</div>
<?php opalestate_pagination( $loop->max_num_pages ); ?>
<?php else : ?>
<div class="opalestate-message">
<?php esc_html_e( 'You have not submited any property.', 'opalestate-pro' ); ?>
</div>
2019-09-10 06:27:33 +02:00
<?php endif; ?>
2019-09-25 12:07:35 +02:00
</div>
</div>
</div>
2019-09-10 06:27:33 +02:00
<?php wp_reset_postdata(); ?>
2019-09-25 12:07:35 +02:00
<?php do_action( 'opalestate_submission_listing_after' ); ?>