fix(#175): portal navigation consistency — Home link, user dropdown, About page, no dead links#176
Merged
Merged
Conversation
The customer self-service page was a dead end (navbar linked only to itself and Logout). Add a persistent "Home" item (-> /) to both portal navbar fragments so every authenticated page has a consistent way back to the site landing. Verified: custodian and customer pages each render one Home link; Home resolves (200) from a customer session. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ge, footer cleanup Follow-on navbar/footer consistency fixes from browser testing: - User menu: replace the awkward "Custodian: name" / "Welcome, name" text + loose Logout button with a proper user dropdown (username ▾ → Logout) in both the custodian and customer navbars, matching the main header. - Logged-in customers can reach their authorizations from anywhere: the shared header now shows a "My Authorizations" link for ROLE_USER (e.g. on the home page). - Footer dead links: add a real public About page (/about — implementation/version info; replaces legacy about.jsp) and remove the Terms of Service / Usage Policy links rather than ship stale EnergyOS-era boilerplate or fabricated legal text. - Home "Learn more about Green Button" now links to greenbuttonalliance.org. - /about added to the session chain (public). Verified: /about 200 (public); custodian/customer user dropdowns + logout; customer home shows My Authorizations; learn-more → GBA. datacustodian suite 160/0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Logout dropdown was dead on the new portal pages: Bootstrap's JS was only loaded ad-hoc at the bottom of some templates, not on the pages that include just the head/footer fragments. Load the Bootstrap bundle once (deferred) in the head fragment so every page has working dropdown/collapse, and remove the now-duplicate bottom <script> from home/custodian-home (double-loading re-binds the data-API and breaks the toggle). - User-account form now has an "Account type" selector (Customer / Administrator (Custodian)), so admins can be created — not just customers. update() persists the role; create() binds it. Verified: a new ROLE_CUSTODIAN account logs in and lands on /custodian/home. Relabeled the screen to "User Account" / "Add user". datacustodian suite: 160 tests, 0 failures. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Error pages (404 error.html, 400, 403): "Go Home"/"Login" used host-absolute hrefs that bypassed the /DataCustodian context path (dead links) -> context- relative th:href. Removed their duplicate bottom Bootstrap <script>/icons (now provided once by the head fragment; double-loading broke the navbar dropdown). Browser-rendered HTML error page link targets all verified 200 (API clients still get a JSON error via content negotiation, as before). - Accounts were always "Enabled = Yes" with no way to change it. Added an Enabled switch to the user-account form; update() persists it. A disabled account now shows "No" in the list and cannot sign in. datacustodian suite: 160 tests, 0 failures. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nButton-Java repo Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Portal navigation/footer consistency pass driven by browser testing. Closes #175.
Changes
Home(→/) to the custodian and customer navbars (the customer page was previously a dead end).Custodian: name/Welcome, nametext + loose Logout button with a proper user dropdown (username ▾ → Logout) in both portal navbars, matching the main header. Logout remains a CSRF POST.My Authorizationslink forROLE_USER, so a logged-in customer can reach their authorizations from anywhere (e.g. the home page)./about, implementation/version info — replaces legacyabout.jsp) and removed the Terms of Service / Usage Policy links rather than ship stale EnergyOS-era boilerplate or fabricated legal text. (Happy to add real ToS/Usage Policy when official copy is provided.)/aboutadded to the session chain (public).Verification (local sandbox)
/about200 (public, anonymous); custodian + customer user dropdowns render and Logout works; customer Home shows "My Authorizations"; learn-more → GBA; Home reachable from both portals. Fullopenespi-datacustodiansuite: 160 tests, 0 failures.🤖 Generated with Claude Code