Skip to content

Commit

Permalink
fix: remove reference to old account toggles (#127)
Browse files Browse the repository at this point in the history
* fix: remove reference to old account toggles

* fix: update legacy urls to mfes

---------

Co-authored-by: Ahmed Khalid <[email protected]>
  • Loading branch information
ahmed-arb and Ahmed Khalid authored Feb 18, 2025
1 parent a1ae597 commit c0e0341
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Remove reference to old account toggles. (by @ahmed-arb)
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<%!
import json
from urllib.parse import urljoin

from django.conf import settings
from django.urls import reverse
from django.utils.translation import gettext as _

from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_image_urls_for_user
from openedx.core.djangoapps.user_api.accounts.toggles import should_redirect_to_order_history_microfrontend
from openedx.features.enterprise_support.utils import get_enterprise_learner_generic_name, get_enterprise_learner_portal
%>

Expand All @@ -23,7 +23,7 @@
enterprise_customer_portal = get_enterprise_learner_portal(request)
## Enterprises with the learner portal enabled should not show order history, as it does
## not apply to the learner's method of purchasing content.
should_show_order_history = should_redirect_to_order_history_microfrontend() and not enterprise_customer_portal
should_show_order_history = not enterprise_customer_portal
%>

<!-- NEW IN INDIGO update user icon -->
Expand All @@ -39,8 +39,8 @@
<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${settings.ENTERPRISE_LEARNER_PORTAL_BASE_URL}/${enterprise_customer_portal.get('slug')}" role="menuitem">${_("Dashboard")}</a></div>
% endif

<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${reverse('learner_profile', kwargs={'username': username})}" role="menuitem">${_("Profile")}</a></div>
<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${reverse('account_settings')}" role="menuitem">${_("Account")}</a></div>
<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${urljoin(settings.PROFILE_MICROFRONTEND_URL, f'{user.username}')}" role="menuitem">${_("Profile")}</a></div>
<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${settings.ACCOUNT_MICROFRONTEND_URL}" role="menuitem">${_("Account")}</a></div>
% if should_show_order_history:
<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${settings.ORDER_HISTORY_MICROFRONTEND_URL}" role="menuitem">${_("Order History")}</a></div>
% endif
Expand Down

0 comments on commit c0e0341

Please sign in to comment.