2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 13:57:45 +00:00

tidied tables of stations and entrances

This commit is contained in:
2023-11-02 19:24:07 +02:00
parent c95e6e8097
commit 685131a4c1
3 changed files with 29 additions and 58 deletions

View File

@@ -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"<span style='color:{colour}; font-weight:{weight}'>{diff:.0f}</span>"
diff_str = f"<span style='color:{colour}; font-weight:{weight}'>{sign}{diff:.0f}</span>"
return diff_str, ref