<commit_before>{% extends "transport/base.html" %}{% load molly_utils %}

{% block content %}

<div class="section">
  <div class="header">
    <h2>Park and Rides</h2>
  </div>
  
  <table class="content">
    <thead>
      <tr>
        <th>Name</th>
        <th>Spaces</th>
        <th>Capacity</th>
        <th>View</th>
      </tr>
    </thead>
    <tbody>
{% for entity in park_and_rides.entities %}
      <tr>
        <td>{{ entity.title|slice:":-14" }}</td>
        <td>{{ entity.metadata.park_and_ride.spaces }}</td>
        <td>{{ entity.metadata.park_and_ride.capacity }}</td>
        <td>
          <div class="button">
            <a href="{{ entity.get_absolute_url }}">View</a>
          </div>
        </td>
      </tr>
{% endfor %}
    </tbody>
  </table>
</div>

<div class="section">
  <div class="header">
    <h2><img src="http://chart.apis.google.com/chart?chst=d_simple_text_icon_left&chld=|14|000|bus|24|000|FFF" />{{ bus_stops.results_type }} bus stops - {% now "G:i:s "%}</h2>
  </div>
  
  <table class="content">
    <tbody>

{% for entity in bus_stops.entities %}
      <tr class="sub-section-divider"><th colspan="3"><a href="{{ entity.get_absolute_url }}" style="color:inherit;">{{ entity.title }}{% ifnotequal bus_stops.results_type "Favourites" %} <small>({{ entity.distance.km|floatformat:3 }} km{{ entity.bearing }})</small>{% endifnotequal %}</a></th></tr>
{% if entity.metadata.real_time_information.services %}
{% for service in entity.metadata.real_time_information.services %}
      <tr>
        <td style="text-align: center;"><big>{{ service.service }}</big></td>
        <td>{{ service.destination }}</td>
        <td>{{ service.next }}{% if service.following %}<small>, {{ service.following.0 }}{% if service.following.1 %}, &hellip;{% endif %}</small>{% endif %}</td>
      </tr>
{% endfor %}
{% else %}
      <tr><td colspan="3">{{ entity.metadata.real_time_information.pip_info }}</td></tr>
{% endif %}
{% empty %}
      <tr><td colspan="3">{% include "geolocation/update_location_embed.html" %}</td></tr>
{% endfor %}
    </tbody>
  </table>
</div>

{% if train_station %}
{% include "places/metadata/ldb.html" %}
{% endif %}

{% if travel_alerts %}

<div class="section">
  <div class="header">
    <h2>Travel alerts</h2>
  </div>
  
  <ul class="content-list">
{% for alert in travel_alerts %}
    <li><a href="{{ alert.get_absolute_url }}" style="color: inherit;">{{ alert.title }}</a></li>
{% endfor %}
  </ul>
</div>

{% endif %}

{% endblock %}
<commit_msg>Don't show distance information on favourite bus stops (as we don't get a GeoQuerySet, it's not easy to attach distances)<commit_after>{% extends "transport/base.html" %}{% load molly_utils %}

{% block content %}

<div class="section">
  <div class="header">
    <h2>Park and Rides</h2>
  </div>
  
  <table class="content">
    <thead>
      <tr>
        <th>Name</th>
        <th>Spaces</th>
        <th>Capacity</th>
        <th>View</th>
      </tr>
    </thead>
    <tbody>
{% for entity in park_and_rides.entities %}
      <tr>
        <td>{{ entity.title|slice:":-14" }}</td>
        <td>{{ entity.metadata.park_and_ride.spaces }}</td>
        <td>{{ entity.metadata.park_and_ride.capacity }}</td>
        <td>
          <div class="button">
            <a href="{{ entity.get_absolute_url }}">View</a>
          </div>
        </td>
      </tr>
{% endfor %}
    </tbody>
  </table>
</div>

<div class="section">
  <div class="header">
    <h2><img src="http://chart.apis.google.com/chart?chst=d_simple_text_icon_left&chld=|14|000|bus|24|000|FFF" />{{ bus_stops.results_type }} bus stops - {% now "G:i:s "%}</h2>
  </div>
  
  <table class="content">
    <tbody>

{% for entity in bus_stops.entities %}
      <tr class="sub-section-divider"><th colspan="3"><a href="{{ entity.get_absolute_url }}" style="color:inherit;">{{ entity.title }}{% ifnotequal bus_stops.results_type "Favourite" %} <small>({{ entity.distance.km|floatformat:3 }} km{{ entity.bearing }})</small>{% endifnotequal %}</a></th></tr>
{% if entity.metadata.real_time_information.services %}
{% for service in entity.metadata.real_time_information.services %}
      <tr>
        <td style="text-align: center;"><big>{{ service.service }}</big></td>
        <td>{{ service.destination }}</td>
        <td>{{ service.next }}{% if service.following %}<small>, {{ service.following.0 }}{% if service.following.1 %}, &hellip;{% endif %}</small>{% endif %}</td>
      </tr>
{% endfor %}
{% else %}
      <tr><td colspan="3">{{ entity.metadata.real_time_information.pip_info }}</td></tr>
{% endif %}
{% empty %}
      <tr><td colspan="3">{% include "geolocation/update_location_embed.html" %}</td></tr>
{% endfor %}
    </tbody>
  </table>
</div>

{% if train_station %}
{% include "places/metadata/ldb.html" %}
{% endif %}

{% if travel_alerts %}

<div class="section">
  <div class="header">
    <h2>Travel alerts</h2>
  </div>
  
  <ul class="content-list">
{% for alert in travel_alerts %}
    <li><a href="{{ alert.get_absolute_url }}" style="color: inherit;">{{ alert.title }}</a></li>
{% endfor %}
  </ul>
</div>

{% endif %}

{% endblock %}

{'fraction_non_alphanumeric': 0.22009756097560976, 'fraction_numerical': 0.009365853658536585, 'mean_word_length': 3.307563025210084, 'pattern_counts': {'":': 2, '<': 177, '<?xml version=': 0, '>': 177, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3220997', 'n_tokens_mistral': 1964, 'n_tokens_neox': 1792, 'n_words': 357}