ups, forgot to add templates
This commit is contained in:
parent
53669913e9
commit
7e4dd89b4a
33
chaloBEST/templates/area.html
Normal file
33
chaloBEST/templates/area.html
Normal 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 %}
|
36
chaloBEST/templates/areas.html
Normal file
36
chaloBEST/templates/areas.html
Normal 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 %}
|
Loading…
Reference in New Issue
Block a user