<commit_before>{% extends 'gogogo/transit/base.html' %}
{% load i18n%}
{% block content %}

<div id="agency_info" class="span-6 {% ifequal showMap 'False' %}last{%endifequal%}">
<table>
    <tr>
        <td>{%trans "Name"%}: </td>
        <td>{{agency.name}}</td>
    </tr>
    <tr>
    	<td>{%trans "Icon"%}: </td>
    	<td><img src='{{MEDIA_URL}}{{agency.icon|default:"global/agency/icons/bus.png" }}'></td>
    </tr>
	<tr>
		<td>{%trans "URL"%}:</td>
    	<td><a href="{{agency.url}}">{{agency.url}}</a></td>  
	</tr>
    
    <tr>
    	<td>{%trans "Phone"%}:</td>
    	<td> {{agency.phone}}</td>
    </tr>   
    <tr><td colspan="2" align="right">
    <ul class="object-tools" >
    	<li><a href="{%url gogogo.views.db.report.submit object_type,agency.key_name%}" >Report</a></li>
    <li><a href="{% url gogogo.views.db.edit object_type,agency.key_name%}" >Edit</a>
    </ul>
    </td></tr>
</table>


<p></p>
{% if railway_list|length %}

<table>
	<th>Railway</th>
{% for railway in railway_list %}
    <tr>
        <td><a href="{%url gogogo.views.transit.route agency.key_name railway.key_name %}">{{railway.long_name}}</a>
        </td>
    </tr>
{% endfor %}

</table>

{%endif%}
</div><!-- End of agency_info -->

{% if showMap %}

<div class="span-18 last" >
	<script type="text/javascript">
		var map;
		var stopManager;
		
		$(document).ready(function(){
			
			height = $('#agency_info').height();
		
			$('#map').height(Math.max(height,400));
			
			map = new GMap2(document.getElementById("map"));
			gogogo.mapSetup(map);
			stopManager = new gogogo.StopManager(map);
			
			var trip_id_list = "{{ trip_id_list|join:"," }}";
			trip_id_list = trip_id_list.split(",");
			
            for (var i in trip_id_list){
            	var trip = new gogogo.Trip(trip_id_list[i]);

				$(trip).one("stopObjectListComplete",function (e){
					var line = e.target.createPolyline();
					map.addOverlay(line);
				});
				
            	trip.query(function(trip){
					trip.queryStops(stopManager);
				});
			}
		});
	</script>
	<div id="map" style="width:100%;height:100%"></div>
</div>

{% endif %}


{% endblock %}
<commit_msg>Show a color block at the left of each route<commit_after>{% extends 'gogogo/transit/base.html' %}
{% load i18n%}
{% block content %}

<div id="agency_info" class="span-6 {% ifequal showMap 'False' %}last{%endifequal%}">
<table>
    <tr>
        <td>{%trans "Name"%}: </td>
        <td>{{agency.name}}</td>
    </tr>
    <tr>
    	<td>{%trans "Icon"%}: </td>
    	<td><img src='{{MEDIA_URL}}{{agency.icon|default:"global/agency/icons/bus.png" }}'></td>
    </tr>
	<tr>
		<td>{%trans "URL"%}:</td>
    	<td><a href="{{agency.url}}">{{agency.url}}</a></td>  
	</tr>
    
    <tr>
    	<td>{%trans "Phone"%}:</td>
    	<td> {{agency.phone}}</td>
    </tr>   
    <tr><td colspan="2" align="right">
    <ul class="object-tools" >
    	<li><a href="{%url gogogo.views.db.report.submit object_type,agency.key_name%}" >Report</a></li>
    <li><a href="{% url gogogo.views.db.edit object_type,agency.key_name%}" >Edit</a>
    </ul>
    </td></tr>
</table>


<p></p>
{% if railway_list|length %}

<h4>Railway</h4>

{% for railway in railway_list %}
    <div style="margin-bottom: 5px">
    	<div style="float: left; width:5em; margin-right:1em;background-color: {{railway.color}}">&nbsp;</div>
        <a href="{%url gogogo.views.transit.route agency.key_name railway.key_name %}">{{railway.long_name}}</a>
	</div>
    
{% endfor %}



{%endif%}
</div><!-- End of agency_info -->

{% if showMap %}

<div class="span-18 last" >
	<script type="text/javascript">
		var map;
		var stopManager;
		
		$(document).ready(function(){
			
			height = $('#agency_info').height();
		
			$('#map').height(Math.max(height,400));
			
			map = new GMap2(document.getElementById("map"));
			gogogo.mapSetup(map);
			stopManager = new gogogo.StopManager(map);
			
			var trip_id_list = "{{ trip_id_list|join:"," }}";
			trip_id_list = trip_id_list.split(",");
			
            for (var i in trip_id_list){
            	var trip = new gogogo.Trip(trip_id_list[i]);

				$(trip).one("stopObjectListComplete",function (e){
					var line = e.target.createPolyline();
					map.addOverlay(line);
				});
				
            	trip.query(function(trip){
					trip.queryStops(stopManager);
				});
			}
		});
	</script>
	<div id="map" style="width:100%;height:100%"></div>
</div>

{% endif %}


{% endblock %}

{'fraction_non_alphanumeric': 0.2282016348773842, 'fraction_numerical': 0.008401453224341507, 'mean_word_length': 3.1872623574144487, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 127, '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': '6949655', 'n_tokens_mistral': 1908, 'n_tokens_neox': 1673, 'n_words': 286}