ups, forgot to add templates

This commit is contained in:
Sanj 2012-02-16 19:11:28 +05:30
parent 53669913e9
commit 7e4dd89b4a
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,33 @@
{% extends 'base.html' %}
{% block title %} Area: {{ area.name }} {% endblock %}
{% block head %}
<style type="text/css">
.has_point {
color: #0f0;
}
.no_point {
color: #f00;
}
a:hover {
color: #00f;
}
</style>
{% endblock %}
{% block body %}
<ul id="stopList">
{% for s in stops %}
<li>
<a href="{{ s.get_absolute_url }}" class="{% if s.point %} has_point {% else %} no_point {% endif %}">{{ s.name }}</a>
</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -0,0 +1,36 @@
{% extends 'base.html' %}
{% block title %}
Areas
{% endblock %}
{% block head %}
<script type="text/javascript">
$(function() {
$('#searchRoutes').change(function() {
var val = $(this).val().toLowerCase();
$('.area').each(function() {
var txt = $(this).text().toLowerCase();
if (txt.indexOf(val) != -1) {
$(this).show();
} else {
$(this).hide();
}
});
});
});
</script>
{% endblock %}
{% block body %}
Filter: <input id="searchRoutes" />
<ul id="routesList">
{% for a in areas %}
<li class="route">
<a href="{{ a.get_absolute_url }}" title="view stops for route">{{ a.name }}</a>
</li>
{% endfor %}
</ul>
{% endblock %}