From 4ce63b1f650ad34709fd60ae3cd708d39ccac6be Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 16 Jul 2022 00:08:07 +0200 Subject: add anchors where possible --- bin/nvm | 6 ++++++ templates/departure_list.html | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/nvm b/bin/nvm index 61be2a5..86d491c 100755 --- a/bin/nvm +++ b/bin/nvm @@ -428,6 +428,12 @@ class Line: self.name = self.name[3:] self.css_class = "bus" + self.productName = obj.get("productName", 0) + if "fahrtNr" in obj: + self.fahrtNr = int(self.fahrtNr) + else: + self.fahrtNr = None + def __repr__(self): return self.name diff --git a/templates/departure_list.html b/templates/departure_list.html index dee05b5..090e47c 100644 --- a/templates/departure_list.html +++ b/templates/departure_list.html @@ -1,5 +1,9 @@ {% for departure in departures %} -
  • + {% if departure.line.productName and departure.line.fahrtNr %} +
  • + {% else %} +
  • + {% endif %} {{ departure.line.name }} {% if departure.direction_area %} -- cgit v1.2.3