From a6a5a0ef97efd5eabdc65a7f78adb670b0350269 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 21 Oct 2024 21:25:22 +0100 Subject: wip: still working on the resource index page --- alphabetlearning/templates/base.html | 5 ---- .../templates/resources/admin_bar.html | 29 ++++++---------------- .../templates/resources/resource_list.html | 6 ++--- 3 files changed, 10 insertions(+), 30 deletions(-) (limited to 'alphabetlearning/templates') diff --git a/alphabetlearning/templates/base.html b/alphabetlearning/templates/base.html index a0b2424..def801e 100644 --- a/alphabetlearning/templates/base.html +++ b/alphabetlearning/templates/base.html @@ -61,12 +61,10 @@ {% endif %}
  • - {% if request.user.shoppingcart %} -
    Items in cart ( @@ -77,18 +75,15 @@ -
    {% else %} -
    -
    {% endif %}
  • diff --git a/alphabetlearning/templates/resources/admin_bar.html b/alphabetlearning/templates/resources/admin_bar.html index be49e65..6d7b4b6 100644 --- a/alphabetlearning/templates/resources/admin_bar.html +++ b/alphabetlearning/templates/resources/admin_bar.html @@ -1,21 +1,8 @@ - {# admin block #} - {% if request.user.is_authenticated and request.user.is_staff %} -
    -
    Admin bar
    -

    - Only you will see this bar - normal users will not see it. It allows us to - include buttons for adding new resources, etc. -

    -
    - Add a new resource -
    - Logged in as - {{ request.user.email }} -
    -
    - {% csrf_token %} - -
    -
    -
    - {% endif %} +{# admin block #} +{% if request.user.is_authenticated and request.user.is_staff %} +

    Admin

    +

    (this is not visible to customers!)

    +
    + Add a new resource +
    +{% endif %} diff --git a/alphabetlearning/templates/resources/resource_list.html b/alphabetlearning/templates/resources/resource_list.html index bb32d90..a6e2a5d 100644 --- a/alphabetlearning/templates/resources/resource_list.html +++ b/alphabetlearning/templates/resources/resource_list.html @@ -6,7 +6,7 @@ Alphabet Learning - Resource List {% endblock title %} {% block content %}
    -
    +
    {% include "resources/admin_bar.html" %}
    @@ -35,9 +35,7 @@ Alphabet Learning - Resource List {# standard resources #}
    -
    -

    Standard resources

    -
    +

    Standard resources

    -- cgit v1.2.3