From 685131a4c16578d6370cdd8db37f8b0cc4d7fa1f Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 2 Nov 2023 19:24:07 +0200 Subject: [PATCH] tidied tables of stations and entrances --- core/models/survex.py | 4 +- templates/entranceindex.html | 6 ++- templates/stations.html | 77 +++++++++++------------------------- 3 files changed, 29 insertions(+), 58 deletions(-) diff --git a/core/models/survex.py b/core/models/survex.py index 4c2c109..8999810 100644 --- a/core/models/survex.py +++ b/core/models/survex.py @@ -86,14 +86,16 @@ class SurvexStation(models.Model): diff = alt - self.z if diff >= 0: colour = "blue" + sign = "+" else: colour = "red" + sign = "" if abs(diff) > 60: weight = "bold" else: weight = "normal" - diff_str = f"{diff:.0f}" + diff_str = f"{sign}{diff:.0f}" return diff_str, ref diff --git a/templates/entranceindex.html b/templates/entranceindex.html index 115c33b..6c26c9d 100644 --- a/templates/entranceindex.html +++ b/templates/entranceindex.html @@ -16,10 +16,12 @@