Improve calendar room column with building name display (v0.11.2)
- 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:
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.11.2] - 2026-02-03
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Calendar page room column now wider (200px) with proper left alignment
|
||||||
|
- Room column displays building name on second row for better identification
|
||||||
|
- Changed calendar table layout from fixed to auto for flexible column widths
|
||||||
|
|
||||||
## [0.11.1] - 2026-02-03
|
## [0.11.1] - 2026-02-03
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -976,7 +976,7 @@
|
|||||||
.bnb-calendar-table {
|
.bnb-calendar-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
table-layout: fixed;
|
table-layout: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bnb-calendar-table th,
|
.bnb-calendar-table th,
|
||||||
@@ -997,7 +997,8 @@
|
|||||||
.bnb-calendar-table th.room-header {
|
.bnb-calendar-table th.room-header {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
min-width: 150px;
|
width: 200px;
|
||||||
|
min-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calendar Day Cell */
|
/* Calendar Day Cell */
|
||||||
@@ -1068,16 +1069,31 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Room Row in Multi-Room Calendar */
|
/* Room Row in Multi-Room Calendar */
|
||||||
.bnb-calendar-room {
|
.bnb-calendar-table .bnb-calendar-room {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
background: #f6f7f7;
|
background: #f6f7f7;
|
||||||
|
min-width: 200px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bnb-calendar-room small {
|
.bnb-calendar-room a {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bnb-calendar-room .room-number {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #646970;
|
color: #646970;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bnb-calendar-room .building-name {
|
||||||
|
display: block;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #646970;
|
||||||
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calendar Legend */
|
/* Calendar Legend */
|
||||||
|
|||||||
@@ -257,15 +257,19 @@ final class Calendar {
|
|||||||
<?php foreach ( $rooms as $room ) : ?>
|
<?php foreach ( $rooms as $room ) : ?>
|
||||||
<?php
|
<?php
|
||||||
$room_number = get_post_meta( $room->ID, '_bnb_room_room_number', true );
|
$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 );
|
$booked_dates = Availability::get_booked_dates( $room->ID, $year, $month );
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bnb-calendar-room">
|
<td class="bnb-calendar-room">
|
||||||
<a href="<?php echo esc_url( get_edit_post_link( $room->ID ) ); ?>">
|
<a href="<?php echo esc_url( get_edit_post_link( $room->ID ) ); ?>">
|
||||||
<?php echo esc_html( $room->post_title ); ?>
|
<?php echo esc_html( $room->post_title ); ?>
|
||||||
</a>
|
|
||||||
<?php if ( $room_number ) : ?>
|
<?php if ( $room_number ) : ?>
|
||||||
<br><small>#<?php echo esc_html( $room_number ); ?></small>
|
<span class="room-number">#<?php echo esc_html( $room_number ); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
</a>
|
||||||
|
<?php if ( $room_building ) : ?>
|
||||||
|
<span class="building-name"><?php echo esc_html( $room_building->post_title ); ?></span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
<?php for ( $day = 1; $day <= $days_in_month; $day++ ) : ?>
|
<?php for ( $day = 1; $day <= $days_in_month; $day++ ) : ?>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: WP BnB Management
|
* Plugin Name: WP BnB Management
|
||||||
* Plugin URI: https://src.bundespruefstelle.ch/magdev/wp-bnb
|
* Plugin URI: https://src.bundespruefstelle.ch/magdev/wp-bnb
|
||||||
* Description: A comprehensive Bed & Breakfast management system for WordPress. Manage buildings, rooms, bookings, and guests.
|
* Description: A comprehensive Bed & Breakfast management system for WordPress. Manage buildings, rooms, bookings, and guests.
|
||||||
* Version: 0.11.1
|
* Version: 0.11.2
|
||||||
* Requires at least: 6.0
|
* Requires at least: 6.0
|
||||||
* Requires PHP: 8.3
|
* Requires PHP: 8.3
|
||||||
* Author: Marco Graetsch
|
* Author: Marco Graetsch
|
||||||
@@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Plugin version constant - MUST match Version in header above.
|
// Plugin version constant - MUST match Version in header above.
|
||||||
define( 'WP_BNB_VERSION', '0.11.1' );
|
define( 'WP_BNB_VERSION', '0.11.2' );
|
||||||
|
|
||||||
// Plugin path constants.
|
// Plugin path constants.
|
||||||
define( 'WP_BNB_PATH', plugin_dir_path( __FILE__ ) );
|
define( 'WP_BNB_PATH', plugin_dir_path( __FILE__ ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user