| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly. |
| 4 |
} |
| 5 |
if ( $box_content->found_messages ) { |
| 6 |
?> |
| 7 |
<div class="fep-cb-check-uncheck-all-div"> |
| 8 |
<label> |
| 9 |
<input type="checkbox" class="fep-cb-check-uncheck-all" /> |
| 10 |
<?php esc_html_e( 'Check/Uncheck all', 'front-end-pm' ); ?> |
| 11 |
</label> |
| 12 |
</div> |
| 13 |
<div id="fep-table" class="fep-table fep-odd-even"> |
| 14 |
<?php |
| 15 |
while ( $box_content->have_messages() ) { |
| 16 |
$box_content->the_message(); |
| 17 |
$row_class = array(); |
| 18 |
$row_class[] = 'fep-table-row'; |
| 19 |
$row_class[] = 'fep-table-row-' . fep_get_message_field( 'mgs_type' ); |
| 20 |
if( fep_is_read( true ) ){ |
| 21 |
$row_class[] = 'fep-table-row-read'; |
| 22 |
} else { |
| 23 |
$row_class[] = 'fep-table-row-unread'; |
| 24 |
} |
| 25 |
|
| 26 |
if ( 'announcement' === fep_get_message_field( 'mgs_type' ) ) : |
| 27 |
?> |
| 28 |
<div id="fep-announcement-<?php echo fep_get_the_id(); ?>" class="<?php echo fep_sanitize_html_class( $row_class ); ?>"> |
| 29 |
<?php foreach ( FEP_Announcements::init()->get_table_columns() as $column => $display ) : ?> |
| 30 |
<div class="fep-column fep-column-<?php echo esc_attr( $column ); ?>"><?php FEP_Announcements::init()->get_column_content( $column ); ?></div> |
| 31 |
<?php endforeach; ?> |
| 32 |
</div> |
| 33 |
<?php elseif ( 'message' === fep_get_message_field( 'mgs_type' ) ) : ?> |
| 34 |
<div id="fep-message-<?php echo fep_get_the_id(); ?>" class="<?php echo fep_sanitize_html_class( $row_class ); ?>"> |
| 35 |
<?php foreach ( Fep_Messages::init()->get_table_columns() as $column => $display ) : ?> |
| 36 |
<div class="fep-column fep-column-<?php echo esc_attr( $column ); ?>"><?php Fep_Messages::init()->get_column_content( $column ); ?></div> |
| 37 |
<?php endforeach; ?> |
| 38 |
</div> |
| 39 |
<?php endif; ?> |
| 40 |
<?php |
| 41 |
} //endwhile |
| 42 |
?> |
| 43 |
</div> |
| 44 |
<?php |
| 45 |
echo fep_pagination_prev_next( $box_content->has_more_row ); |
| 46 |
} else { |
| 47 |
if ( empty( $_GET['fep-filter'] ) || 'show-all' == $_GET['fep-filter'] ) { |
| 48 |
?> |
| 49 |
<div class="fep-error"><?php echo sprintf( __( 'No %s found.', 'front-end-pm' ), ( isset( $_GET['fepaction'] ) && 'announcements' == $_GET['fepaction'] ) ? __('announcements', 'front-end-pm') : __('messages', 'front-end-pm') ); ?></div> |
| 50 |
<?php |
| 51 |
} else { |
| 52 |
?> |
| 53 |
<div class="fep-error"><?php echo sprintf( __( 'No %s found. Try different filter.', 'front-end-pm' ), ( isset( $_GET['fepaction'] ) && 'announcements' == $_GET['fepaction'] ) ? __('announcements', 'front-end-pm') : __('messages', 'front-end-pm') ); ?></div> |
| 54 |
<?php |
| 55 |
} |
| 56 |
} |
| 57 |
|