FEAT added 'state' column to artisans list
This commit is contained in:
parent
2cdf0fa7f5
commit
a7266db51a
|
|
@ -44,6 +44,7 @@ function metiers_patrimoine_artisans_add_acf_posts_columns($columns)
|
|||
'metiers' => 'Métiers',
|
||||
'elements' => 'Éléments du bâtiment',
|
||||
'conseiller' => 'Conseiller',
|
||||
'state' => 'État',
|
||||
'mdpstatus' => 'Statut de travail',
|
||||
'lastmodified' => 'Dernière modification',
|
||||
'onlinedate' => 'Mise en ligne'
|
||||
|
|
@ -71,6 +72,10 @@ function metiers_patrimoine_artisans_handle_posts_custom_columns($column)
|
|||
|
||||
echo $conseillerDatas->display_name;
|
||||
}
|
||||
if ($column == 'state') {
|
||||
$status = get_post_status($post_id);
|
||||
echo '<div class="status-state status-state--' . $status . '">' . translate_wordpress_online_statuses($status) . '</div>';
|
||||
}
|
||||
if ($column == 'mdpstatus') {
|
||||
// $status = get_field('mdp_status', $post_id);
|
||||
// if (!$status || !isset($status['label'])) return;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ body.post-type-artisans {
|
|||
|
||||
.post-state {
|
||||
@apply px-3 py-1 rounded-2xl font-medium text-xs border border-solid inline-block w-fit;
|
||||
@apply hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user