Improve calendar room column with building name display (v0.11.2)
All checks were successful
Create Release Package / build-release (push) Successful in 1m1s
All checks were successful
Create Release Package / build-release (push) Successful in 1m1s
- Widen room column to 200px with proper left alignment - Display building name as second row under room name - Change table-layout from fixed to auto for flexible columns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -256,16 +256,20 @@ final class Calendar {
|
||||
<tbody>
|
||||
<?php foreach ( $rooms as $room ) : ?>
|
||||
<?php
|
||||
$room_number = get_post_meta( $room->ID, '_bnb_room_room_number', true );
|
||||
$booked_dates = Availability::get_booked_dates( $room->ID, $year, $month );
|
||||
$room_number = get_post_meta( $room->ID, '_bnb_room_room_number', true );
|
||||
$room_building = Room::get_building( $room->ID );
|
||||
$booked_dates = Availability::get_booked_dates( $room->ID, $year, $month );
|
||||
?>
|
||||
<tr>
|
||||
<td class="bnb-calendar-room">
|
||||
<a href="<?php echo esc_url( get_edit_post_link( $room->ID ) ); ?>">
|
||||
<?php echo esc_html( $room->post_title ); ?>
|
||||
<?php if ( $room_number ) : ?>
|
||||
<span class="room-number">#<?php echo esc_html( $room_number ); ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<?php if ( $room_number ) : ?>
|
||||
<br><small>#<?php echo esc_html( $room_number ); ?></small>
|
||||
<?php if ( $room_building ) : ?>
|
||||
<span class="building-name"><?php echo esc_html( $room_building->post_title ); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php for ( $day = 1; $day <= $days_in_month; $day++ ) : ?>
|
||||
|
||||
Reference in New Issue
Block a user