Remove shoppingcart references from templates.
This commit is contained in:
@@ -1471,25 +1471,6 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin):
|
||||
}
|
||||
)
|
||||
|
||||
def test_shopping_cart_navigation_link(self):
|
||||
"""
|
||||
Tests shopping cart link is available in navigation header.
|
||||
"""
|
||||
CourseEnrollment.enroll(self.user, self.course_key)
|
||||
self.add_course_to_user_cart(self.testing_course.id)
|
||||
resp = self.client.get(reverse('courseware', kwargs={'course_id': text_type(self.course.id)}))
|
||||
self.assertContains(resp, '<a class="shopping-cart"')
|
||||
|
||||
def test_shopping_cart_navigation_link_and_not_on_courseware(self):
|
||||
"""
|
||||
Tests shopping cart link is available in navigation header
|
||||
and requested page is not courseware too.
|
||||
"""
|
||||
CourseEnrollment.enroll(self.user, self.course_key)
|
||||
self.add_course_to_user_cart(self.testing_course.id)
|
||||
resp = self.client.get(reverse('dashboard'))
|
||||
self.assertContains(resp, '<a class="shopping-cart"')
|
||||
|
||||
|
||||
class ReceiptRedirectTest(SharedModuleStoreTestCase):
|
||||
"""Test special-case redirect from the receipt page. """
|
||||
|
||||
@@ -60,13 +60,6 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
|
||||
% endif
|
||||
</div>
|
||||
<div class="secondary">
|
||||
% if should_display_shopping_cart_func() and not (course and static.is_request_in_themed_site()): # see shoppingcart.context_processor.user_has_cart_context_processor
|
||||
<div class="mobile-nav-item hidden-mobile nav-item">
|
||||
<a class="shopping-cart" href="${reverse('shoppingcart.views.show_cart')}">
|
||||
<span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
|
||||
</a>
|
||||
</div>
|
||||
% endif
|
||||
<div class="mobile-nav-item hidden-mobile nav-item">
|
||||
<a class="help-link" href="${help_link}" rel="noopener" target="_blank">${_("Help")}</a>
|
||||
</div>
|
||||
|
||||
@@ -57,12 +57,6 @@ from django.utils.translation import ugettext as _
|
||||
</ul>
|
||||
|
||||
<ul class="navbar-nav navbar-right">
|
||||
% if should_display_shopping_cart_func() and not (course and static.is_request_in_themed_site()): # see shoppingcart.context_processor.user_has_cart_context_processor
|
||||
<a role="button" class="nav-item-open-collapsed btn-shopping-cart btn" href="${reverse('shoppingcart.views.show_cart')}">
|
||||
<span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
|
||||
</a>
|
||||
% endif
|
||||
|
||||
<li class="nav-item mt-2 nav-item-open-collapsed">
|
||||
<a href="${get_online_help_info(online_help_token)['doc_url']}"
|
||||
rel="noopener"
|
||||
|
||||
@@ -45,13 +45,3 @@ from django.utils.translation import ugettext as _
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
class="doc-link">${_("Help")}</a>
|
||||
|
||||
% if should_display_shopping_cart_func() and not (course and static.is_request_in_themed_site()): # see shoppingcart.context_processor.user_has_cart_context_processor
|
||||
<ol class="user">
|
||||
<li class="primary">
|
||||
<a class="shopping-cart" href="${reverse('shoppingcart.views.show_cart')}">
|
||||
<span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
% endif
|
||||
|
||||
@@ -58,13 +58,6 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
|
||||
|
||||
</div>
|
||||
<div class="secondary">
|
||||
% if should_display_shopping_cart_func() and not (course and static.is_request_in_themed_site()): # see shoppingcart.context_processor.user_has_cart_context_processor
|
||||
<div class="mobile-nav-item hidden-mobile nav-item">
|
||||
<a class="shopping-cart" href="${reverse('shoppingcart.views.show_cart')}">
|
||||
<span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
|
||||
</a>
|
||||
</div>
|
||||
% endif
|
||||
<div class="mobile-nav-item hidden-mobile nav-item">
|
||||
% if online_help_token == "instructor":
|
||||
<a class="help-link" href="${get_online_help_info(online_help_token)['doc_url']}" rel="noopener" target="_blank">${_("Help")}</a>
|
||||
|
||||
Reference in New Issue
Block a user