diff options
-rwxr-xr-x | bin/nvm | 6 | ||||
-rw-r--r-- | templates/departure_list.html | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -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 %} - <li class="{{ departure.classes }}" data-timestamp="{{ departure.sort_by }}"> + {% if departure.line.productName and departure.line.fahrtNr %} + <li class="{{ departure.classes }}" data-timestamp="{{ departure.sort_by }}" id="{{departure.line.productName}}{{departure.line.fahrtNr}}"> + {% else %} + <li class="{{ departure.classes }}" data-timestamp="{{ departure.sort_by }}"> + {% endif %} <a href="/trip/{{ departure.tripId }}?line={{ departure.quoted_line_name }}&highlight={{ departure.quoted_stop_name }}&platform={{ departure.quoted_platform() }}"> <span class="line {{ departure.line.css_class }}">{{ departure.line.name }}</span> {% if departure.direction_area %} |