Compare commits
3 Commits
2cdf0fa7f5
...
b08fd1d5b6
| Author | SHA1 | Date | |
|---|---|---|---|
| b08fd1d5b6 | |||
| 73b7565e21 | |||
| a7266db51a |
|
|
@ -44,6 +44,7 @@ function metiers_patrimoine_artisans_add_acf_posts_columns($columns)
|
||||||
'metiers' => 'Métiers',
|
'metiers' => 'Métiers',
|
||||||
'elements' => 'Éléments du bâtiment',
|
'elements' => 'Éléments du bâtiment',
|
||||||
'conseiller' => 'Conseiller',
|
'conseiller' => 'Conseiller',
|
||||||
|
'state' => 'État',
|
||||||
'mdpstatus' => 'Statut de travail',
|
'mdpstatus' => 'Statut de travail',
|
||||||
'lastmodified' => 'Dernière modification',
|
'lastmodified' => 'Dernière modification',
|
||||||
'onlinedate' => 'Mise en ligne'
|
'onlinedate' => 'Mise en ligne'
|
||||||
|
|
@ -71,6 +72,10 @@ function metiers_patrimoine_artisans_handle_posts_custom_columns($column)
|
||||||
|
|
||||||
echo $conseillerDatas->display_name;
|
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') {
|
if ($column == 'mdpstatus') {
|
||||||
// $status = get_field('mdp_status', $post_id);
|
// $status = get_field('mdp_status', $post_id);
|
||||||
// if (!$status || !isset($status['label'])) return;
|
// if (!$status || !isset($status['label'])) return;
|
||||||
|
|
@ -160,7 +165,7 @@ function metiers_patrimoine_filter_posts_declare_dropdowns()
|
||||||
|
|
||||||
$meta_key = 'mdp_status';
|
$meta_key = 'mdp_status';
|
||||||
$values = get_posts([
|
$values = get_posts([
|
||||||
'post_status' => array('publish', 'draft', 'pending', 'offline', 'trash'),
|
'post_status' => 'any',
|
||||||
'post_type' => 'artisans',
|
'post_type' => 'artisans',
|
||||||
'posts_per_page' => -1,
|
'posts_per_page' => -1,
|
||||||
'meta_key' => $meta_key,
|
'meta_key' => $meta_key,
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ body.post-type-artisans {
|
||||||
|
|
||||||
.post-state {
|
.post-state {
|
||||||
@apply px-3 py-1 rounded-2xl font-medium text-xs border border-solid inline-block w-fit;
|
@apply px-3 py-1 rounded-2xl font-medium text-xs border border-solid inline-block w-fit;
|
||||||
|
@apply hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -117,6 +118,7 @@ body.post-type-artisans {
|
||||||
.subsubsub {
|
.subsubsub {
|
||||||
.all,
|
.all,
|
||||||
.publish,
|
.publish,
|
||||||
|
.draft,
|
||||||
.pending,
|
.pending,
|
||||||
.trash,
|
.trash,
|
||||||
.offline {
|
.offline {
|
||||||
|
|
@ -139,6 +141,22 @@ body.post-type-artisans {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.draft {
|
||||||
|
@apply border-neutral-400;
|
||||||
|
transition: all 0.6s;
|
||||||
|
a,
|
||||||
|
span {
|
||||||
|
@apply !text-neutral-400;
|
||||||
|
}
|
||||||
|
&:hover,
|
||||||
|
&:has(a[aria-current='page']) {
|
||||||
|
@apply bg-neutral-400;
|
||||||
|
a,
|
||||||
|
span {
|
||||||
|
@apply !text-white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.offline {
|
.offline {
|
||||||
@apply border-neutral-700;
|
@apply border-neutral-700;
|
||||||
transition: all 0.6s;
|
transition: all 0.6s;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user