From: olivier <>
Date: Mon, 12 Jan 2009 08:30:58 +0000 (+0000)
Subject: provide template inheritance wrappers, move real templates into templates/telemeta_de... 
X-Git-Tag: 1.1~731
X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=9d3f1f3ae314c615e996f82dd41612e328c8b337;p=telemeta.git
provide template inheritance wrappers, move real templates into templates/telemeta_default
---
diff --git a/telemeta/templates/telemeta/admin.html b/telemeta/templates/telemeta/admin.html
index f3fd080f..a5334e83 100644
--- a/telemeta/templates/telemeta/admin.html
+++ b/telemeta/templates/telemeta/admin.html
@@ -1,34 +1 @@
-{% extends "telemeta/base_site.html" %}
-
-{% block stylesheets %}
-{{ block.super }}
-
-{% endblock %}
-
-{% block content %}
-
Administration
-
-
-- Users-
-{% if enumerations %}
-
- Enumerations
-    
-    {% for enum in enumerations %}
-        {%ifequal enum.id enumeration_id %}
-            - {{ enum.name|capfirst }}-        {%else%}
-
- 
-                {{ enum.name|capfirst }}-        {%endifequal%}
-    {% endfor %}
-
 -
-{% endif %}
-
-
-    {% block tabcontents %}
-    {% endblock %}
-
-{% endblock %}
+{% extends "telemeta_default/admin.html" %}
diff --git a/telemeta/templates/telemeta/base.html b/telemeta/templates/telemeta/base.html
index 906666f1..dcb544b1 100644
--- a/telemeta/templates/telemeta/base.html
+++ b/telemeta/templates/telemeta/base.html
@@ -1,75 +1 @@
-
-
-
-Telemeta
-{% block stylesheets %}
-
-
-
-{% endblock %}
-{% block extra_javascript %}{% endblock %}
-
-{% load i18n %}
-{% load telemeta_utils %}
-
-
-
-
-
-
-
-{% block content %}{% endblock %}
-
-
-
-
-
Collection: {{ object.title }}
-    
-{% endblock %}
-
-{% block content %}
-    
-    
-{% endblock %}
-{% else %}
-    No such collection
-{% endif %}
-
+{% extends "telemeta_default/collection_detail.html" %}
diff --git a/telemeta/templates/telemeta/collection_detail_dc.html b/telemeta/templates/telemeta/collection_detail_dc.html
index fe066917..297fc2a1 100644
--- a/telemeta/templates/telemeta/collection_detail_dc.html
+++ b/telemeta/templates/telemeta/collection_detail_dc.html
@@ -1,26 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% if object %}
-{% block submenu %}
-    Collection: {{ object.title }}
-    
-{% endblock %}
-
-{% block content %}
-    Dublin Core Expression
-    
-        - ElementRefinement
- Value-        {% for element in object.to_dublincore.elements %}
-        {% if element.value %}
-
- {{ element.name }}{{ element.refinement|default:" " }}
- {% ifequal element.field "collection" %}{{ element.value }}{% else %}{{ element.value }}{% endifequal %}-        {% endif %}
-        {% endfor %}
-        {% for item in object.ordered_items %}
-
- relationhasPart
- {{ item.id }}-        {% endfor %}
-
-{% endblock %}
-{% else %}
-No such collection
-{% endif %}
\ No newline at end of file
+{% extends "telemeta_default/collection_detail_dc.html" %}
diff --git a/telemeta/templates/telemeta/collection_list.html b/telemeta/templates/telemeta/collection_list.html
index 7d0d63f3..50993a54 100644
--- a/telemeta/templates/telemeta/collection_list.html
+++ b/telemeta/templates/telemeta/collection_list.html
@@ -1,11 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% block content %}
-Collections
-
-{% with object_list as collections %}
-{% include "telemeta/inc/collection_list.html" %}
-{% endwith %}
-
-{% endblock %}
+{% extends "telemeta_default/collection_list.html" %}
diff --git a/telemeta/templates/telemeta/collection_xspf.xml b/telemeta/templates/telemeta/collection_xspf.xml
index 2e8066c0..5a331700 100644
--- a/telemeta/templates/telemeta/collection_xspf.xml
+++ b/telemeta/templates/telemeta/collection_xspf.xml
@@ -1,23 +1 @@
-{% extends "telemeta/base_xspf.xml" %}
-{% load telemeta_utils %}
-
-{% block listinfo %} 
-{% with collection.to_dublincore.flatten as dc %}
-  {{ dc.creator }}
-  {{ dc.title }}
-  http://{{ host }}{% url telemeta-collection-detail collection.id|urlencode %}
-{% endwith %}
-{% endblock %}
-
-{% block tracklist %}
-{% for item in collection.ordered_items %}
-    
-{% endfor %}
-{% endblock %}
-
+{% extends "telemeta_default/collection_xspf.xml" %}
diff --git a/telemeta/templates/telemeta/enumeration_edit.html b/telemeta/templates/telemeta/enumeration_edit.html
index ae5262a5..dbe28b16 100644
--- a/telemeta/templates/telemeta/enumeration_edit.html
+++ b/telemeta/templates/telemeta/enumeration_edit.html
@@ -1,47 +1 @@
-{% extends "telemeta/admin.html" %}
-
-{% block tabcontents %}
-    Manage {{ enumeration_name_plural|capfirst }}
-
-
-
- 
- {% if enumeration_values %}
- 
- {% else %}
-    This enumeration is empty.
- {% endif %}
-
-  
-{% endblock %}
+{% extends "telemeta_default/enumeration_edit.html" %}
diff --git a/telemeta/templates/telemeta/enumeration_edit_value.html b/telemeta/templates/telemeta/enumeration_edit_value.html
index f1fc8ad1..67bbc440 100644
--- a/telemeta/templates/telemeta/enumeration_edit_value.html
+++ b/telemeta/templates/telemeta/enumeration_edit_value.html
@@ -1,22 +1 @@
-{% extends "telemeta/admin.html" %}
-
-{% block tabcontents %}
-    Manage {{ enumeration_name_plural|capfirst }}
-
- 
-  
-
-{% endblock %}
+{% extends "telemeta_default/enumeration_edit_value.html" %}
diff --git a/telemeta/templates/telemeta/geo_continents.html b/telemeta/templates/telemeta/geo_continents.html
index ae6fcebc..c0f0bb4f 100644
--- a/telemeta/templates/telemeta/geo_continents.html
+++ b/telemeta/templates/telemeta/geo_continents.html
@@ -1,26 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% block content %}
-Geographic Navigator
-{% if continents %}
-
-{% else %}
-No data
-{% endif %}
-{% endblock %}
+{% extends "telemeta_default/geo_continents.html" %}
diff --git a/telemeta/templates/telemeta/geo_continents.js b/telemeta/templates/telemeta/geo_continents.js
index 4e8c1930..5b798da4 100644
--- a/telemeta/templates/telemeta/geo_continents.js
+++ b/telemeta/templates/telemeta/geo_continents.js
@@ -1,25 +1 @@
-{% 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]);
-    }
-}
-
+{% extends "telemeta_default/geo_continents.js" %}
diff --git a/telemeta/templates/telemeta/geo_countries.html b/telemeta/templates/telemeta/geo_countries.html
index 7d6820c9..23d01241 100644
--- a/telemeta/templates/telemeta/geo_countries.html
+++ b/telemeta/templates/telemeta/geo_countries.html
@@ -1,13 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% block content %}
-WORLD /
-  {{ continent.name }}
-
-{% endblock %}
+{% extends "telemeta_default/geo_countries.html" %}
diff --git a/telemeta/templates/telemeta/geo_country_collections.html b/telemeta/templates/telemeta/geo_country_collections.html
index d6561c7a..86e9b5dd 100644
--- a/telemeta/templates/telemeta/geo_country_collections.html
+++ b/telemeta/templates/telemeta/geo_country_collections.html
@@ -1,13 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% block content %}
-
-
-{% with object_list as collections %}
-{% include "telemeta/inc/collection_list.html" %}
-{% endwith %}
-
-{% endblock %}
+{% extends "telemeta_default/geo_country_collections.html" %}
diff --git a/telemeta/templates/telemeta/inc/collection_list.html b/telemeta/templates/telemeta/inc/collection_list.html
index 31fbf023..e5ca786c 100644
--- a/telemeta/templates/telemeta/inc/collection_list.html
+++ b/telemeta/templates/telemeta/inc/collection_list.html
@@ -1,19 +1 @@
-{% load telemeta_utils %}
-{% if collections %}
-    {% if hits %}
-    
-    {% endif %}
-    
-    {% for p in collections %}
-        - {{ p.title }}
-            -    {% endfor %}
-    {% if more_collections %}
- [...]{% endif %}
-
-{% else %}
-No collection
-{% endif %}
+{% extends "telemeta_default/inc/collection_list.html" %}
diff --git a/telemeta/templates/telemeta/inc/mediaitem_list.html b/telemeta/templates/telemeta/inc/mediaitem_list.html
index 9ef69716..fd2269c3 100644
--- a/telemeta/templates/telemeta/inc/mediaitem_list.html
+++ b/telemeta/templates/telemeta/inc/mediaitem_list.html
@@ -1,18 +1 @@
-{% load telemeta_utils %}
-{% if items %}
-    {% if hits %}
-    
-    {% endif %}
-    
-    {% for p in items %}
-        - {{ p.title }}-    {% endfor %}
-    {% if more_items %}
- [...]{% endif %}
-
-{% else %}
-No item
-{% endif %}
+{% extends "telemeta_default/inc/mediaitem_list.html" %}
diff --git a/telemeta/templates/telemeta/index.html b/telemeta/templates/telemeta/index.html
index ca4592d8..faa9b415 100644
--- a/telemeta/templates/telemeta/index.html
+++ b/telemeta/templates/telemeta/index.html
@@ -1,13 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% block content %}
-
-{% endblock %}
+{% extends "telemeta_default/index.html" %}
diff --git a/telemeta/templates/telemeta/mediaitem_detail.html b/telemeta/templates/telemeta/mediaitem_detail.html
index 02372c07..b09e6a88 100644
--- a/telemeta/templates/telemeta/mediaitem_detail.html
+++ b/telemeta/templates/telemeta/mediaitem_detail.html
@@ -1,233 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% block stylesheets %}
-{{ block.super }}
-
-
-
-{% endblock %}
-{% block extra_javascript %}
-
-
-
-
-
-
-
-
-
-
-{% endblock %}
-
-
-{% if item %}
-{% block submenu %}
-    Item: {{ item.title }}
-    
-{% endblock %}
-
-{% block content %}
-
-
-
-{% if item.file %}
-    
-    
-        
-
-        
-            
-
-          
-            
-             
-              | Property- | Value- | Unit- | 
-            {% for analyser in analysers %}
-             
-              | -                {{ analyser.name }}
-- | -                {{ analyser.value }}
-- | -                {{ analyser.unit }}
-- | 
-            {% endfor %}
-           
-         
-
-        
-        
-        
-
-        
-            
Download:
-            {% for format in export_formats %}
-            {{ format.name }}
-            {% endfor %}
-        
-
-    
-{% endif %}
-
-    
-    {% block general_info %}
-        
-            {% if item.auteur %}- Auteur
- {{ item.auteur }}{% endif %}
-            {% if item.annee_enr %}
- Année d'enregistrement
- {{ item.annee_enr }}{% endif %}
-            {% if item.dates_enregistr %}
- Date d'enregistrement
- {{ item.dates_enregistr }}{% endif %}
-            {% if item.title %}
- Titre
- {{ item.title }}{% endif %}
-            {% if item.transcrip_trad %}
- Traduction du titre
- {{ item.transcrip_trad }}{% endif %}
-
- Collection
- {{ item.collection.title }}-            {% if item.duree %}
- Durée
- {{ item.duree }}{% endif %}
-            {% if item.collection.ispublished and item.Ref %}
-
- Ref
- {{ item.Ref }}-            {% endif %}
-
-    {% endblock general_info %}
-    
-    
-    
-    
-    
-
-
No such item
-{% endif %}
+{% extends "telemeta_default/mediaitem_detail.html" %}
diff --git a/telemeta/templates/telemeta/mediaitem_detail_dc.html b/telemeta/templates/telemeta/mediaitem_detail_dc.html
index 07864eb9..7924eeb3 100644
--- a/telemeta/templates/telemeta/mediaitem_detail_dc.html
+++ b/telemeta/templates/telemeta/mediaitem_detail_dc.html
@@ -1,25 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% if item %}
-{% block submenu %}
-    Item: {{ item.title }}
-    
-{% endblock %}
-
-{% block content %}
-    Dublin Core Expression
-    
-        - ElementRefinement
- Value-        {% for element in item.to_dublincore.elements %}
-        {% if element.value %}
-
- {{ element.name }}{{ element.refinement|default:" " }}
- {% ifequal element.field "collection" %}{{ element.value }}{% else %}{{ element.value }}{% endifequal %}-        {% endif %}
-        {% endfor %}
-
-{% endblock %}
-{% else %}
-No such item
-{% endif %}
-
-
+{% extends "telemeta_default/mediaitem_detail_dc.html" %}
diff --git a/telemeta/templates/telemeta/mediaitem_list.html b/telemeta/templates/telemeta/mediaitem_list.html
index 5c3b1ccb..6ee20464 100644
--- a/telemeta/templates/telemeta/mediaitem_list.html
+++ b/telemeta/templates/telemeta/mediaitem_list.html
@@ -1,8 +1 @@
-{% extends "telemeta/base_site.html" %}
-
-{% block content %}
-Media items
-{% with object_list as items %}
-{% include "telemeta/inc/mediaitem_list.html" %}
-{% endwith %}
-{% endblock %}
+{% extends "telemeta_default/mediaitem_list.html" %}
diff --git a/telemeta/templates/telemeta/mediaitem_xspf.xml b/telemeta/templates/telemeta/mediaitem_xspf.xml
index ece81d37..f4b9b65e 100644
--- a/telemeta/templates/telemeta/mediaitem_xspf.xml
+++ b/telemeta/templates/telemeta/mediaitem_xspf.xml
@@ -1,13 +1 @@
-{% extends "telemeta/base_xspf.xml" %}
-{% load telemeta_utils %}
-
-{% block tracklist %}
-    
-{% endblock %}
-
+{% extends "telemeta_default/mediaitem_xspf.xml" %}
diff --git a/telemeta/templates/telemeta/search_criteria.html b/telemeta/templates/telemeta/search_criteria.html
index 839c4c0d..7f1b05a0 100644
--- a/telemeta/templates/telemeta/search_criteria.html
+++ b/telemeta/templates/telemeta/search_criteria.html
@@ -1,74 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% block extra_javascript %}
-
-{% endblock %}
-
-{% block content %}
-Advanced search
-
-
-{% endblock %}
+{% extends "telemeta_default/search_criteria.html" %}
diff --git a/telemeta/templates/telemeta/search_results.html b/telemeta/templates/telemeta/search_results.html
index 2cee0f56..846d4110 100644
--- a/telemeta/templates/telemeta/search_results.html
+++ b/telemeta/templates/telemeta/search_results.html
@@ -1,58 +1 @@
-{% extends "telemeta/base_site.html" %}
-{% load telemeta_utils %}
-
-{% block content %}
-Search results
-
-{% if criteria %}
-
-  {% if criteria.pattern %}
-    - Pattern: {{criteria.pattern}}-  {% endif %}
-  {% if criteria.continent %}
-
- Continent: {{criteria.continent}}-  {% endif %}
-  {% if criteria.country %}
-
- Country: {{criteria.country}}-  {% endif %}
-  {% if criteria.ethnic_group %}
-
- Ethnic group: {{criteria.ethnic_group}}-  {% endif %}
-  {% if criteria.creator %}
-
- Creator: {{criteria.creator}}-  {% endif %}
-  {% if criteria.title %}
-
- Title: {{criteria.title}}-  {% endif %}
-  {% if criteria.rec_date %}
-
- Recording date: {{criteria.rec_date}}-  {% endif %}
-  {% if criteria.pub_date %}
-
- Publishing date: {{criteria.pub_date}}-  {% endif %}
-
-{% endif %}
-
-{% ifequal type 'items' %}
-
-Items ({{items_num}}) | 
-  
-    Collections ({{collections_num}})
-
-  {% with object_list as items %}
-      {% include "telemeta/inc/mediaitem_list.html" %}
-  {% endwith %}    
-
-{% else %}
-
-  
-    Items ({{items_num}}) |
-  Collections ({{collections_num}})
-
-  {% with object_list as collections %}
-      {% include "telemeta/inc/collection_list.html" %}
-  {% endwith %}
-
-{% endifequal %}
-
-{% endblock %}
+{% extends "telemeta_default/search_results.html" %}
diff --git a/telemeta/templates/telemeta_default/admin.html b/telemeta/templates/telemeta_default/admin.html
new file mode 100644
index 00000000..5cc5d36f
--- /dev/null
+++ b/telemeta/templates/telemeta_default/admin.html
@@ -0,0 +1,34 @@
+{% extends "telemeta/base.html" %}
+
+{% block stylesheets %}
+{{ block.super }}
+
+{% endblock %}
+
+{% block content %}
+Administration
+
+
+- Users+
+{% if enumerations %}
+
- Enumerations
+    
+    {% for enum in enumerations %}
+        {%ifequal enum.id enumeration_id %}
+            - {{ enum.name|capfirst }}+        {%else%}
+
- 
+                {{ enum.name|capfirst }}+        {%endifequal%}
+    {% endfor %}
+
 +
