87 lines
3.0 KiB
PHP
87 lines
3.0 KiB
PHP
<?php
|
|
$current_user = wp_get_current_user();
|
|
$user_name = $current_user->display_name;
|
|
$use_current_user = isset($_GET['use-current-user']) ? $_GET['use-current-user'] : true;
|
|
|
|
?>
|
|
|
|
<div class="wrap gestion-artisans">
|
|
|
|
<?php if ($use_current_user) : ?>
|
|
<h1 class="page-title">Artisans de <?php echo $user_name ?></h1>
|
|
<?php else : ?>
|
|
<h1 class="page-title">Tous les Artisans</h1>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="filters">
|
|
<a href="<?php echo add_query_arg('use-current-user', '1', $_SERVER['REQUEST_URI']); ?>" class="button <?php echo $use_current_user ? 'filter-active' : ''; ?>">
|
|
Artisans de <?php echo $user_name ?>
|
|
</a>
|
|
<a href="<?php echo add_query_arg('use-current-user', '0', $_SERVER['REQUEST_URI']); ?>" class="button <?php echo !$use_current_user ? 'filter-active' : ''; ?> ">
|
|
Tous les artisans
|
|
</a>
|
|
</div>
|
|
|
|
<?php
|
|
//===== SECTION : ACTION REQUISE =====//
|
|
get_template_part('template-parts/admin/artisans-section-group', null, array(
|
|
'type' => 'action-required',
|
|
'status_class' => 'action-required ',
|
|
'title' => 'Action requise',
|
|
'use_current_user' => $use_current_user,
|
|
'current_user_id' => $current_user->ID,
|
|
'not_found_message' => 'Aucun artisan avec une action requise',
|
|
));
|
|
|
|
//===== SECTION : À ACTUALISER =====//
|
|
get_template_part('template-parts/admin/artisans-section-group', null, array(
|
|
'status' => 'to_actualize',
|
|
'status_class' => 'to-actualize',
|
|
'title' => 'À actualiser',
|
|
'use_current_user' => $use_current_user,
|
|
'current_user_id' => $current_user->ID,
|
|
'not_found_message' => 'Aucun artisan à actualiser',
|
|
));
|
|
|
|
//===== SECTION : À CONTACTER =====//
|
|
get_template_part('template-parts/admin/artisans-section-group', null, array(
|
|
'status' => 'to_contact',
|
|
'status_class' => 'to-contact',
|
|
'title' => 'À contacter',
|
|
'use_current_user' => $use_current_user,
|
|
'current_user_id' => $current_user->ID,
|
|
'not_found_message' => 'Aucun artisan à contacter',
|
|
));
|
|
|
|
//===== SECTION : EN ATTENTE DE RETOUR =====//
|
|
get_template_part('template-parts/admin/artisans-section-group', null, array(
|
|
'status' => 'waiting_feedback',
|
|
'status_class' => 'waiting-feedback',
|
|
'title' => 'En attente de retour',
|
|
'use_current_user' => $use_current_user,
|
|
'current_user_id' => $current_user->ID,
|
|
'not_found_message' => 'Aucun artisan en attente de retour',
|
|
));
|
|
|
|
//===== SECTION : EN COURS =====//
|
|
get_template_part('template-parts/admin/artisans-section-group', null, array(
|
|
'status' => 'ongoing',
|
|
'status_class' => 'ongoing',
|
|
'title' => 'En cours',
|
|
'use_current_user' => $use_current_user,
|
|
'current_user_id' => $current_user->ID,
|
|
'not_found_message' => 'Aucun artisan en cours',
|
|
));
|
|
|
|
//===== SECTION : OK =====//
|
|
get_template_part('template-parts/admin/artisans-section-group', null, array(
|
|
'status' => 'ok',
|
|
'status_class' => 'ok',
|
|
'title' => 'OK',
|
|
'use_current_user' => $use_current_user,
|
|
'current_user_id' => $current_user->ID,
|
|
'not_found_message' => 'Aucun artisan OK',
|
|
));
|
|
?>
|
|
</div>
|