Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 14, 2025

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

  • Quick Switcher UI: Added dropdown selectors for logbooks and locations directly in the main logbook view's info bar
  • Combined Switching: New controller method switch_logbook_location() handles both logbook and location changes in a single operation
  • Smart Button State: Change button is only enabled when selections differ from current active items
  • User Feedback: Flash messages confirm which items were switched

Technical Implementation

Controller Changes:

  • application/controllers/Logbooks.php: Added switch_logbook_location() method to handle POST requests
  • application/controllers/Logbook.php: Modified index() to pass available logbooks and stations to the view

View Changes:

  • application/views/view_log/index.php: Enhanced info bar with responsive dropdown selectors and integrated JavaScript

JavaScript Enhancement:

  • Real-time button state management based on selection changes
  • Stores original values to detect changes
  • Disabled state when no changes are made

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:

  1. Initial state with current logbook/location displayed
  2. Button activation when logbook selection changes
  3. Both dropdowns changed with active change button

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

  • Syntax validation passed for all modified PHP files
  • Interactive UI testing confirms proper dropdown behavior and button state management
  • Implementation follows existing Cloudlog patterns for session management and redirects

Closes #3217

This pull request was created as a result of the following prompt from Copilot chat.

Implement UI design ideas from issue #3217 for quickly switching between logbooks and locations.

Currently, to change the active logbook or station location, users need to navigate to a separate page, which is inconvenient for operators who frequently change between different locations and logbooks during their activities.

This PR implements Idea 1 from issue #3217 by adding:

  1. Dropdown selectors for logbooks and locations on the main logbook view page
  2. A "Change" button to apply the selections
  3. JavaScript functionality to handle the switching

The implementation will be added to the view_log/index.php page as this is the main logbook view page. A new controller method will be added to handle both logbook and location switching in one operation.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Implement quick logbook and location switching feature Add quick logbook and location switcher to main logbook view Sep 14, 2025
@Copilot Copilot AI requested a review from magicbug September 14, 2025 16:30
Copilot finished work on behalf of magicbug September 14, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.