Add quick logbook and location switcher to main logbook view #3342
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements UI design ideas from issue #3217 for quickly switching between logbooks and locations without navigating away from the main logbook view.
Changes Made
New Functionality
switch_logbook_location()
handles both logbook and location changes in a single operationTechnical Implementation
Controller Changes:
application/controllers/Logbooks.php
: Addedswitch_logbook_location()
method to handle POST requestsapplication/controllers/Logbook.php
: Modifiedindex()
to pass available logbooks and stations to the viewView Changes:
application/views/view_log/index.php
: Enhanced info bar with responsive dropdown selectors and integrated JavaScriptJavaScript Enhancement:
User Experience
Before: Users had to navigate to separate logbook management or station pages to switch active logbook or location, interrupting their workflow.
After: Users can quickly switch logbooks and/or locations directly from the main logbook view using dropdown selectors, with immediate visual feedback.
Screenshots
The implementation includes three demonstration screenshots showing:
Backward Compatibility
All existing functionality remains unchanged. The new UI elements are additive and follow Cloudlog's existing Bootstrap styling patterns. Users who don't use multiple logbooks or locations will see the selectors but they won't interfere with normal operation.
Testing
Closes #3217
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.