--- /dev/null
+{% load telemeta_utils %}
+
+var countries = [ {% for country in countries %}
+ ['{{country.0|escapejs}}', '{{country.1|escapejs}}']{% if not forloop.last %},{% endif %} {%endfor%}
+];
+
+function get_countries(continent)
+{
+ res = [];
+ for (var i = 0; i < countries.length; i++)
+ if ((continent == '') || (countries[i][0] == continent))
+ res.push(countries[i][1]);
+ return res;
+}
+
+function update_countries(continent, countries)
+{
+ var list = get_countries(continent.value);
+ countries.options.length = list.length + 1;
+ countries.options[0] = new Option('All countries', '');
+ for (var i = 0; i < list.length; i++) {
+ countries.options[i+1] = new Option(list[i], list[i]);
+ }
+}
+
--- /dev/null
+{% extends "base.html" %}
+{% load telemeta_utils %}
+
+{% block extra_javascript %}
+<script src="{% url telemeta-continents-js "swfobject.js" %}" type="text/javascript"></script>
+{% endblock %}
+
+{% block content %}
+<h3>Advanced search</h3>
+
+<form action="{% url telemeta-search %}">
+
+<p>
+<label for="continent">Continent:</label>
+<select id="continent" name="continent" onchange="update_countries(this, document.getElementById('country'));">
+ <option value="">All continents</option>
+{% for continent in continents %}
+ <option value="{{continent|escape}}">{{continent|escape}}</option>
+{% endfor %}
+</select>
+</p>
+
+<p>
+<label for="country">Country:</label>
+<select name="country" id="country">
+ <option value="">All countries</option>
+{% for country in countries %}
+ <option value="{{country.1|escape}}">{{country.1|escape}}</option>
+{% endfor %}
+</select>
+</p>
+
+<p>
+<label for="ethnic_group">Ethnic group:</label>
+<select id="ethnic_group" name="ethnic_group">
+ <option value="">All ethnic groups</option>
+{% for group in ethnic_groups %}
+ <option value="{{group|escape}}">{{group|escape}}</option>
+{% endfor %}
+</select>
+</p>
+
+<p>
+<label for="creator">Creator:</label>
+<input id="creator" name="creator" />
+</p>
+
+<p>
+<label for="title">Title:</label>
+<input id="title" name="title" />
+</p>
+
+<p>
+<label for="rec_date">Recording date:</label>
+<input id="rec_date" name="rec_date" />
+</p>
+
+<p>
+<label for="pub_date">Publishing date:</label>
+<input id="pub_date" name="pub_date" />
+</p>
+
+<p>
+<input type="submit" value="Search" />
+</p>
+
+</form>
+<!--
+{% if continents %}
+<ul class="continents">
+{% for continent in continents %}
+ <li class="name"><b><a href="{% url telemeta-geo-countries continent.name|urlencode %}">{{ continent.name }}</a></b>
+ <ul>
+ {% for country in continent.countries|slice:":10" %}
+ <li class="country_name">
+ <a href="{% url telemeta-geo-country-collections continent.name,country.name|urlencode %}">
+ {{ country.name|lower|capfirst }}</a></li>
+ {% endfor %}
+ {% if continent.countries.10 %}
+ <li><a href="{% url telemeta-geo-countries continent.name|urlencode %}">More..</a></li>
+ {% endif %}
+ </ul>
+ </li>
+{% endfor %}
+</ul>
+{% else %}
+<p>No data</p>
+{% endif %}
+-->
+{% endblock %}