From d163ce328c03b92ad74fc133ece659796e34d11f Mon Sep 17 00:00:00 2001 From: bengizmo Date: Fri, 30 May 2025 16:26:27 -0600 Subject: [PATCH] feat: Add navigation bar to Create Event page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added consistent navigation header matching other HVAC pages - Navigation includes Dashboard, Generate Certificates, Certificate Reports, Profile, Help, and Logout links - Added comprehensive styling for TEC Community Events form elements - Enhanced form styling includes improved input fields, buttons, date pickers, and venue sections - Integrated tooltips using HVAC_Help_System when available - Maintained error handling for when TEC Community Events is unavailable - Form now has professional appearance matching the overall system design The Create Event page now has the same navigation experience as other pages in the system. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../includes/class-hvac-manage-event.php | 192 +++++++++++++++++- 1 file changed, 190 insertions(+), 2 deletions(-) diff --git a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php index ef41725a..872000dc 100644 --- a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php +++ b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php @@ -53,13 +53,16 @@ class HVAC_Manage_Event { HVAC_Logger::info('Content was processed by do_shortcode', 'ManageEvent'); } + // Add navigation bar to the content + $navigation_html = $this->get_navigation_bar(); + // If shortcode wasn't processed (plugin might be inactive), show helpful message if (strpos($processed_content, '[tribe_community_events') !== false) { if (class_exists('HVAC_Logger')) { HVAC_Logger::warning('tribe_community_events shortcode not processed - plugin may be inactive', 'ManageEvent'); } - $processed_content = '
+ $error_content = '

Event Submission Form Unavailable

The event submission form is currently unavailable. Please ensure:

    @@ -82,9 +85,194 @@ class HVAC_Manage_Event { margin: 15px 0 15px 30px; } '; + + return $navigation_html . $error_content; } - return $processed_content; + // Wrap the form content with navigation and styling + $final_content = $navigation_html . ' +
    + ' . $processed_content . ' +
    + + '; + + return $final_content; + } + + /** + * Generate the navigation bar HTML + */ + private function get_navigation_bar() { + // Check if Help System is available for tooltips + $help_available = class_exists('HVAC_Help_System'); + + $nav_html = ' +
    +

    Create Event

    +
    '; + + // Dashboard link + if ($help_available) { + $nav_html .= HVAC_Help_System::add_tooltip( + 'Dashboard', + 'Return to your main dashboard to view stats and manage events' + ); + } else { + $nav_html .= 'Dashboard'; + } + + // Generate Certificates link + if ($help_available) { + $nav_html .= HVAC_Help_System::add_tooltip( + 'Generate Certificates', + 'Create professional certificates for attendees who completed your training' + ); + } else { + $nav_html .= 'Generate Certificates'; + } + + // Certificate Reports link + if ($help_available) { + $nav_html .= HVAC_Help_System::add_tooltip( + 'Certificate Reports', + 'View and manage all certificates you\'ve issued to attendees' + ); + } else { + $nav_html .= 'Certificate Reports'; + } + + // Trainer Profile link + if ($help_available) { + $nav_html .= HVAC_Help_System::add_tooltip( + 'View Profile', + 'Update your professional credentials, business information, and training specialties' + ); + } else { + $nav_html .= 'View Profile'; + } + + // Help and Logout links + $nav_html .= ' + Help + Logout +
    +
    '; + + return $nav_html; } /**