| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly. |
| 4 |
} |
| 5 |
|
| 6 |
echo fep_info_output(); |
| 7 |
/* |
| 8 |
if ( ! $total ) { |
| 9 |
echo '<div class="fep-error">' . apply_filters( 'fep_filter_directory_empty', __( 'No users found.', 'front-end-pm' ) ) . '</div>'; |
| 10 |
return; |
| 11 |
} |
| 12 |
*/ |
| 13 |
do_action( 'fep_display_before_directory' ); |
| 14 |
?> |
| 15 |
<div class="fep-directory-search-form-div"> |
| 16 |
<form id="fep-directory-search-form" action=""> |
| 17 |
<input type="hidden" name="fepaction" value="directory" /> |
| 18 |
<input type="search" name="fep-search" class="fep-directory-search-form-field" value="<?php echo isset( $_GET['fep-search'] ) ? esc_attr( stripslashes( $_GET['fep-search'] ) ) : ''; ?>" placeholder="<?php _e( 'Search Users', 'front-end-pm' ); ?>" /> |
| 19 |
<input type="hidden" name="feppage" value="1" /> |
| 20 |
</form> |
| 21 |
</div> |
| 22 |
<form class="fep-directory-table form" method="post" action=""> |
| 23 |
<div class="fep-table fep-action-table"> |
| 24 |
<div> |
| 25 |
<div class="fep-bulk-action"> |
| 26 |
<select name="fep-bulk-action"> |
| 27 |
<option value=""><?php esc_html_e( 'Bulk action', 'front-end-pm' ); ?></option> |
| 28 |
<?php foreach( Fep_Directory::init()->get_table_bulk_actions() as $bulk_action => $bulk_action_display ) : ?> |
| 29 |
<option value="<?php echo esc_attr( $bulk_action ); ?>"><?php echo esc_html( $bulk_action_display ); ?></option> |
| 30 |
<?php endforeach; ?> |
| 31 |
</select> |
| 32 |
</div> |
| 33 |
<div> |
| 34 |
<input type="hidden" name="token" value="<?php echo fep_create_nonce( 'directory_bulk_action' ); ?>"/> |
| 35 |
<button type="submit" class="fep-button" name="fep_action" value="directory_bulk_action"><?php esc_html_e( 'Apply', 'front-end-pm' ); ?></button> |
| 36 |
</div> |
| 37 |
<div class="fep-loading-gif-div"></div> |
| 38 |
<div class="fep-filter"> |
| 39 |
<select onchange="if ( this.value ) window.location.href=this.value"> |
| 40 |
<?php foreach( Fep_Directory::init()->get_table_filters() as $filter => $filter_display ) : ?> |
| 41 |
<option value="<?php echo esc_url( add_query_arg( array( 'fep-filter' => $filter, 'feppage' => false ) ) ); ?>" <?php selected( $g_filter, $filter );?>><?php echo esc_html( $filter_display ); ?></option> |
| 42 |
<?php endforeach; ?> |
| 43 |
</select> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
<?php |
| 48 |
if ( $user_query->get_results() ) { |
| 49 |
wp_enqueue_script( 'fep-cb-check-uncheck-all' ); |
| 50 |
?> |
| 51 |
<div class="fep-cb-check-uncheck-all-div"> |
| 52 |
<label> |
| 53 |
<input type="checkbox" class="fep-cb-check-uncheck-all" /> |
| 54 |
<?php esc_html_e( 'Check/Uncheck all', 'front-end-pm' ); ?> |
| 55 |
</label> |
| 56 |
</div> |
| 57 |
<div id="fep-table" class="fep-table fep-odd-even"> |
| 58 |
<?php foreach( $user_query->get_results() as $user ) : ?> |
| 59 |
<div id="fep-directory-<?php echo $user->ID; ?>" class="fep-table-row"><?php |
| 60 |
foreach ( Fep_Directory::init()->get_table_columns() as $column => $display ) : ?> |
| 61 |
<div class="fep-column fep-column-<?php echo esc_attr( $column ); ?>"><?php Fep_Directory::init()->get_column_content( $column, $user ); ?></div> |
| 62 |
<?php endforeach ?> |
| 63 |
</div> |
| 64 |
<?php |
| 65 |
endforeach; ?> |
| 66 |
</div> |
| 67 |
<?php |
| 68 |
echo fep_pagination( $total, fep_get_option( 'user_page', 50 ) ); |
| 69 |
} else { |
| 70 |
?><div class="fep-error"><?php esc_html_e( 'No users found. Try different filter.', 'front-end-pm' ); ?></div><?php |
| 71 |
} |
| 72 |
?> |
| 73 |
</form> |
| 74 |
<?php |
| 75 |
|