refactor: remove old button navigation and integrate into dropdown menu
- Removed old button navigation from master dashboard - Added Google Sheets to Tools dropdown menu - Added Account dropdown with Trainer Dashboard and Logout options - Ensured all navigation links are properly integrated in the menu system - Master dashboard now uses consistent navigation with all other pages
This commit is contained in:
parent
bc2a7191e7
commit
ea54d476bb
2 changed files with 30 additions and 11 deletions
|
|
@ -155,6 +155,12 @@ class HVAC_Master_Menu_System {
|
||||||
'icon' => 'dashicons-admin-tools',
|
'icon' => 'dashicons-admin-tools',
|
||||||
'cap' => 'manage_communication_templates',
|
'cap' => 'manage_communication_templates',
|
||||||
'children' => array(
|
'children' => array(
|
||||||
|
array(
|
||||||
|
'title' => esc_html__('Google Sheets', 'hvac-community-events'),
|
||||||
|
'url' => home_url('/master-trainer/google-sheets/'),
|
||||||
|
'icon' => 'dashicons-media-spreadsheet',
|
||||||
|
'cap' => 'manage_google_sheets_integration'
|
||||||
|
),
|
||||||
array(
|
array(
|
||||||
'title' => esc_html__('Communication Templates', 'hvac-community-events'),
|
'title' => esc_html__('Communication Templates', 'hvac-community-events'),
|
||||||
'url' => home_url('/master-trainer/communication-templates/'),
|
'url' => home_url('/master-trainer/communication-templates/'),
|
||||||
|
|
@ -176,6 +182,29 @@ class HVAC_Master_Menu_System {
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
|
// Account - User options
|
||||||
|
array(
|
||||||
|
'title' => esc_html__('Account', 'hvac-community-events'),
|
||||||
|
'url' => '#',
|
||||||
|
'icon' => 'dashicons-admin-users',
|
||||||
|
'cap' => 'read',
|
||||||
|
'children' => array(
|
||||||
|
array(
|
||||||
|
'title' => esc_html__('Trainer Dashboard', 'hvac-community-events'),
|
||||||
|
'url' => home_url('/trainer/dashboard/'),
|
||||||
|
'icon' => 'dashicons-dashboard',
|
||||||
|
'cap' => 'read'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'title' => esc_html__('Logout', 'hvac-community-events'),
|
||||||
|
'url' => wp_logout_url(home_url('/training-login/')),
|
||||||
|
'icon' => 'dashicons-exit',
|
||||||
|
'cap' => 'read',
|
||||||
|
'class' => 'menu-item-logout'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
// Help - Documentation
|
// Help - Documentation
|
||||||
array(
|
array(
|
||||||
'title' => esc_html__('Help', 'hvac-community-events'),
|
'title' => esc_html__('Help', 'hvac-community-events'),
|
||||||
|
|
|
||||||
|
|
@ -220,19 +220,9 @@ if ( isset( $_GET['error'] ) && $_GET['error'] === 'access_denied' ) {
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- Dashboard Header & Navigation -->
|
<!-- Dashboard Header -->
|
||||||
<div class="hvac-dashboard-header">
|
<div class="hvac-dashboard-header">
|
||||||
<h1 class="entry-title">Master Dashboard</h1>
|
<h1 class="entry-title">Master Dashboard</h1>
|
||||||
<div class="hvac-dashboard-nav">
|
|
||||||
<?php if (current_user_can('manage_google_sheets_integration')): ?>
|
|
||||||
<a href="<?php echo home_url('/master-trainer/google-sheets/'); ?>" class="ast-button ast-button-primary">Google Sheets</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (current_user_can('manage_communication_templates')): ?>
|
|
||||||
<a href="<?php echo home_url('/trainer/communication-templates/'); ?>" class="ast-button ast-button-primary">Templates</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<a href="<?php echo home_url('/trainer/dashboard/'); ?>" class="ast-button ast-button-secondary">Trainer Dashboard</a>
|
|
||||||
<a href="<?php echo esc_url( wp_logout_url( home_url( '/training-login/' ) ) ); ?>" class="ast-button ast-button-secondary">Logout</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- System Overview Statistics -->
|
<!-- System Overview Statistics -->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue