Add column type

This commit is contained in:
Gilles Van Assche 2025-03-05 10:37:43 +01:00
parent 65e62e4b2f
commit 413f88dd4f
2 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,7 @@ if (isset($_GET['debut']) && $_GET['debut'] == 'asc') {
<input type="text" id="postalInput" maxlength="4" placeholder="48.."> <input type="text" id="postalInput" maxlength="4" placeholder="48..">
</th> </th>
<th class="p-4 border-b border-slate-300 bg-slate-200">Organisme</th> <th class="p-4 border-b border-slate-300 bg-slate-200">Organisme</th>
<th class="p-4 border-b border-slate-300 bg-slate-200">Type</th>
<th class="p-4 border-b border-slate-300 bg-slate-200">Titre</th> <th class="p-4 border-b border-slate-300 bg-slate-200">Titre</th>
</tr> </tr>
</thead> </thead>
@ -77,12 +78,14 @@ if (isset($_GET['debut']) && $_GET['debut'] == 'asc') {
$code_postal = empty($code_postal) ? '4800' : $code_postal; $code_postal = empty($code_postal) ? '4800' : $code_postal;
$organisme = get_field('organisme'); $organisme = get_field('organisme');
$lien_de_levenement = get_field('lien_de_levenement'); $lien_de_levenement = get_field('lien_de_levenement');
$type = get_field('type');
?> ?>
<tr data-postal="<?php echo $code_postal; ?>"> <tr data-postal="<?php echo $code_postal; ?>">
<td class="p-4 border-b border-slate-300"><?php echo $date_debut; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $date_debut; ?></td>
<td class="p-4 border-b border-slate-300"><?php echo $date_fin; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $date_fin; ?></td>
<td class="p-4 border-b border-slate-300"><?php echo $code_postal; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $code_postal; ?></td>
<td class="p-4 border-b border-slate-300"><?php echo $organisme; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $organisme; ?></td>
<td class="p-4 border-b border-slate-300"><?php if(!empty($type)){echo $type['label'];} ?></td>
<td class="p-4 border-b border-slate-300"><a href="<?php echo $lien_de_levenement; ?>" target="_blank"><?php the_title(); ?></a></td> <td class="p-4 border-b border-slate-300"><a href="<?php echo $lien_de_levenement; ?>" target="_blank"><?php the_title(); ?></a></td>
</tr> </tr>
<?php endwhile; else : ?> <?php endwhile; else : ?>

View File

@ -42,6 +42,7 @@ $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
<th class="p-4 border-b border-slate-300 bg-slate-200">Fin</th> <th class="p-4 border-b border-slate-300 bg-slate-200">Fin</th>
<th class="p-4 border-b border-slate-300 bg-slate-200">CP</th> <th class="p-4 border-b border-slate-300 bg-slate-200">CP</th>
<th class="p-4 border-b border-slate-300 bg-slate-200">Organisme</th> <th class="p-4 border-b border-slate-300 bg-slate-200">Organisme</th>
<th class="p-4 border-b border-slate-300 bg-slate-200">Type</th>
<th class="p-4 border-b border-slate-300 bg-slate-200">Titre</th> <th class="p-4 border-b border-slate-300 bg-slate-200">Titre</th>
</tr> </tr>
</thead> </thead>
@ -54,12 +55,14 @@ $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$code_postal = empty($code_postal) ? '4800' : $code_postal; $code_postal = empty($code_postal) ? '4800' : $code_postal;
$organisme = get_field('organisme'); $organisme = get_field('organisme');
$lien_de_levenement = get_field('lien_de_levenement'); $lien_de_levenement = get_field('lien_de_levenement');
$type = get_field('type');
?> ?>
<tr> <tr>
<td class="p-4 border-b border-slate-300"><?php echo $date_debut; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $date_debut; ?></td>
<td class="p-4 border-b border-slate-300"><?php echo $date_fin; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $date_fin; ?></td>
<td class="p-4 border-b border-slate-300"><?php echo $code_postal; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $code_postal; ?></td>
<td class="p-4 border-b border-slate-300"><?php echo $organisme; ?></td> <td class="p-4 border-b border-slate-300"><?php echo $organisme; ?></td>
<td class="p-4 border-b border-slate-300"><?php if(!empty($type)){echo $type['label'];} ?></td>
<td class="p-4 border-b border-slate-300"><a href="<?php echo $lien_de_levenement; ?>" target="_blank"><?php the_title(); ?></a></td> <td class="p-4 border-b border-slate-300"><a href="<?php echo $lien_de_levenement; ?>" target="_blank"><?php the_title(); ?></a></td>
</tr> </tr>
<?php endwhile; else : ?> <?php endwhile; else : ?>