aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-12-29 14:36:50 +0000
committerMatthew Lemon <y@yulqen.org>2024-12-29 14:36:50 +0000
commit5b62ccbc106781751872475fb49a320a77281f8d (patch)
treef243267b29997dba19f8564850d9fb0df58dbb2e
parent44ee395693980cd33413a10287bb4189afbbc74d (diff)
wip: Adds the shopping cart link if user logged in
- basic text-only link visible if user logged in - can still click the link and get an empty card - this needs to be removed
-rw-r--r--alphabetlearning/templates/base.html24
1 files changed, 12 insertions, 12 deletions
diff --git a/alphabetlearning/templates/base.html b/alphabetlearning/templates/base.html
index c969cac..ecab232 100644
--- a/alphabetlearning/templates/base.html
+++ b/alphabetlearning/templates/base.html
@@ -81,18 +81,6 @@
<ul class="navbar-nav ms-auto">
<li class="nav-item">
- <!-- <div class="d-flex align-items-end mx-1 p-1 px-3 text-white rounded rounded-sm bg-primary"> -->
- <!-- <div> -->
- <!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-2" width="32" height="32"> -->
- <!-- <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" /> -->
- <!-- </svg> -->
- <!-- </div> -->
- <!-- <div class="fw-bold"> -->
- <!-- Cart -->
- <!-- </div> -->
- <!-- </div> -->
- </li>
- <li class="nav-item">
<a class="nav-link text-dark fw-bold"
href="https://www.tes.com/teaching-resources/shop/alphabetlearning"
target="_blank">TES Shop</a>
@@ -105,6 +93,18 @@
<a class="nav-link text-dark fw-bold" href="https://blog.joannalemon.com/blog"
target="_blank">Blog</a>
</li>
+ {% if request.user.is_authenticated %}
+ <li class="nav-item">
+ <a class="nav-link text-dark fw-bold"
+ href="{% url "payments:cart_detail" %}">Your Basket</a>
+ </li>
+ {% else %}
+ <li class="nav-item">
+ <p class="nav-link text-gray fw-bold">
+ Your Basket
+ </p>
+ </li>
+ {% endif %}
</ul>
</div>
</div>