+{% endif %}
+
+
+    {% block tabcontents %}
+    {% endblock %}
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/base.html b/telemeta/templates/telemeta_default/base.html
new file mode 100644
index 00000000..906666f1
--- /dev/null
+++ b/telemeta/templates/telemeta_default/base.html
@@ -0,0 +1,75 @@
+
+
+
+Telemeta
+{% block stylesheets %}
+
+
+
+{% endblock %}
+{% block extra_javascript %}{% endblock %}
+
+{% load i18n %}
+{% load telemeta_utils %}
+
+
+
+
+
+
+
+{% block content %}{% endblock %}
+
+
+
+
+
Collection: {{ object.title }}
+    
+{% endblock %}
+
+{% block content %}
+    
+    
+{% endblock %}
+{% else %}
+    No such collection
+{% endif %}
+
diff --git a/telemeta/templates/telemeta_default/collection_detail_dc.html b/telemeta/templates/telemeta_default/collection_detail_dc.html
new file mode 100644
index 00000000..0cf3e394
--- /dev/null
+++ b/telemeta/templates/telemeta_default/collection_detail_dc.html
@@ -0,0 +1,26 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% if object %}
+{% block submenu %}
+    Collection: {{ object.title }}
+    
+{% endblock %}
+
+{% block content %}
+    Dublin Core Expression
+    
+        - ElementRefinement
- Value+        {% for element in object.to_dublincore.elements %}
+        {% if element.value %}
+
- {{ element.name }}{{ element.refinement|default:" " }}
- {% ifequal element.field "collection" %}{{ element.value }}{% else %}{{ element.value }}{% endifequal %}+        {% endif %}
+        {% endfor %}
+        {% for item in object.ordered_items %}
+
- relationhasPart
- {{ item.id }}+        {% endfor %}
+
+{% endblock %}
+{% else %}
+No such collection
+{% endif %}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta_default/collection_list.html b/telemeta/templates/telemeta_default/collection_list.html
new file mode 100644
index 00000000..35a21eda
--- /dev/null
+++ b/telemeta/templates/telemeta_default/collection_list.html
@@ -0,0 +1,11 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% block content %}
+Collections
+
+{% with object_list as collections %}
+{% include "telemeta/inc/collection_list.html" %}
+{% endwith %}
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/collection_xspf.xml b/telemeta/templates/telemeta_default/collection_xspf.xml
new file mode 100644
index 00000000..2e8066c0
--- /dev/null
+++ b/telemeta/templates/telemeta_default/collection_xspf.xml
@@ -0,0 +1,23 @@
+{% extends "telemeta/base_xspf.xml" %}
+{% load telemeta_utils %}
+
+{% block listinfo %} 
+{% with collection.to_dublincore.flatten as dc %}
+  {{ dc.creator }}
+  {{ dc.title }}
+  http://{{ host }}{% url telemeta-collection-detail collection.id|urlencode %}
+{% endwith %}
+{% endblock %}
+
+{% block tracklist %}
+{% for item in collection.ordered_items %}
+    
+{% endfor %}
+{% endblock %}
+
diff --git a/telemeta/templates/telemeta_default/enumeration_edit.html b/telemeta/templates/telemeta_default/enumeration_edit.html
new file mode 100644
index 00000000..ae5262a5
--- /dev/null
+++ b/telemeta/templates/telemeta_default/enumeration_edit.html
@@ -0,0 +1,47 @@
+{% extends "telemeta/admin.html" %}
+
+{% block tabcontents %}
+    Manage {{ enumeration_name_plural|capfirst }}
+
+
+
+ 
+ {% if enumeration_values %}
+ 
+ {% else %}
+    This enumeration is empty.
+ {% endif %}
+
+  
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/enumeration_edit_value.html b/telemeta/templates/telemeta_default/enumeration_edit_value.html
new file mode 100644
index 00000000..f1fc8ad1
--- /dev/null
+++ b/telemeta/templates/telemeta_default/enumeration_edit_value.html
@@ -0,0 +1,22 @@
+{% extends "telemeta/admin.html" %}
+
+{% block tabcontents %}
+    Manage {{ enumeration_name_plural|capfirst }}
+
+ 
+  
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/geo_continents.html b/telemeta/templates/telemeta_default/geo_continents.html
new file mode 100644
index 00000000..9e2a7314
--- /dev/null
+++ b/telemeta/templates/telemeta_default/geo_continents.html
@@ -0,0 +1,26 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% block content %}
+Geographic Navigator
+{% if continents %}
+
+{% else %}
+No data
+{% endif %}
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/geo_continents.js b/telemeta/templates/telemeta_default/geo_continents.js
new file mode 100644
index 00000000..4e8c1930
--- /dev/null
+++ b/telemeta/templates/telemeta_default/geo_continents.js
@@ -0,0 +1,25 @@
+{% 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]);
+    }
+}
+
diff --git a/telemeta/templates/telemeta_default/geo_countries.html b/telemeta/templates/telemeta_default/geo_countries.html
new file mode 100644
index 00000000..8b25e9ee
--- /dev/null
+++ b/telemeta/templates/telemeta_default/geo_countries.html
@@ -0,0 +1,13 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% block content %}
+WORLD /
+  {{ continent.name }}
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/geo_country_collections.html b/telemeta/templates/telemeta_default/geo_country_collections.html
new file mode 100644
index 00000000..29bb27e9
--- /dev/null
+++ b/telemeta/templates/telemeta_default/geo_country_collections.html
@@ -0,0 +1,13 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% block content %}
+
+
+{% with object_list as collections %}
+{% include "telemeta/inc/collection_list.html" %}
+{% endwith %}
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/inc/collection_list.html b/telemeta/templates/telemeta_default/inc/collection_list.html
new file mode 100644
index 00000000..31fbf023
--- /dev/null
+++ b/telemeta/templates/telemeta_default/inc/collection_list.html
@@ -0,0 +1,19 @@
+{% load telemeta_utils %}
+{% if collections %}
+    {% if hits %}
+    
+    {% endif %}
+    
+    {% for p in collections %}
+        - {{ p.title }}
+            +    {% endfor %}
+    {% if more_collections %}
- [...]{% endif %}
+
+{% else %}
+No collection
+{% endif %}
diff --git a/telemeta/templates/telemeta_default/inc/mediaitem_list.html b/telemeta/templates/telemeta_default/inc/mediaitem_list.html
new file mode 100644
index 00000000..9ef69716
--- /dev/null
+++ b/telemeta/templates/telemeta_default/inc/mediaitem_list.html
@@ -0,0 +1,18 @@
+{% load telemeta_utils %}
+{% if items %}
+    {% if hits %}
+    
+    {% endif %}
+    
+    {% for p in items %}
+        - {{ p.title }}+    {% endfor %}
+    {% if more_items %}
- [...]{% endif %}
+
+{% else %}
+No item
+{% endif %}
diff --git a/telemeta/templates/telemeta_default/index.html b/telemeta/templates/telemeta_default/index.html
new file mode 100644
index 00000000..08d4e9bf
--- /dev/null
+++ b/telemeta/templates/telemeta_default/index.html
@@ -0,0 +1,13 @@
+{% extends "telemeta/base.html" %}
+{% block content %}
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_detail.html b/telemeta/templates/telemeta_default/mediaitem_detail.html
new file mode 100644
index 00000000..6eaa6460
--- /dev/null
+++ b/telemeta/templates/telemeta_default/mediaitem_detail.html
@@ -0,0 +1,233 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% block stylesheets %}
+{{ block.super }}
+
+
+
+{% endblock %}
+{% block extra_javascript %}
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
+
+
+{% if item %}
+{% block submenu %}
+    Item: {{ item.title }}
+    
+{% endblock %}
+
+{% block content %}
+
+
+
+{% if item.file %}
+    
+    
+        
+
+        
+            
+
+          
+            
+             
+              | Property+ | Value+ | Unit+ | 
+            {% for analyser in analysers %}
+             
+              | +                {{ analyser.name }}
++ | +                {{ analyser.value }}
++ | +                {{ analyser.unit }}
++ | 
+            {% endfor %}
+           
+         
+
+        
+        
+        
+
+        
+            
Download:
+            {% for format in export_formats %}
+            {{ format.name }}
+            {% endfor %}
+        
+
+    
+{% endif %}
+
+    
+    {% block general_info %}
+        
+            {% if item.auteur %}- Auteur
- {{ item.auteur }}{% endif %}
+            {% if item.annee_enr %}
- Année d'enregistrement
- {{ item.annee_enr }}{% endif %}
+            {% if item.dates_enregistr %}
- Date d'enregistrement
- {{ item.dates_enregistr }}{% endif %}
+            {% if item.title %}
- Titre
- {{ item.title }}{% endif %}
+            {% if item.transcrip_trad %}
- Traduction du titre
- {{ item.transcrip_trad }}{% endif %}
+
- Collection
- {{ item.collection.title }}+            {% if item.duree %}
- Durée
- {{ item.duree }}{% endif %}
+            {% if item.collection.ispublished and item.Ref %}
+
- Ref
- {{ item.Ref }}+            {% endif %}
+
+    {% endblock general_info %}
+    
+    
+    
+    
+    
+
+
No such item
+{% endif %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_detail_dc.html b/telemeta/templates/telemeta_default/mediaitem_detail_dc.html
new file mode 100644
index 00000000..4f1f330e
--- /dev/null
+++ b/telemeta/templates/telemeta_default/mediaitem_detail_dc.html
@@ -0,0 +1,25 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% if item %}
+{% block submenu %}
+    Item: {{ item.title }}
+    
+{% endblock %}
+
+{% block content %}
+    Dublin Core Expression
+    
+        - ElementRefinement
- Value+        {% for element in item.to_dublincore.elements %}
+        {% if element.value %}
+
- {{ element.name }}{{ element.refinement|default:" " }}
- {% ifequal element.field "collection" %}{{ element.value }}{% else %}{{ element.value }}{% endifequal %}+        {% endif %}
+        {% endfor %}
+
+{% endblock %}
+{% else %}
+No such item
+{% endif %}
+
+
diff --git a/telemeta/templates/telemeta_default/mediaitem_list.html b/telemeta/templates/telemeta_default/mediaitem_list.html
new file mode 100644
index 00000000..341d25d7
--- /dev/null
+++ b/telemeta/templates/telemeta_default/mediaitem_list.html
@@ -0,0 +1,8 @@
+{% extends "telemeta/base.html" %}
+
+{% block content %}
+Media items
+{% with object_list as items %}
+{% include "telemeta/inc/mediaitem_list.html" %}
+{% endwith %}
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_xspf.xml b/telemeta/templates/telemeta_default/mediaitem_xspf.xml
new file mode 100644
index 00000000..ece81d37
--- /dev/null
+++ b/telemeta/templates/telemeta_default/mediaitem_xspf.xml
@@ -0,0 +1,13 @@
+{% extends "telemeta/base_xspf.xml" %}
+{% load telemeta_utils %}
+
+{% block tracklist %}
+    
+{% endblock %}
+
diff --git a/telemeta/templates/telemeta_default/search_criteria.html b/telemeta/templates/telemeta_default/search_criteria.html
new file mode 100644
index 00000000..9f9cccc7
--- /dev/null
+++ b/telemeta/templates/telemeta_default/search_criteria.html
@@ -0,0 +1,74 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% block extra_javascript %}
+
+{% endblock %}
+
+{% block content %}
+Advanced search
+
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/search_results.html b/telemeta/templates/telemeta_default/search_results.html
new file mode 100644
index 00000000..c0bcda03
--- /dev/null
+++ b/telemeta/templates/telemeta_default/search_results.html
@@ -0,0 +1,58 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+
+{% block content %}
+Search results
+
+{% if criteria %}
+
+  {% if criteria.pattern %}
+    - Pattern: {{criteria.pattern}}+  {% endif %}
+  {% if criteria.continent %}
+
- Continent: {{criteria.continent}}+  {% endif %}
+  {% if criteria.country %}
+
- Country: {{criteria.country}}+  {% endif %}
+  {% if criteria.ethnic_group %}
+
- Ethnic group: {{criteria.ethnic_group}}+  {% endif %}
+  {% if criteria.creator %}
+
- Creator: {{criteria.creator}}+  {% endif %}
+  {% if criteria.title %}
+
- Title: {{criteria.title}}+  {% endif %}
+  {% if criteria.rec_date %}
+
- Recording date: {{criteria.rec_date}}+  {% endif %}
+  {% if criteria.pub_date %}
+
- Publishing date: {{criteria.pub_date}}+  {% endif %}
+
+{% endif %}
+
+{% ifequal type 'items' %}
+
+Items ({{items_num}}) | 
+  
+    Collections ({{collections_num}})
+
+  {% with object_list as items %}
+      {% include "telemeta/inc/mediaitem_list.html" %}
+  {% endwith %}    
+
+{% else %}
+
+  
+    Items ({{items_num}}) |
+  Collections ({{collections_num}})
+
+  {% with object_list as collections %}
+      {% include "telemeta/inc/collection_list.html" %}
+  {% endwith %}
+
+{% endifequal %}
+
+{% endblock %}