Origin commit

This commit is contained in:
Hoang Huu
2019-09-10 11:27:33 +07:00
commit 499e068e4f
844 changed files with 188705 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
$data = OpalEstate_User_Search::get_instance()->get_list();
// echo '<pre>'.print_r( $data, 1 );die;
?>
<?php if( $data ): ?>
<div class="property-listing my-saved-search">
<div class="opalestate-admin-box">
<div class="box-content">
<h4><?php esc_html_e( 'My Saved Searches' , 'opalestate-pro' ) ; ?></h4>
<table class="table table-condensed">
<thead>
<tr> <th>#</th> <th><?php esc_html_e('Name','opalestate-pro'); ?></th> <th><?php esc_html_e('View','opalestate-pro'); ?></th> <th><?php esc_html_e('Delete','opalestate-pro'); ?></th> </tr>
</thead>
<tbody>
<?php foreach( $data as $key => $search ): ?>
<tr>
<th scope="row"><?php echo $key + 1; ?></th>
<td><?php echo $search->name; ?></td>
<td><a target="_blank" href="<?php echo opalestate_get_search_link().'?'.$search->params; ?>"> <i class="fa fa-search"></i></a></td>
<td><a class="text-danger" onclick="return confirm('<?php esc_html_e( 'Are you sure to delete this?', 'opalestate-pro' ); ?>')" href="<?php echo opalestate_user_savedsearch_page( array('id' => $search->id ,'doaction' =>'delete') ); ?>"> <i class="fa fa-close"></i></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<?php else : ?>
<div class="opalestate-box">
<div class="box-content">
<div class="opalestate-message">
<h3><?php esc_html_e( 'No Item In Saved Searches', 'opalestate-pro' ); ?></h3>
<p><?php esc_html_e( 'You have not added any search data.', 'opalestate-pro' ) ;?></p>
</div>
</div>
</div>
<?php endif; ?>
<?php wp_reset_postdata(); ?>

View File

@@ -0,0 +1,41 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if( opalestate_options( 'enable_saved_usersearch', 'on' ) == 'on' ):
$args = array();
$message = sprintf( esc_html__( 'Hey there! I saved this search on %s, please check out these homes that are listed. Remember to save this search to be first to catch any new listings.', 'opalestate-pro' ) , get_bloginfo( 'name' ) );
$logined = is_user_logged_in();
?>
<div class="opalestate-popup">
<div class="popup-head <?php if( ! $logined ): ?> opalestate-need-login <?php endif; ?>"><span><i class="fa fa-star" aria-hidden="true"></i> <?php esc_html_e('Save search', 'opalestate-pro') ?></span></div>
<?php if( $logined ): ?>
<div class="popup-body">
<div class="popup-close"><i class="fa fa-times" aria-hidden="true"></i></div>
<div class="contact-share-form-container">
<h6><?php echo esc_html__( 'Name this search.', 'opalestate-pro' ); ?></h6>
<div class="box-content agent-contact-form">
<form method="post" id="opalestate-save-search-form">
<?php do_action('opalestate_contact_share_form_before'); ?>
<div class="form-group">
<input class="form-control" name="name" type="text" placeholder="<?php echo esc_html__( 'Name', 'opalestate-pro' ); ?>" required="required">
</div><!-- /.form-group -->
<?php do_action('opalestate_contact_share_form_after'); ?>
<button class="button btn btn-primary btn-3d btn-block" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> <?php echo esc_html__( ' Processing', 'opalestate-pro' ); ?>" type="submit" name="contact-form"><?php echo esc_html__( 'Save', 'opalestate-pro' ); ?></button>
</form>
</div><!-- /.agent-contact-form -->
</div><!-- /.agent-contact-->
</div>
<?php endif ; ?>
</div>
<?php endif; ?>