From c3a70b079dd153df1d1248b6e9d68bf5297c6fcb Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 4 Jan 2026 12:40:56 +0000 Subject: [PATCH] Refactor HTML structure for user marking templates to improve readability and maintainability --- .../partials/user_marking_exam_list.html | 28 ++--- templates/index.html | 2 +- templates/rad/user_marking.html | 100 +++++++++--------- 3 files changed, 65 insertions(+), 65 deletions(-) diff --git a/templates/generic/partials/user_marking_exam_list.html b/templates/generic/partials/user_marking_exam_list.html index c8c7329f..5465eca8 100644 --- a/templates/generic/partials/user_marking_exam_list.html +++ b/templates/generic/partials/user_marking_exam_list.html @@ -3,20 +3,20 @@ diff --git a/templates/index.html b/templates/index.html index 8f6eba28..c8032bed 100644 --- a/templates/index.html +++ b/templates/index.html @@ -91,7 +91,7 @@
Quick links
-
    +
    • RTS platform
    • {% if request.user.is_authenticated %}
    • Marking overview
    • diff --git a/templates/rad/user_marking.html b/templates/rad/user_marking.html index 82875cd7..9c4bee43 100644 --- a/templates/rad/user_marking.html +++ b/templates/rad/user_marking.html @@ -1,65 +1,65 @@ {% extends "base.html" %} {% block content %} -

      Marking: Exams you can mark

      +

      Marking: Exams you can mark

      - + -
      -
      -

      Click an exam type to load exams — each section loads independently.

      +
      +
      +

      Click an exam type to load exams — each section loads independently.

      +
      -
      -
      - {% for app in apps %} -
      -
      -
      -
      {{ app|capfirst }}
      -
      - -
      Loading...
      +
      + {% for app in apps %} +
      +
      +
      +
      {{ app|capfirst }}
      +
      + +
      Loading...
      +
      +
      +
      +
      No data loaded — click the button to load.
      -
      -
      No data loaded — click the button to load.
      -
      -
      - {% endfor %} -
      + {% endfor %} +
      - + document.body.addEventListener('htmx:afterRequest', function(evt){ + try{ + var elt = evt.detail.elt || evt.target; + var sel = elt && elt.getAttribute && elt.getAttribute('hx-indicator'); + if(sel){ + var indicator = document.querySelector(sel); + if(indicator) indicator.classList.remove('visible'); + } + }catch(e){console.warn(e)} + }); + - + {% endblock %}