| 1 |
<?php |
| 2 |
/** |
| 3 |
* Applicant viewings page within My Account |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/propertyhive/account/applicant-viewings.php. |
| 6 |
* |
| 7 |
* @author PropertyHive |
| 8 |
* @package PropertyHive/Templates |
| 9 |
* @version 1.0.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
if ( ! defined( 'ABSPATH' ) ) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
?> |
| 16 |
|
| 17 |
<div class="propertyhive-owner-properties"> |
| 18 |
|
| 19 |
<?php |
| 20 |
if ( !empty($properties) ) |
| 21 |
{ |
| 22 |
echo ' |
| 23 |
<table class="viewings-table upcoming-viewings-table" width="100%"> |
| 24 |
<tr> |
| 25 |
<th> </th> |
| 26 |
<th>' . esc_html(__( 'Address', 'propertyhive' )) . '</th> |
| 27 |
<th>' . esc_html(__( 'Price', 'propertyhive' )) . '</th> |
| 28 |
<th>' . esc_html(__( 'Status', 'propertyhive' )) . '</th> |
| 29 |
</tr> |
| 30 |
'; |
| 31 |
foreach ($properties as $property) |
| 32 |
{ |
| 33 |
$link_prefix = ( ( $property->on_market == 'yes' ) ? '<a href="' . esc_url(get_permalink( $property->id )) . '">' : '' ); |
| 34 |
$link_suffix = ( ( $property->on_market == 'yes' ) ? '</a>' : '' ); |
| 35 |
|
| 36 |
$image = $property->get_main_photo_src(); |
| 37 |
|
| 38 |
echo '<tr> |
| 39 |
<td>' . ( ( $image !== false ) ? $link_prefix . '<img src="' . esc_url($image) . '" width="75" alt="' . esc_attr(get_the_title( $property->id )) . '">' : '' ) . $link_suffix . '</td> |
| 40 |
<td>' . $link_prefix . esc_html(get_the_title( $property->id )) . $link_suffix . '</td> |
| 41 |
<td>' . $property->get_formatted_price() . '</td> |
| 42 |
<td>' . esc_html($property->availability) . '<br>' . esc_html( ( $property->on_market == 'yes' ) ? 'On Market' : 'Not On Market' ) . '</td> |
| 43 |
</tr>'; |
| 44 |
} |
| 45 |
echo '</table>'; |
| 46 |
} |
| 47 |
else |
| 48 |
{ |
| 49 |
echo '<p class="propertyhive-info">' . esc_html(__( 'No properties found', 'propertyhive' )) . '</p>'; |
| 50 |
} |
| 51 |
?> |
| 52 |
|
| 53 |
</div> |
| 54 |
|