]> git.parisson.com Git - telemeta.git/commitdiff
* UNSTABLE
authoryomguy <yomguy@parisson.com>
Mon, 30 Jan 2012 14:47:10 +0000 (15:47 +0100)
committeryomguy <yomguy@parisson.com>
Mon, 30 Jan 2012 14:47:10 +0000 (15:47 +0100)
* remove default template links (get the original templates to personalize
* Funds > Fonds
* add ResourceView as a generic view of MediaBaseResource based classes (like MediaCorpus and MediaFonds)
* bugfixes
* fix some urls

149 files changed:
telemeta/admin.py
telemeta/forms/media.py
telemeta/htdocs/css/telemeta.css
telemeta/models/media.py
telemeta/models/system.py
telemeta/templates/telemeta/admin.html
telemeta/templates/telemeta/admin_enumerations.html
telemeta/templates/telemeta/admin_general.html
telemeta/templates/telemeta/admin_instruments.html
telemeta/templates/telemeta/admin_users.html
telemeta/templates/telemeta/base.html
telemeta/templates/telemeta/base_site.html [deleted file]
telemeta/templates/telemeta/base_xspf.xml
telemeta/templates/telemeta/collection.m3u
telemeta/templates/telemeta/collection_add.html
telemeta/templates/telemeta/collection_detail.html
telemeta/templates/telemeta/collection_detail_dc.html
telemeta/templates/telemeta/collection_edit.html
telemeta/templates/telemeta/collection_list.html
telemeta/templates/telemeta/collection_related_edit.html
telemeta/templates/telemeta/collection_xspf.xml
telemeta/templates/telemeta/country_info.html
telemeta/templates/telemeta/enumeration_edit.html
telemeta/templates/telemeta/enumeration_edit_value.html
telemeta/templates/telemeta/flatpage.html
telemeta/templates/telemeta/geo_continents.html
telemeta/templates/telemeta/geo_countries.html
telemeta/templates/telemeta/geo_country_collections.html
telemeta/templates/telemeta/geo_country_items.html
telemeta/templates/telemeta/home.html
telemeta/templates/telemeta/inc/children_list.html [new file with mode: 0644]
telemeta/templates/telemeta/inc/collection_list.html
telemeta/templates/telemeta/inc/collection_related.html
telemeta/templates/telemeta/inc/dublincore.html
telemeta/templates/telemeta/inc/mediaitem_list.html
telemeta/templates/telemeta/inc/mediaitem_related.html
telemeta/templates/telemeta/inc/module_revisions.html
telemeta/templates/telemeta/inc/resource_list.html [new file with mode: 0644]
telemeta/templates/telemeta/inc/resource_related.html [new file with mode: 0644]
telemeta/templates/telemeta/inc/user_list.html
telemeta/templates/telemeta/index.html
telemeta/templates/telemeta/instrument_edit.html
telemeta/templates/telemeta/instrument_edit_value.html
telemeta/templates/telemeta/login.html
telemeta/templates/telemeta/mediaitem_add.html
telemeta/templates/telemeta/mediaitem_copy.html
telemeta/templates/telemeta/mediaitem_detail.html
telemeta/templates/telemeta/mediaitem_detail_dc.html
telemeta/templates/telemeta/mediaitem_edit.html
telemeta/templates/telemeta/mediaitem_keywords_edit.html
telemeta/templates/telemeta/mediaitem_list.html
telemeta/templates/telemeta/mediaitem_performances_edit.html
telemeta/templates/telemeta/mediaitem_player.html
telemeta/templates/telemeta/mediaitem_related_edit.html
telemeta/templates/telemeta/mediaitem_xspf.xml
telemeta/templates/telemeta/messages.html
telemeta/templates/telemeta/paginator.html
telemeta/templates/telemeta/profile_detail.html
telemeta/templates/telemeta/profile_edit.html
telemeta/templates/telemeta/registration/logged_out.html
telemeta/templates/telemeta/registration/password_change_done.html
telemeta/templates/telemeta/registration/password_change_form.html
telemeta/templates/telemeta/registration/password_reset_complete.html
telemeta/templates/telemeta/registration/password_reset_confirm.html
telemeta/templates/telemeta/registration/password_reset_done.html
telemeta/templates/telemeta/registration/password_reset_email.html
telemeta/templates/telemeta/registration/password_reset_form.html
telemeta/templates/telemeta/resource_add.html [new file with mode: 0644]
telemeta/templates/telemeta/resource_detail.html [new file with mode: 0644]
telemeta/templates/telemeta/resource_edit.html [new file with mode: 0644]
telemeta/templates/telemeta/resource_list.html [new file with mode: 0644]
telemeta/templates/telemeta/resource_related_edit.html [new file with mode: 0644]
telemeta/templates/telemeta/search_criteria.html
telemeta/templates/telemeta/search_results.html
telemeta/templates/telemeta/users.html
telemeta/templates/telemeta_default/admin.html [deleted file]
telemeta/templates/telemeta_default/admin_enumerations.html [deleted file]
telemeta/templates/telemeta_default/admin_general.html [deleted file]
telemeta/templates/telemeta_default/admin_instruments.html [deleted file]
telemeta/templates/telemeta_default/admin_users.html [deleted file]
telemeta/templates/telemeta_default/base.html [deleted file]
telemeta/templates/telemeta_default/base_xspf.xml [deleted file]
telemeta/templates/telemeta_default/collection.m3u [deleted file]
telemeta/templates/telemeta_default/collection_add.html [deleted file]
telemeta/templates/telemeta_default/collection_detail.html [deleted file]
telemeta/templates/telemeta_default/collection_detail_dc.html [deleted file]
telemeta/templates/telemeta_default/collection_edit.html [deleted file]
telemeta/templates/telemeta_default/collection_list.html [deleted file]
telemeta/templates/telemeta_default/collection_related_edit.html [deleted file]
telemeta/templates/telemeta_default/collection_xspf.xml [deleted file]
telemeta/templates/telemeta_default/corpus_add.html [deleted file]
telemeta/templates/telemeta_default/corpus_detail.html [deleted file]
telemeta/templates/telemeta_default/corpus_edit.html [deleted file]
telemeta/templates/telemeta_default/corpus_list.html [deleted file]
telemeta/templates/telemeta_default/country_info.html [deleted file]
telemeta/templates/telemeta_default/enumeration_edit.html [deleted file]
telemeta/templates/telemeta_default/enumeration_edit_value.html [deleted file]
telemeta/templates/telemeta_default/flatpage.html [deleted file]
telemeta/templates/telemeta_default/fund_add.html [deleted file]
telemeta/templates/telemeta_default/fund_detail.html [deleted file]
telemeta/templates/telemeta_default/fund_edit.html [deleted file]
telemeta/templates/telemeta_default/fund_list.html [deleted file]
telemeta/templates/telemeta_default/geo_continents.html [deleted file]
telemeta/templates/telemeta_default/geo_countries.html [deleted file]
telemeta/templates/telemeta_default/geo_country_collections.html [deleted file]
telemeta/templates/telemeta_default/geo_country_items.html [deleted file]
telemeta/templates/telemeta_default/home.html [deleted file]
telemeta/templates/telemeta_default/inc/collection_list.html [deleted file]
telemeta/templates/telemeta_default/inc/collection_related.html [deleted file]
telemeta/templates/telemeta_default/inc/corpus_list.html [deleted file]
telemeta/templates/telemeta_default/inc/dublincore.html [deleted file]
telemeta/templates/telemeta_default/inc/fund_list.html [deleted file]
telemeta/templates/telemeta_default/inc/mediaitem_list.html [deleted file]
telemeta/templates/telemeta_default/inc/mediaitem_related.html [deleted file]
telemeta/templates/telemeta_default/inc/module_revisions.html [deleted file]
telemeta/templates/telemeta_default/inc/user_list.html [deleted file]
telemeta/templates/telemeta_default/index.html [deleted file]
telemeta/templates/telemeta_default/instrument_edit.html [deleted file]
telemeta/templates/telemeta_default/instrument_edit_value.html [deleted file]
telemeta/templates/telemeta_default/login.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_add.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_copy.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_detail.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_detail_dc.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_edit.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_keywords_edit.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_list.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_performances_edit.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_player.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_related_edit.html [deleted file]
telemeta/templates/telemeta_default/mediaitem_xspf.xml [deleted file]
telemeta/templates/telemeta_default/messages.html [deleted file]
telemeta/templates/telemeta_default/paginator.html [deleted file]
telemeta/templates/telemeta_default/profile_detail.html [deleted file]
telemeta/templates/telemeta_default/profile_edit.html [deleted file]
telemeta/templates/telemeta_default/registration/logged_out.html [deleted file]
telemeta/templates/telemeta_default/registration/password_change_done.html [deleted file]
telemeta/templates/telemeta_default/registration/password_change_form.html [deleted file]
telemeta/templates/telemeta_default/registration/password_reset_complete.html [deleted file]
telemeta/templates/telemeta_default/registration/password_reset_confirm.html [deleted file]
telemeta/templates/telemeta_default/registration/password_reset_done.html [deleted file]
telemeta/templates/telemeta_default/registration/password_reset_email.html [deleted file]
telemeta/templates/telemeta_default/registration/password_reset_form.html [deleted file]
telemeta/templates/telemeta_default/search_criteria.html [deleted file]
telemeta/templates/telemeta_default/search_results.html [deleted file]
telemeta/templates/telemeta_default/users.html [deleted file]
telemeta/templatetags/telemeta_utils.py
telemeta/urls.py
telemeta/views/base.py

index c57291c6beae558bba10d4baec9a219489b5260c..3edbd968aba7b297f3fc4d920bdece8e57dd39a0 100644 (file)
@@ -7,7 +7,7 @@ from telemeta.models.system import *
 from django.contrib import admin
 
 
-class MediaFundAdmin(admin.ModelAdmin):
+class MediaFondsAdmin(admin.ModelAdmin):
     search_fields = ['title', 'code']
     ordering = ['code']
 
@@ -71,7 +71,7 @@ class RevisionAdmin(admin.ModelAdmin):
     ordering = ['-time']
 
 
-admin.site.register(MediaFund, MediaFundAdmin)
+admin.site.register(MediaFonds, MediaFondsAdmin)
 admin.site.register(MediaCorpus, MediaCorpusAdmin)
 admin.site.register(MediaCollection, MediaCollectionAdmin)
 admin.site.register(MediaItem, MediaItemAdmin)
index 589e8830cd23dc8a8194bc9a39359ac5b8d455bc..798d1671e17d36cba93cc122bd538d5e41737f5b 100644 (file)
 from django.forms import ModelForm
 from telemeta.models import *
 
-class MediaFundForm(ModelForm):
+class MediaFondsForm(ModelForm):
     class Meta:
-        model = MediaFund
+        model = MediaFonds
+
+class MediaFondsRelatedForm(ModelForm):
+    class Meta:
+        model = MediaFondsRelated
 
 class MediaCorpusForm(ModelForm):
     class Meta:
         model = MediaCorpus
-        
+
+class MediaCorpusRelatedForm(ModelForm):
+    class Meta:
+        model = MediaCorpusRelated
+
 class MediaCollectionForm(ModelForm):
     class Meta:
         model = MediaCollection
     def clean_doctype_code(self):
         return self.cleaned_data['doctype_code'] or 0
-        
+
 class MediaCollectionRelatedForm(ModelForm):
     class Meta:
         model = MediaCollectionRelated
@@ -63,7 +71,7 @@ class MediaItemForm(ModelForm):
 class MediaItemRelatedForm(ModelForm):
     class Meta:
         model = MediaItemRelated
-        
+
 class MediaItemKeywordForm(ModelForm):
     class Meta:
         model = MediaItemKeyword
@@ -71,7 +79,7 @@ class MediaItemKeywordForm(ModelForm):
 class MediaItemPerformanceForm(ModelForm):
     class Meta:
         model = MediaItemPerformance
-        
+
     def __init__(self, *args, **kwds):
         super(MediaItemPerformanceForm, self).__init__(*args, **kwds)
         self.fields['instrument'].queryset = Instrument.objects.order_by('name')
index 7d78fe0239a5a40360ad7bb57822f61ac3592588..7b1a36b257c15da5835c230c74de201cbea65823 100644 (file)
@@ -510,7 +510,7 @@ text-align:center;
 
 /* you can make a different style for default selected value */
 #nav a.selected {
-color:#f00;
+color:#FFF;
 }
 
 /* submenu, it's hidden by default */
index 9bfd4f2bc2bd0ee41fce2812278a6be9b48a0c33..aea9cbb193d4473e2e21d3fb4f1e0fb824939c44 100644 (file)
@@ -111,6 +111,46 @@ class MediaBaseResource(MediaResource):
         ordering = ['code']
 
 
+class MediaRelated(MediaResource):
+    "Related media"
+
+    element_type = 'media'
+
+    title           = CharField(_('title'))
+    date            = DateTimeField(_('date'), auto_now=True)
+    description     = TextField(_('description'))
+    mime_type       = CharField(_('mime_type'), null=True)
+    url             = CharField(_('url'), max_length=500)
+    credits         = CharField(_('credits'))
+    file            = FileField(_('file'), upload_to='items/%Y/%m/%d', db_column="filename")
+
+    def is_image(self):
+        is_url_image = False
+        if self.url:
+            url_types = ['.png', '.jpg', '.gif', '.jpeg']
+            for type in url_types:
+                if type in self.url:
+                    is_url_image = True
+        return 'image' in self.mime_type or is_url_image
+
+    def save(self, force_insert=False, force_update=False):
+        super(MediaRelated, self).save(force_insert, force_update)
+
+    def set_mime_type(self):
+        if self.file:
+            self.mime_type = mimetypes.guess_type(self.file.path)[0]
+
+    def __unicode__(self):
+        if self.title and not re.match('^ *N *$', self.title):
+            title = self.title
+        else:
+            title = unicode(self.item)
+        return title
+
+    class Meta:
+        abstract = True
+
+
 class MediaCollection(MediaResource):
     "Describe a collection of items"
 
@@ -247,44 +287,6 @@ class MediaCollection(MediaResource):
         ordering = ['code']
         verbose_name = _('collection')
 
-class MediaRelated(MediaResource):
-    "Related media"
-
-    element_type = 'media'
-
-    title           = CharField(_('title'))
-    date            = DateTimeField(_('date'), auto_now=True)
-    description     = TextField(_('description'))
-    mime_type       = CharField(_('mime_type'), null=True)
-    url             = CharField(_('url'), max_length=500)
-    credits         = CharField(_('credits'))
-    file            = FileField(_('file'), upload_to='items/%Y/%m/%d', db_column="filename")
-
-    def is_image(self):
-        is_url_image = False
-        if self.url:
-            url_types = ['.png', '.jpg', '.gif', '.jpeg']
-            for type in url_types:
-                if type in self.url:
-                    is_url_image = True
-        return 'image' in self.mime_type or is_url_image
-
-    def save(self, force_insert=False, force_update=False):
-        super(MediaRelated, self).save(force_insert, force_update)
-
-    def set_mime_type(self):
-        if self.file:
-            self.mime_type = mimetypes.guess_type(self.file.path)[0]
-
-    def __unicode__(self):
-        if self.title and not re.match('^ *N *$', self.title):
-            title = self.title
-        else:
-            title = unicode(self.item)
-        return title
-
-    class Meta:
-        abstract = True
 
 class MediaCollectionRelated(MediaRelated):
     "Collection related media"
@@ -622,46 +624,56 @@ class MediaCorpus(MediaBaseResource):
     "Describe a corpus"
 
     element_type = 'corpus'
-    
-    collections = models.ManyToManyField(MediaCollection)
-    
+    children_type = 'collections'
+
+    children = models.ManyToManyField(MediaCollection, related_name="corpus", verbose_name=_('collections'))
+
+    @property
+    def public_id(self):
+        return self.code
+
     class Meta(MetaCore):
         db_table = 'media_corpus'
         verbose_name = _('corpus')
         verbose_name_plural = _('corpus')
 
 
+class MediaFonds(MediaBaseResource):
+    "Describe fonds"
+
+    element_type = 'fonds'
+    children_type = 'corpus'
+
+    children = models.ManyToManyField(MediaCorpus, related_name="fonds", verbose_name=_('corpus'))
+
+    @property
+    def public_id(self):
+        return self.code
+
+    class Meta(MetaCore):
+        db_table = 'media_fonds'
+        verbose_name = _('fonds')
+        verbose_name_plural = _('fonds')
+
+
 class MediaCorpusRelated(MediaRelated):
     "Corpus related media"
 
-    corpus = ForeignKey(MediaCorpus, related_name="related", verbose_name=_('corpus'))
+    resource = ForeignKey(MediaCorpus, related_name="related", verbose_name=_('corpus'))
 
     class Meta(MetaCore):
         db_table = 'media_corpus_related'
         verbose_name = _('corpus related media')
         verbose_name_plural = _('corpus related media')
-        
-        
-class MediaFund(MediaBaseResource):
-    "Describe a fund"
-
-    element_type = 'fund'
-    
-    corpus = models.ManyToManyField(MediaCorpus)
-
-    class Meta(MetaCore):
-        db_table = 'media_funds'
-        verbose_name = _('fund')
 
 
-class MediaFundRelated(MediaRelated):
-    "Fund related media"
+class MediaFondsRelated(MediaRelated):
+    "Fonds related media"
 
-    fund = ForeignKey(MediaFund, related_name="related", verbose_name=_('fund'))
+    resource = ForeignKey(MediaFonds, related_name="related", verbose_name=_('fonds'))
 
     class Meta(MetaCore):
-        db_table = 'media_fund_related'
-        verbose_name = _('fund related media')
-        verbose_name_plural = _('fund related media')
-        
-        
\ No newline at end of file
+        db_table = 'media_fonds_related'
+        verbose_name = _('fonds related media')
+        verbose_name_plural = _('fonds related media')
+
index 0a3f8339fa159d933d68ae774c6d755dbefe260c..33f9b4fea8b0710e0afc666654a46ffeaad6b63d 100644 (file)
@@ -45,7 +45,7 @@ from django.forms import ModelForm
 
 class Revision(ModelCore):
     "Revision made by user"
-    ELEMENT_TYPE_CHOICES = (('collection', 'collection'), ('item', 'item'), ('part', 'part'), ('marker', 'marker'), ('media', 'media'))
+    ELEMENT_TYPE_CHOICES = (('collection', 'collection'), ('item', 'item'), ('part', 'part'), ('marker', 'marker'), ('media', 'media'), ('fonds', 'fonds'), ('corpus', 'corpus'))
     CHANGE_TYPE_CHOICES  = (('import', 'import'), ('create', 'create'), ('update', 'update'), ('delete','delete'))
 
     element_type         = CharField(_('element type'), choices=ELEMENT_TYPE_CHOICES, max_length=16, required=True)
index a5334e8360438f1de48509e4c11c0bdca2e56d31..ff32173ea166b853dfd657c838571f653d9d6350 100644 (file)
@@ -1 +1,32 @@
-{% extends "telemeta_default/admin.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block stylesheets %}
+{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{% url telemeta-css "admin.css" %}" />
+{% endblock %}
+
+{% block title %}
+<h1><img src="{% url telemeta-images "admin_red.png" %}" style="vertical-align:middle" /> {% trans "Administration" %}</h1>
+{% endblock %}
+
+{% block content %}
+
+{% block tab %}
+<div class="tabs">
+<ul>
+<li><a href="{% url telemeta-admin-general %}">{% trans "General administration" %}</a></li>
+<li><a href="{% url telemeta-admin-users %}">{% trans "Users" %}</a></li>
+<li><a href="{% url telemeta-admin-enumerations %}">{% trans "Enumerations" %}</a></li>
+<li><a href="{% url telemeta-instrument-edit %}">{% trans "Instruments" %}</a></li>
+</ul>
+</div>
+{% endblock tab %}
+
+<div class="tabcontents">
+    {% block tabcontents %}
+    {% endblock %}
+</div>
+
+{% endblock %}
index 1d1dd2d32fef8560edb32320af79bd8d03968f41..9c68d74fde37f6799bae3d8fab87cdb36c4b66e6 100644 (file)
@@ -1 +1,27 @@
-{% extends "telemeta_default/admin_enumerations.html" %}
+{% extends "telemeta/admin.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block tabcontents %}
+ <h4>{% trans "Enumerations" %}</h4>
+{% if enumerations %}
+
+  <table class="listing">
+   <thead>
+    <tr><th>{% trans "Title"%}</th></tr>
+   </thead><tbody>
+    {% for enum in enumerations %}
+         <tr><td><a href="{% url telemeta-enumeration-edit enum.id %}">
+                {{ enum.name|capfirst }}</a></td></tr>    
+    {% endfor %}
+    </tbody>
+  </table>
+  {% else %}
+    <p class="help">{% trans "No enumerations" %}</p>
+ {% endif %}
+
+{% endblock %}
+
+
index 1154dc27344c30e3b5ec6d3d724ab3d4965aa378..ec56232490873a50fbcc6e0fce768c9b48ed43cb 100644 (file)
@@ -1 +1,6 @@
-{% extends "telemeta_default/admin_general.html" %}
+{% extends "telemeta/admin.html" %}
+{% load i18n %}
+
+{% block tabcontents %}
+ <iframe align="middle" frameborder="0" width="100%" height="600px"  src="{% url telemeta-home %}admin/django/" />
+{% endblock %}
index dd7e96006a107afb4f2d6144c86cb87a47d0d6aa..5a3fa5f3e960c06adb3bb73e2d842f3cefcf3b59 100644 (file)
@@ -1 +1,21 @@
-{% extends "telemeta_default/admin_instruments.html" %}
+{% extends "telemeta/admin.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block tabcontents %}
+ <h4>{% trans "Users" %}</h4>
+
+ {% if users %}
+   <ul>
+    {% for user in users %}
+    <li>{{user.username}}</li>
+    {% endfor %}
+    </ul>
+ {% else %}
+    <p class="help">{% trans "No users" %}</p>
+ {% endif %}
+
+{% endblock %}
+
+
+
index 774d791fecf0b3ae0715c67d85d31c321e6904c2..5a277a9fdd7414df1ff2095bc5d5fe66248aaa5c 100644 (file)
@@ -1 +1,14 @@
-{% extends "telemeta_default/admin_users.html" %}
+{% extends "telemeta/admin.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block tabcontents %}
+ <h4>{% trans "Users" %}</h4>
+
+ {% if users %}
+  {% include "telemeta/inc/user_list.html" %}
+ {% else %}
+    <p class="help">{% trans "No users" %}</p>
+ {% endif %}
+
+{% endblock %}
index dcb544b1221885512278f10d1474a4ade97d8964..22bbb8046aff7791adbfd597bebf3f39267d923d 100644 (file)
@@ -1 +1,169 @@
-{% extends "telemeta_default/base.html" %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+{% load i18n %}
+{% load telemeta_utils %}
+{% get_current_language as LANGUAGE_CODE %}
+{% get_available_languages as LANGUAGES %}
+<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
+
+<head>
+<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
+<title>{%block head_title %}{% description %} - Telemeta{% endblock %}</title>
+
+{% block stylesheets %}
+<link rel="stylesheet" type="text/css" href="{% url telemeta-css "telemeta.css" %}" />
+<link rel="alternate" href="/rss" title="RSS 2.0" type="application/rss+xml" />
+<!--[if IE]>
+<link rel="stylesheet" type="text/css" href="{% url telemeta-css "telemeta_ie.css" %}" />
+<![endif]-->
+<!--[if lte IE 6]>
+<link rel="stylesheet"type="text/css" href="{% url telemeta-css "telemeta_ie6.css" %}" />
+<![endif]-->
+{% endblock %}
+
+{% block javascript %}
+<script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
+<!--<script src="{% url telemeta-js "jquery-1.6.min.js" %}" type="text/javascript"></script>-->
+<script src="{% url telemeta-timeside "js/libs/jquery-1.6.min.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "locale.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "application.js" %}" type="text/javascript"></script>
+{% if user.is_authenticated %}
+<script type='text/javascript'>var CURRENT_USER_NAME="{{ user.username }}";</script>
+{% else %}
+<script type='text/javascript'>var CURRENT_USER_NAME=undefined;</script>
+{% endif %}
+{% endblock %}
+
+{% block extra_javascript %}{% endblock %}
+</head>
+
+<body>
+{% block layout %}
+<div id="layout">
+{% block header %}
+<div id="header">
+<div id="logo">
+{% block logo %}
+<a href="{% url telemeta-home %}"><img src="{% url telemeta-images "logo_telemeta_2.png" %}" alt="Telemeta" /></a>
+{% endblock %}
+</div>
+
+<div id="auth_info">
+{% if user.is_authenticated %}
+<img src="{% url telemeta-images "user.png" %}" alt="user" style="vertical-align:middle" />
+{% trans "Welcome" %},
+{% if user.first_name and user.last_name %}
+{{ user.first_name }} {{ user.last_name }} |
+{% else %}
+{{ user.username }} |
+{% endif %}
+<a href="{% url telemeta-profile-detail user.username %}">{% trans "Profile" %}</a> |
+<a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> |
+<a href="{% url telemeta-logout %}">{% trans "Sign out" %}
+<img src="{% url telemeta-images "logout.png" %}" alt="logout" style="vertical-align:middle" /></a>
+{% else %}
+<a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> |
+<a href="{% url telemeta-login %}?next={{ request.path|urlencode }}">{% trans "Sign in" %}</a>
+{% endif %}
+</div>
+
+<div id="quick_search">
+<form action="{% url telemeta-search %}" id="_quickSearchForm" method="get">
+<input type="text" id="quick_search_pattern" name="pattern" />
+<a href="#" class="component button"
+                onclick="document.getElementById('_quickSearchForm').submit(); return false;">{% trans "Search" %}</a>
+</form>
+</div>
+
+<div id="menu" class="nav">
+{% block menu %}
+
+{# spaces between li and a elements breaks layout #}
+
+<!--<ul id="nav">
+ <a href="{% url telemeta-home %}" class="darkblue">{% trans "Home" %}</a>
+ <a href="{% url telemeta-collections %}" class="blue">{% trans "Collections" %}</a>
+ <a href="{% url telemeta-items %}" class="green">{% trans "Items" %}</a></li>
+ <a href="{% url telemeta-geo-continents %}" class="yellow">{% trans "Geo Navigator" %}</a>
+ <a href="{% url telemeta-search-criteria %}" class="orange">{% trans "Advanced search" %}</a>
+ {% if user.is_authenticated %}
+ <a href="{% url telemeta-users %}" class="red">{% trans "Users" %}</a>
+ {% endif %}
+ {% if user.is_staff %}
+ <a href="{% url telemeta-admin %}" class="violet">{% trans "Admin" %}</a>
+{% endif %}
+</ul>-->
+
+<ul id="nav">
+ <li><a href="{% url telemeta-home %}" class="blue">{% trans "Home" %}</a></li>
+
+ <li><a href="{% url telemeta-archives %}" class="green">{% trans "Archives" %}</a>
+  <ul>
+     <li><a href="{% url telemeta-fonds %}">{% trans "Fonds" %}</a></li>
+     <li><a href="{% url telemeta-corpus %}">{% trans "Corpus" %}</a></li>
+     <li><a href="{% url telemeta-collections %}">{% trans "Collections" %}</a></li>
+     <li><a href="{% url telemeta-items %}">{% trans "Items" %}</a></li>
+  </ul>
+  <div class="clear"></div>
+ </li>
+ <li><a href="{% url telemeta-geo-continents %}" class="yellow">{% trans "Geo Navigator" %}</a></li>
+ <li><a href="{% url telemeta-search-criteria %}" class="orange">{% trans "Advanced search" %}</a></li>
+ {% if user.is_authenticated %}
+ <li><a href="{% url telemeta-users %}" class="red">{% trans "Users" %}</a></li>
+ {% endif %}
+ {% if user.is_staff %}
+ <li><a href="{% url telemeta-admin %}" class="violet">{% trans "Admin" %}</a></li>
+{% endif %}
+</ul>
+<div class="clear"></div>
+
+{% endblock %}
+</div>
+</div>
+{% endblock header %}
+
+<div id="content">
+    <table id="content_header"><tr>
+            <td class="leftcol"><h1>{% block title %}{% endblock %}</h1></td>
+            <td class="rightcol">{% block title_buttons %}{% endblock %}</td>
+    </tr></table>
+{% block content %}{% endblock %}
+<div class="nett"></div>
+{% block delete %}{% endblock %}
+</div>
+
+{% block footer %}
+<div id="footer">
+ <hr />
+ <table width="100%">
+  <tr>
+   <td>
+    <a id="telemeta_powered" href="{% telemeta_url %}" target="_blank"><img src="{% url telemeta-images "logo_mini_2.png" %}" height="30" width="93"
+   alt="Telemeta Powered"/></a>
+    <p class="left">
+    {% trans "Powered by" %} <a href="{% telemeta_url %}" target="_blank"><strong>Telemeta {% telemeta_version %}</strong></a><br />
+    {% trans "By" %} <a href="http://www.parisson.com/">Parisson SARL</a>
+    </p>
+   </td>
+   <td>
+    <p class="center">
+    {% trans "Usage of the archives in the respect of cultural heritage of the original communities." %}
+    </p>
+   </td>
+   <td>
+    <p class="right">
+    Copyright &copy; {% current_year %} {% organization %}<br />
+    <a href="{% url telemeta-flatpage "legal_notices" %}">{% trans "Legal notices" %}</a>
+    </p>
+   </td>
+  </tr>
+ </table>
+</div>
+{% endblock %}
+</div>
+{% endblock layout %}
+
+{% block analytics %}
+{% endblock analytics %}
+
+</body>
+</html>
diff --git a/telemeta/templates/telemeta/base_site.html b/telemeta/templates/telemeta/base_site.html
deleted file mode 100644 (file)
index cab21a0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{% extends "telemeta_default/base_site.html" %}
index e234ed5d14351e20466010326f3cf99e475bae32..af4166b62cc09cf4e39d472fbd5efe30e73f8b9e 100644 (file)
@@ -1 +1,9 @@
-{% extends "telemeta_default/base_xspf.xml" %}
+<?xml version="1.0" encoding="UTF-8"?>
+<playlist version="1" xmlns="http://xspf.org/ns/0/">
+{% block listinfo %}{% endblock %}
+  <trackList>
+  {% block tracklist %}{% endblock %}
+  </trackList>
+</playlist>
+
+
index 59de8ff07f4b446270243a0e309fa911b658738e..2f00ed170e8a2ba9020f7294c7d235eea34bb717 100644 (file)
@@ -1 +1,3 @@
-{% extends "telemeta_default/collection.m3u" %}
+#EXTM3U{% load telemeta_utils %}{% for item in collection.items.all %}
+#EXTINF:{{ item.get_duration }},{{ item }}
+http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}{% endfor %}
index 962155bbb925a3ffa7cdc397e80a0bc58c697b24..abbda5b7a601073f64361ca0cbb1bbacb5b91490 100644 (file)
@@ -1 +1,39 @@
-{% extends "telemeta_default/collection_add.html" %}
+{% extends "telemeta/collection_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block title %}
+    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : NEW
+{% endblock %}
+
+{% block title_buttons %}
+     <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block infos %}
+        <div class="infos">
+        <form method="post" id ="_addCollectionForm" action="">{% csrf_token %}
+        <table>
+        <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
+        {% for field in form %}
+         <tr>
+        {% if field.html_name == "copied_from_item" or field.html_name == "doctype_code" %}
+            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+        {% else %}
+            <tr><td class="error">{{ field.errors }}</td></tr>
+            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+        {% endif %}
+        </tr>
+        {% endfor %}
+        </table>
+        <div align="center" style="margin-top:3ex;">
+            <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+            <a href="#" class="component_icon button icon_save"
+                onclick="document.getElementById('_addCollectionForm').submit(); return false;">{% trans "Save" %}</a>
+        </div>
+        </form>
+        </div>
+{% endblock infos%}
+
+{% block delete %}
+{% endblock %}
index 66822ac552dc1f3675e45486475367d688bb02a1..d366290fbef49190ec57e1d5ac9ef3a9e18f33fc 100644 (file)
@@ -1 +1,215 @@
-{% extends "telemeta_default/collection_detail.html" %}
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block head_title %}{% trans "Collection" %}{{collection|prepend:' : '}} - {{ block.super }}{% endblock %}
+
+{% block extra_javascript %}
+<script src="{% url telemeta-js "swfobject.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "popupdiv.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
+<script>
+    {% if user.is_authenticated %}
+    jQuery(document).ready(function(){
+        var p = playlistUtils;
+        
+        {% for playlist in playlists %}
+        p.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}');
+        {% endfor %}
+
+        {% if collection %}
+        var anchor = jQuery('#_add_to_playlist');
+        if(anchor.length){
+        anchor.click(function(){
+            p.showAddResourceToPlaylist(anchor,'collection','{{collection.id}}',gettrans('collection added to the selected playlist'));return false;
+        });
+        }
+        {% endif %}
+    });
+        {% endif %}
+</script>
+{% endblock %}
+
+{% if collection %}
+
+{% block title %}
+    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> 
+    Collection : 
+    <a href="{% url telemeta-collection-detail collection.public_id %}">{{ collection.title }}</a>
+{% endblock %}
+
+{% block title_buttons %}
+  <div class="fixedWidthAsPlayer">
+    {% if user.is_authenticated and perms.telemeta.change_mediacollection %}
+      <a href="{% url telemeta-collection-edit collection.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
+      <a href="{% url telemeta-collection-copy collection.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
+      <a href="{% url telemeta-collection-additem collection.public_id %}" class="component_icon button icon_add">{% trans "Add item" %}</a>
+     {% endif %}
+    {% if user.is_authenticated %}
+    <a href=# id ="_add_to_playlist" class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
+    {% endif %}
+    <a href="{% url telemeta-collection-dublincore collection.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
+   </div>
+{% endblock %}
+
+{% block content %}
+    <div class="{% if collection.has_mediafile %}{% if public_access or perms.telemeta.can_play_all_items %}with-rightcol{% endif %}{% endif %}">
+        {% if collection.has_mediafile %}
+        {% if public_access or perms.telemeta.can_play_all_items %}
+        <div id="rightcol">
+            <div id="collection_player">
+             <div class="title">
+              <h3><b>{% trans "Listen to this collection" %}</b>
+              (<a href="{% url telemeta-collection-m3u collection.public_id %}">M3U</a>,
+              <a href="{% url telemeta-collection-xspf collection.public_id %}">XSPF</a>)</h3>
+             </div>
+                <!-- This is Jeroen Wijering's Flash MP3 Player, 
+                  under CC Attribution-NonCommercial-ShareAlike 2.0 license
+                  from: http://www.jeroenwijering.com/?item=Flash_MP3_Player-->
+                <p id="collection_player_c">
+                  <a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.
+                </p>
+                <script type="text/javascript">
+                  var so = new SWFObject('{% url telemeta-swf "mp3player.swf" %}','playlist','362','200','7');
+                  so.addVariable("file","{% url telemeta-collection-xspf collection.public_id %}");
+                  so.addVariable("displayheight","0");
+                  so.addParam("wmode", "opaque");
+                  so.write('collection_player_c');
+                </script> 
+            </div>
+        </div>
+        {% endif %}
+        {% endif %}
+      {% block infos %}
+        <div class="intro">
+            <span><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% if collection.items.count %}{{ collection.items.count }} {% ifequal collection.items.count 1 %}item{% else %}items{% endifequal %}{% else %}No item{% endif %}</span>
+        </div>
+        <div class="infos">
+        {% block general_info %}
+            <dl class="listing">
+                {% dl_field collection "reference" %}
+                {% dl_field collection "title"  %}
+                {% dl_field collection "alt_title" %}
+                {% dl_field collection "creator" placeholder %}
+                {% dl_field collection "recording_context" %}
+                <dt>{% trans "Recording period" %}</dt>
+                    <dd>{% if collection.recorded_from_year %}{{ collection.recorded_from_year }}{% endif %}{% if collection.recorded_from_year and collection.recorded_to_year %} - {% endif %}{% if  collection.recorded_to_year %}{{ collection.recorded_to_year}}{% endif %}</dd>
+                {% dl_field collection "year_published" placeholder %}
+            </dl>
+        {% endblock general_info %}
+        </div>
+        <div class="extraInfos">
+        {% block geoethnic_data %}
+            <div>
+                <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4>
+                <div>
+                    <dl class="listing">
+                        {% dl_field collection "countries" join with ", " %}
+                        {% dl_field collection "ethnic_groups" join with ", " placeholder %}
+                    </dl>
+                </div>
+            </div>
+        {% endblock geoethnic_data %}
+        </div>
+        <div class="extraInfos">
+        {% block legal_data %}
+            <div>
+                <h4><a href="#">{% trans "Legal notices" %}</a></h4>
+                <div>
+                    <dl class="listing">
+                        {% if collection.collector_is_creator %}
+                          {% if collection.creator %}
+                          <dt>{% trans "Recordist" %}</dt><dd>{{ collection.creator }}</dd>
+                          {% endif%}
+                        {% else %}
+                        {% dl_field collection "collector" %}
+                        {% endif %}
+                        {% dl_field collection "publisher" %}
+                        {% dl_field collection "publisher_collection" %}
+                        {% dl_field collection "publisher_serial" %}
+                        {% dl_field collection "booklet_author" %}
+                        <dt>{% trans "Bibliographic references" %}</dt>
+                        <dd>{{ collection.external_references|html_line_break|safe }}</dd>
+                        {% dl_field collection "doctype_code" %}
+                        {% dl_field collection "public_access_label" %}
+                        {% dl_field collection "legal_rights" %}
+                    </dl>
+                </div>
+            </div>
+        {% endblock legal_data %}
+        </div>
+        <div class="extraInfos">
+        {% block archive_data %}
+            <div>
+                <h4><a href="#">{% trans "Archiving data" %}</a></h4>
+                <div>
+                    <dl class="listing">
+                        {% dl_field collection "acquisition_mode" %}
+                        {% dl_field collection "cnrs_contributor" %}
+                        {% dl_field collection "metadata_author" %}
+                        <dt>{% trans "Related documentation" %}</dt>
+                        <dd>{{ collection.booklet_description|html_line_break|safe }}</dd>
+                        {% dl_field collection "publishing_status" %}
+                        {% dl_field collection "alt_ids" %}
+                        <dt>{% trans "Comments" %}</dt>
+                        <dd>{{ collection.comment|html_line_break|safe }}</dd>
+                        {% dl_field collection "metadata_writer" %}
+                        {% dl_field collection "travail" %}
+                        {% dl_field collection "items_done" %}
+                        {% dl_field collection "conservation_site" %}
+                    </dl>
+                </div>
+            </div>
+        {% endblock archive_data %}
+        </div>
+        <div class="extraInfos">
+        {% block technical_data %}
+            <div>
+                <h4><a href="#">{% trans "Technical data" %}</a></h4>
+                <div>
+                    <dl class="listing">
+                        {% dl_field collection "code" %}
+                        {% dl_field collection "old_code" %}
+                        <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd>
+                        {% dl_field collection "approx_duration" %}
+                        {% dl_field collection "computed_duration" %}
+                        {% dl_field collection "physical_items_num" %}
+                        <div class="wazing"></div>
+                        <dt>{% trans "Number of items" %}</dt><dd>{{ collection.items.count }}</dd>
+                        {% dl_field collection "physical_format" %}
+                        {% dl_field collection "ad_conversion" %}
+                    </dl>
+                </div>
+            </div>
+        {% endblock technical_data %}
+        </div>
+        
+        <div class="extraInfos">
+            {% block related %}
+                {% include "telemeta/inc/collection_related.html" %}
+            {% endblock related %}
+        </div>
+        
+        <div class="extraInfos">
+        <h4><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> Items</h4>
+        {% with "1" as location_name %}
+            {% include "telemeta/inc/mediaitem_list.html" %}
+        {% endwith %}
+        </div>
+
+        {% endblock infos %}
+    </div>
+{% endblock %}
+
+{% block delete %}
+{% if user.is_authenticated and perms.telemeta.delete_mediacollection %}
+ <a href="#" onclick="if(confirm(gettrans('delete the collection permanently?'))){window.location.href='{% url telemeta-collection-delete collection.public_id %}';};return false;"
+        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
+{% endif %}
+
+{% endblock %}
+
+{% else %}
+    <p>No such collection</p>
+{% endif %}
+
index 297fc2a138d02abe49c1c0a2ccc5ae36cc626a36..ea7c7af326e4d98edb355cf58bd020141f416069 100644 (file)
@@ -1 +1,23 @@
-{% extends "telemeta_default/collection_detail_dc.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Collection" %}{{collection|prepend:': '}} - {{ block.super }}{% endblock %}
+
+{% if collection %}
+{% block title %}
+<h1>Collection: {{ collection }}</h1>
+{% endblock %}
+{% block title_buttons %}
+    <a class="component_icon button icon_previous" href="{% url telemeta-collection-detail collection.public_id %}">{% trans "Normal View" %}</a>
+{% endblock %}
+
+{% block content %}
+{% with collection|to_dublincore as resource %}
+{% include "telemeta/inc/dublincore.html" %}
+{% endwith %}
+
+{% endblock %}
+{% else %}
+    <p>{% trans "No such collection" %}</p>
+{% endif %}
index e2b1e0933a23f349418a8161f547d8e27e76463d..6cd84fad85522485ed6cf6f3f5d328a98fce33d1 100644 (file)
@@ -1 +1,38 @@
-{% extends "telemeta_default/collection_edit.html" %}
+{% extends "telemeta/collection_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block title %}
+    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : {{ collection }}
+{% endblock %}
+{% block title_buttons %}
+    <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block infos %}
+     <div class="infos">
+      <form method="post" id="_editCollectionForm" action="">{% csrf_token %}
+       <table>
+       <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
+       {% for field in form %}
+       <tr>
+        {% if field.html_name == "copied_from_item" or field.html_name == "doctype_code" %}
+            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+        {% else %}
+            <tr><td class="error">{{ field.errors }}</td></tr>
+            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+        {% endif %}
+        </tr>
+       {% endfor %}
+       </table>
+        <div align="center" style="margin-top:3ex;">
+         <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+         <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editCollectionForm').submit(); return false;">{% trans "Save" %}</a>
+        </div>
+      </form>
+     </div>
+{% endblock infos%}
+
+{% block delete %}
+{% endblock %}
index 50993a547a907330c1bd9a091a65c34c2e2c00e0..64ffd7ce1d6754013ed2864568c21f0188186d22 100644 (file)
@@ -1 +1,27 @@
-{% extends "telemeta_default/collection_list.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Media Collections" %} - {{ block.super }}{% endblock %}
+
+{% block title%}
+ <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> {% trans "Media Collections" %}
+{% endblock %}
+
+{% block title_buttons %}
+     <a href="{% url telemeta-collections %}" class="component_icon button icon_filter">{% trans "All" %}</a>
+     <a href="{% url telemeta-collections-unpublished %}" class="component_icon button icon_filter">{% trans "Unpublished" %}</a>
+     <a href="{% url telemeta-collections-published %}" class="component_icon button icon_filter">{% trans "Published" %}</a>
+     <a href="{% url telemeta-collections-sound %}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+    {% if user.is_authenticated and perms.telemeta.add_mediacollection %}
+      <a href="{% url telemeta-collection-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
+    {% endif %}
+{% endblock %}
+
+{% block content %}
+{% with object_list as collections %}
+<div class="fullpage">
+{% include "telemeta/inc/collection_list.html" %}
+</div>
+{% endwith %}
+{% endblock %}
index 2e159910305bbb170471a7f880dfdf0dfbc831ad..4dd6b8cd0d78aed90f22806485a431d32977e41b 100644 (file)
@@ -1 +1,47 @@
-{% extends "telemeta_default/collection_related_edit.html" %}
+{% extends "telemeta/collection_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block extra_javascript %}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : {{ collection }}
+{% endblock %}
+
+{% block title_buttons %}
+ <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block content %}
+  {% block infos %}    
+    <div class="infos">
+     <form enctype="multipart/form-data" method="post" id="_editMediaCollectionRelatedFileForm" action="">{% csrf_token %}
+
+    {{ formset.management_form }}
+    {% for form in formset.forms %}
+      <hr>
+      <table>
+        <tr><td><b>{% trans "Media" %} :</b><td></td></tr>
+        {% for field in form %}
+        <tr><td class="error">{{ field.errors }}</td></tr>
+        <tr>
+            {% if "media_collection" in field.html_name or "id" in field.html_name or "collection" in field.html_name or "mime_type" in field.html_name %}
+                <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+            {% else %}
+                <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
+            {% endif %}
+        </tr>
+        {% endfor %}
+       </table>
+       <br />
+    {% endfor %}
+      <div align="center">
+        <a href="{% url telemeta-collection-detail collection.public_id %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+        <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editMediaCollectionRelatedFileForm').submit(); return false;">{% trans "Save" %}</a>
+       </div>
+     </form>
+    </div>
+  {% endblock infos %}
+{% endblock content %}
index 5a3317007df837b18001e3be692ddfeb496065bc..317284b72b7cf3e1a791e290920dab5f7ca310dd 100644 (file)
@@ -1 +1,23 @@
-{% extends "telemeta_default/collection_xspf.xml" %}
+{% extends "telemeta/base_xspf.xml" %}
+{% load telemeta_utils %}
+
+{% block listinfo %} 
+{% with collection.to_dublincore.flatten as dc %}
+  <creator>{{ dc.creator }}</creator>
+  <title>{{ dc.title }}</title>
+  <info>http://{{ host }}{% url telemeta-collection-detail collection.public_id %}</info>
+{% endwith %}
+{% endblock %}
+
+{% block tracklist %}
+{% for item in collection.items.all %}
+    <track>
+      <title>{{ item }}</title>
+      <meta rel="type">mp3</meta>
+      <location>http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}</location>
+      <duration>{{ item.computed_duration.as_seconds|mul:1000 }}</duration>
+      <info>http://{{ host }}{% url telemeta-item-detail item.public_id %}</info>
+    </track>
+{% endfor %}
+{% endblock %}
+
index 15159c6ed4d4460f8da32ac59321fff0d6989523..0783deeab673e95f29e1fd06664c5ae6a8f29d3e 100644 (file)
@@ -1,2 +1,23 @@
-{% extends "telemeta_default/country_info.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
 
+<h2>{{ country }}</h2>
+<p>
+<a href="{% url telemeta-geo-country-items continent.flatname,country.flatname %}">
+{{ country.items|resources_num }}
+</a>
+{% trans "in" %}
+<a href="{% url telemeta-geo-country-collections continent.flatname,country.flatname %}">
+{{ country.collections|resources_num }}
+</a>
+</p>
+<!--
+{% with country.items.all.ethnic_groups as ethnic_groups %}
+{% if ethnic_groups %}
+<p>
+<b>{% trans "Populations / Social groups" %}:</b>
+{{ ethnic_groups|join:', ' }}
+</p>
+{% endif %}
+{% endwith %}
+-->
index dbe28b16801b1331990ac7b167fe286d223ecc6e..56f17ddefa3ba802ad2da0d420906ee5cc5560aa 100644 (file)
@@ -1 +1,52 @@
-{% extends "telemeta_default/enumeration_edit.html" %}
+{% extends "telemeta/admin.html" %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Enumeration" %}: {{ enumeration_name|capfirst }} - {{ block.super }}{% endblock %}
+
+{% block tabcontents %}
+ <h4>{% trans "Enumeration" %}: {{ enumeration_name|capfirst }}</h4>
+
+ <form class="addnew" id="_addenum" method="POST"
+        action="{% url telemeta-enumeration-add enumeration_id %}">{% csrf_token %}
+  <fieldset>
+   <legend>{% trans "Add entry" %}</legend>
+   <div class="field">
+    <label>{% trans "Value" %}: <input id="id_value_add" type="text" name="value"></label>
+
+   </div>
+   <div class="buttons">
+    <br />
+    <a href="#" class="component_icon button icon_add"
+      onclick="document.getElementById('_addenum').submit(); return false;">{% trans "Add" %}</a>
+   </div>
+  </fieldset>
+ </form>
+ {% if enumeration_values %}
+ <form id="_updateenum" method="POST" action="{% url telemeta-enumeration-update enumeration_id %}">{% csrf_token %}
+  <table class="listing">
+   <thead>
+    <tr><th class="sel">&nbsp;</th><th>{% trans "Value"%}</th>
+
+    </tr>
+   </thead><tbody>
+    {% for record in enumeration_values %}
+    <tr>
+     <td><input type="checkbox" name="sel" value="{{record.id}}" /></td>
+     <td><a href="{% url telemeta-enumeration-record-edit enumeration_id,record.id %}">
+        {{record.value}}</a></td>
+    </tr>
+    {% endfor %}
+    </tbody>
+  </table>
+  <div class="buttons">
+   <br />
+   <a href="#" class="component_icon button icon_cancel"
+      onclick="document.getElementById('_updateenum').submit(); return false;">{% trans "Remove selected items" %}</a>
+  </div>
+ </form>
+ {% else %}
+    <p class="help">{% trans "This enumeration is empty" %}</p>
+ {% endif %}
+
+  <br style="clear: right"/>
+{% endblock %}
index 67bbc4404ad8decd510ee9afbba7cfe8d0368416..103f9ffe7e4dc1d77cfe002f633ae7c4a61bb730 100644 (file)
@@ -1 +1,28 @@
-{% extends "telemeta_default/enumeration_edit_value.html" %}
+{% extends "telemeta/admin.html" %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Enumeration" %}: {{ enumeration_name|capfirst }} - {{ block.super }}{% endblock %}
+
+{% block tabcontents %}
+ <h4>{% trans "Enumeration" %}: {{ enumeration_name|capfirst }}</h4>
+
+ <form class="mod" id="addenum" method="post"
+    action="{% url telemeta-enumeration-record-update enumeration_id,enumeration_record.id %}">{% csrf_token %}
+  <fieldset>
+   <legend>{% trans "Modify an entry" %}</legend>
+   <div class="field">
+    <label>{% trans "Value" %}: <input id="id_value_edit" type="text" name="value" value="{{enumeration_record.value}}" /></label>
+
+   </div>
+   <br />
+   <div class="buttons">
+        <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('addenum').submit(); return false;">{% trans "Save" %}</a>
+        <a href="{% url telemeta-enumeration-edit enumeration_id %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+   </div>
+  </fieldset>
+ </form>
+  <br style="clear: right"/>
+
+{% endblock %}
index 9ec14df7026d3c8b61c6d0b15e6565c06940b10a..6b2b55f476e870cf2b5d7a825ae60b20544536a3 100644 (file)
@@ -1 +1,5 @@
-{% extends "telemeta_default/flatpage.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% block content %}
+{{ page_content|render_flatpage }}
+{% endblock %}
index c0f0bb4f8aadb73524fb2bdd10176fdcb95c8e4a..6e36b610f51e2d3d498af8798502d54ebc298a41 100644 (file)
@@ -1 +1,53 @@
-{% extends "telemeta_default/geo_continents.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
+
+{% block extra_javascript %}
+{% if gmap_key %}
+<script src="http://www.google.com/jsapi?key={{ gmap_key }}" type="text/javascript"></script>
+<script src="{% url telemeta-js "resourcemap.js" %}" type="text/javascript"></script>
+<script type="text/javascript">
+var resourceMap = new ResourceMap('.continents', {
+    'countryInfoUri': '/geo/country_info/RESOURCEID/'
+});
+</script>
+{% endif %}
+{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "world_red.png" %}" alt="geo-navigator" style="vertical-align:middle" /> {% trans "Geographic Navigator" %}
+{% endblock %}
+
+{% block title_buttons %}
+        {% if continents %}
+        <a href="#" onclick="resourceMap.toggle('map'); return false;" class="component button">{% trans "Map" %}</a> |
+        <a href="#" onclick="resourceMap.toggle('list'); return false;" class="component button">{% trans "List" %}</a>
+        {% endif %}
+{% endblock %}
+
+{% block content %}
+{% if continents %}
+<ul class="continents">
+{% for group in continents %}
+  <li class="name {% if not forloop.counter0|divisibleby:"2" %}odd{% endif %}"><b><a href="{% url telemeta-geo-countries group.continent.flatname %}">{{ group.continent }}</a></b>
+    <ul>
+    {% for country in group.countries %}
+      <li id="resource-{{country.id}}" class="country_name resourcemap-element">
+        <a href="{% url telemeta-geo-country-collections group.continent.flatname,country.flatname %}">
+          <span class="resourcemap-name">{{ country }}</span></a>
+        {% if not country.latitude|is_none and not country.longitude|is_none %}
+        <input type="hidden" class="resourcemap-lat" value="{{country.latitude}}" />
+        <input type="hidden" class="resourcemap-lng" value="{{country.longitude}}" />
+        {% endif %}
+      </li>
+    {% endfor %}
+    </ul>
+  </li>
+{% endfor %}
+</ul>
+{% else %}
+<p>No data</p>
+{% endif %}
+{% endblock %}
index 23d012416ca36597ff0a8b0b3fa46ee9ddf6a821..1c920153f4c7a7dbaa984fdd5232547175b669dd 100644 (file)
@@ -1 +1,38 @@
-{% extends "telemeta_default/geo_countries.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{{ continent }} - {% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "world_red.png" %}" alt="geo-countries" style="vertical-align:middle" /> <a href="{% url telemeta-geo-continents %}">{% trans "World" %}</a> / {{ continent }}
+{% endblock title %}
+
+{% block content %}
+<table class="listing">
+    <tr>
+        <th>{% trans "Country" %}</th>
+        <th>{% trans "Number of collections" %}</th>
+        <th>{% trans "Number of items" %}</th>
+    </tr>
+    {% for country in countries %}
+    <tr>
+    <td>{{ country }}</td>
+    <td>
+    {% with country.collections.count as num %}
+    <a href="{% url telemeta-geo-country-collections continent.flatname,country.flatname %}">
+    {% blocktrans count num as counter %}1 collection{% plural %}{{ counter }} collections{% endblocktrans %}
+    </a>
+    {% endwith %}
+    </td>
+    <td>
+    {% with country.items.count as num %}
+    <a href="{% url telemeta-geo-country-items continent.flatname,country.flatname %}">
+    {% blocktrans count num as counter %}1 item{% plural %}{{ counter }} items {% endblocktrans %}
+    </a>
+    {% endwith %}
+    </td>
+    </tr>  
+{% endfor %}
+</table>
+{% endblock %}
index 86e9b5dd72a05a04cc1cbcaa77303a0e9eb37bf2..f1da15cc56a38799e2aedd105335733032d4b74e 100644 (file)
@@ -1 +1,18 @@
-{% extends "telemeta_default/geo_country_collections.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{{ country }} - {% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+<img src="{% url telemeta-images "world_red.png" %}" alt="geo-country" style="vertical-align:middle" /> <a href="{% url telemeta-geo-continents %}">{% trans "World" %}</a> /
+  <a href="{% url telemeta-geo-countries continent.flatname %}">{{ continent }}</a> / {{ country }}
+{% endblock title %}
+
+{% block content %}
+{% with object_list as collections %}
+<div class="fullpage">
+{% include "telemeta/inc/collection_list.html" %}
+</div>
+{% endwith %}
+{% endblock %}
index ca2104ff82dd72c7fcca9425cbc28730ef376acb..d1e18299f7d7ee88f77ca7cde6bdd5ceb5e00cdd 100644 (file)
@@ -1 +1,19 @@
-{% extends "telemeta_default/geo_country_items.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{{ country }} - {% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+<a href="{% url telemeta-geo-continents %}">{% trans "World" %}</a> /
+  <a href="{% url telemeta-geo-countries continent.flatname %}">{{ continent }}</a> 
+  / {{ country }}
+{% endblock title %}
+
+{% block content %}
+{% with object_list as items %}
+<div class="fullpage">
+{% include "telemeta/inc/mediaitem_list.html" %}
+</div>
+{% endwith %}
+{% endblock %}
index f415f74b2d41375955dbbef071534c0ea7744040..8b2bf7b73ec60b0756df6acfa2a83db015b1871c 100644 (file)
@@ -1 +1,96 @@
-{% extends "telemeta_default/home.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block extra_javascript %}
+<script src="{% url telemeta-js "popupdiv-min.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
+<script>
+    jQuery(window).ready(function(){
+        var p = playlistUtils;
+        var a = jQuery('#_new_playlist'); 
+        a.unbind('click').click(function(){p.showAdd(a);return false;});
+    });
+   
+</script>
+{% endblock %}
+
+{% block content %}
+<div id="module-set" style="width: 33%">
+    {% block modules %}
+    {% include "telemeta/inc/module_revisions.html" %}
+    {% endblock %}
+</div>
+<div class="home-description">
+    <h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" /> {% trans "Playlists" %}</h1>
+    <a href=# id="_new_playlist" style="float:right" class="component_icon button icon_add">
+        {% trans "Add" %}</a>
+    {% for playlist in playlists %}
+    <table class="listing" style="width:100%;margin-top: 3em">
+        <tr>
+            <td style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 100%">{{ playlist.playlist.title }}</td>
+            <td style="width:66ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
+                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'collections' %}" class="component_icon button icon_csv">CSV Collections</a>
+                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'items' %}" class="component_icon button icon_csv">CSV Items</a>
+                <a href="#" id="{{playlist.playlist.public_id}}" onclick="playlistUtils.remove(this.id);return false;" class="component_icon button icon_cancel">{% trans "Delete" %}</a>
+            </td>
+        </tr>
+        {% if playlist.playlist.description %}
+         <tr>
+          <td colspan="2" style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 80%">{{ playlist.playlist.description }}</td>
+         </tr>
+        {% endif %}  
+    </table>
+    <table class="listing" width="100%">
+        <tr>
+            <th class="highlight">{% trans "Title" %}</th>
+            <th>{% trans "Type" %}</th>
+            <th>{% trans "Code" %}</th>
+            <th>{% trans "Recordist" %}</th>
+            <th>{% trans "Recording period" %}</th>
+            <th>{% trans "Sound" %}</th>
+            <th>{% trans "Action" %}</th>
+        </tr>
+        {% for resource in playlist.resources %}
+        <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+            <td>
+                {% if resource.type == "item" and not resource.element == None %}
+                <a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
+                {% endif %}
+                {% if resource.type == "collection" and not resource.element == None %}
+                <a href="{% url telemeta-collection-detail resource.element.public_id %}">{% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %}</a>
+                {% endif %}
+                {% if resource.type == "marker" and not resource.element == None  %}
+                <a href="{% url telemeta-item-detail-marker resource.element.public_id %}">{{ resource.element }}</a>
+                {% endif %}
+                {% if resource.element == None %}{% trans "deleted" %}{% endif %}
+            </td>
+            <td>{{ resource.type }}</td>
+            <td>
+                {{ resource.element.public_id }}
+            </td>
+            <td>{{ resource.element.apparent_collector }}</td>
+
+            <td>
+                {% if resource.element.recorded_from_date %}
+                {{ resource.element.recorded_from_date.year }}
+                {% if resource.element.recorded_to_date and not resource.element.recorded_to_date.year|equals:resource.element.recorded_from_date.year %}
+                - {{ resource.element.recorded_to_date.year }}
+                {% endif %}
+                {% endif %}
+            </td>
+            <td align="center" style="vertical-align:middle">
+                {% if resource.element.file or resource.element.has_mediafile %}
+                <img src="{% url telemeta-images "ok.png" %}" alt="yes" style="vertical-align:middle" /></a>
+                {% endif %}
+            </td>
+            <td style="vertical-align:middle">
+                <a href="#" onclick="playlistUtils.removeResource('{{resource.public_id}}');return false;" class="component_icon button icon_cancel" style="padding: 4px 12px;"></a>
+            </td>
+        </tr>
+        {% endfor %}
+    </table>
+    {% endfor %}
+</div>
+{% endblock %}
+
diff --git a/telemeta/templates/telemeta/inc/children_list.html b/telemeta/templates/telemeta/inc/children_list.html
new file mode 100644 (file)
index 0000000..0250924
--- /dev/null
@@ -0,0 +1,37 @@
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% if children %}
+
+{% if hits %}
+<p class="pagination">
+{% blocktrans %}{{ resource.children_type|capitalize }} {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
+| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
+</p>
+{% endif %}
+
+<table class="listing">
+<tr>
+    <th class="highlight">{% trans "Title" %}</th>
+    <th>{% trans "Description" %}</th>
+    <th>{% trans "Code" %}</th>
+    <th>{% trans "Reference" %}</th>
+</tr>
+{% for child in children %}
+{% if child.code %}
+<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+    <td class="highlight">
+        <a href="{% url telemeta-resource-detail resource.children_type child.public_id %}">{{ child.title }}</a>
+    </td>
+    <td>{{ children.code }}</td>
+    <td>{{ children.reference }}</td>
+</tr>
+{% endif %}
+{% endfor %}
+</table>
+
+{% else %}
+    <p>{% trans "No resources" %}</p>
+
+{% endif %}
+
index e5ca786c079337ae4b4d383e893451f10a69f1d9..24c6865a4e021457fc24727943778b43413397b8 100644 (file)
@@ -1 +1,49 @@
-{% extends "telemeta_default/inc/collection_list.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+{% if collections %}
+{% if hits %}
+
+<p class="pagination">
+{% blocktrans %}Collections {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
+| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
+</p>
+{% endif %}
+<table class="listing">
+<tr>
+    <th class="highlight">{% trans "Title" %}</th>
+    <th>{% trans "Code" %}</th>
+    <th>{% field_label "MediaCollection" "creator" %}</th>
+    <th>{% trans "Recordist" %}</th>
+    <th>{% trans "Recording period" %}</th>
+    <th>{% trans "Sound" %}</th>
+</tr>
+{% for collection in collections %}
+<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+    <td class="highlight">
+        <a href="{% url telemeta-collection-detail collection.public_id %}">{{ collection.title }}</a>
+    </td>
+    <td>
+        {{ collection.code|default:collection.old_code }}
+    </td>
+    <td>{{ collection.creator }}</td>
+    <td>{{ collection.apparent_collector }}</td>
+    <td>
+    {% if collection.recorded_from_year %}
+        {{ collection.recorded_from_year }}
+        {% if collection.recorded_to_year and not collection.recorded_to_year|equals:collection.recorded_from_year %}
+            - {{ collection.recorded_to_year }}
+        {% endif %}
+    {% endif %}
+    </td>
+    <td>
+      {% if collection.has_mediafile %}
+       <img src="images/ok.png" alt="yes" style="vertical-align:middle" />
+      {% endif %}
+    </td>
+</tr>
+{% endfor %}
+</table>
+{% else %}
+    <p>{% trans "No collection" %}</p>
+{% endif %}
+
index 93c46f4ce3fb0cb574bc6092c8d116c87ec6cd19..14a3513a371e5bbe876cdedf239a98558ba58dbe 100644 (file)
@@ -1 +1,83 @@
-{% extends "telemeta_default/inc/collection_related.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+        <div>
+            <h4><a href="#">{% trans "Related media" %}</a></h4>
+            {% if related_media %}
+            <div>
+                <table class="instruments" width="100%">
+                    <thead>
+                        <tr>
+                            <td>{% trans "Media" %}</td>
+                            <td>{% trans "Preview" %}</td>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        {% for media in related_media %}
+                        <tr>
+                            <td style="font-size: 1em;">
+                            <dl class="listing">
+                                <dt>{% trans "Title" %}</dt>
+                                <dd>
+                                    {% if media.url %}
+                                        <a href="{{ media.url }}" target="_blank">
+                                        {% if media.title %}
+                                            {{ media.title }}</a>
+                                        {% else %}
+                                            {{ media.url|get_filename }}</a>
+                                        {% endif %}
+                                    {% else %}
+                                        <a href="{% url telemeta-collection-related collection.public_id media.id %}" target="_blank">
+                                        {% if media.title %}
+                                            {{ media.title }}</a>
+                                        {% else %}
+                                            {{ media.file|get_filename }}</a>
+                                        {% endif %} 
+                                    {% endif %}
+                                </dd>
+                                <dt>{% trans "Description" %}</dt>
+                                <dd>{{ media.description|html_line_break|safe }}</dd>
+                                <dt>{% trans "Credits" %}</dt>
+                                <dd>{{ media.credits }}</dd>
+                                {% dl_field media "mime_type" %}
+                                <dt>{% trans "URL" %}</dt>
+                                <dd>
+                                {% if media.url %}
+                                    <a href="{{ media.url }}" target="_blank">{{ media.url }}</a>
+                                {% else %}
+                                    {% if media.file %}
+                                    <a href="{% url telemeta-collection-related collection.public_id media.id %}" target="_blank">
+                                    {% url telemeta-collection-related collection.public_id media.id %}
+                                    </a>
+                                    {% endif %}
+                                {% endif %}
+                                </dd>
+                            </dl>
+                            </td>
+
+                            <td style="padding-bottom: 1em;">{% if media.is_image %}
+                                  {% if media.url %}
+                                   <a href="{{ media.url }}">
+                                   <img src="{{ media.url }}" style="max-width: 420px; max-height: 200px;" /></a>
+                                  {% else %}
+                                   <a href="{% url telemeta-collection-related collection.public_id media.id %}">
+                                   <img src="{% url telemeta-collection-related collection.public_id media.id %}" style="max-width: 420px; max-height: 200px;" /></a>
+                                   {% endif %}
+                                {% else %}
+                                {% if media.url %}
+                                 {% if "youtu" in media.url %}
+                                 <iframe width="251" height="200" src="{{ media.url|get_youtube }}" frameborder="0" allowfullscreen></iframe>
+                                 {% endif %}
+                                {% endif %}
+                                {% endif %}
+                            </td>
+                        </tr>
+                        {% endfor %}
+                    </tbody>
+                </table>
+            </div>
+            {% endif %}
+            {% if user.is_authenticated and perms.telemeta.change_mediacollection %}
+                <br /><a href="{% url telemeta-collection-related_edit collection.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "related media"%}</a>
+            {% endif %}
+        </div>
index 2c6134bb0100960edff37fbec9c34b5c26a476aa..9d2a151f9e806c33fb9a161bb08e52454357364c 100644 (file)
@@ -1,2 +1,21 @@
-{% extends "telemeta_default/inc/dublincore.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
 
+    <h4 class="dublincore">{% trans "Dublin Core Metadata" %}</h4>
+    <dl class="dublincore">
+        <dt class="caption"><span>Element</span>Refinement</dt><dd class="caption">Value</dd>
+        {% for element in resource.elements %}
+        <dt><span>{{ element.name }}</span>{{ element.refinement|default:"&nbsp;" }}</dt>
+        <dd>
+        {% if element.related|is_item or element.related|is_collection %}
+            {% if element.related|is_item %}
+            <a href="{% url telemeta-item-dublincore element.related.public_id %}">{{ element.value }}</a>
+            {% else %}
+            <a href="{% url telemeta-collection-dublincore element.related.public_id %}">{{ element.value }}</a>
+            {% endif %}
+        {% else %}
+            {{ element.value }}
+        {% endif %}
+        </dd>
+        {% endfor %}
+    </dl>
index fd2269c318b073902e7851fbead7921d81c408e5..cc09245c4017c6a7f658356bc48c70dd56a7a44a 100644 (file)
@@ -1 +1,60 @@
-{% extends "telemeta_default/inc/mediaitem_list.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+{% if items %}
+
+{% if hits %}
+<p class="pagination">
+{% blocktrans %}Items {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
+| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
+</p>
+{% endif %}
+
+<table class="listing">
+<tr>
+    <th class="highlight">{% trans "Title" %}</th>
+    <th>{% trans "Code" %}</th>
+    <th>{% trans "Recordist" %}</th>
+    {% if location_name %}
+    <th>{% trans "Location" %}</th>
+    {% else %}
+    <th>{% trans "Country/Continent" %}</th>
+    {% endif %}
+    <th>{% trans "Year of recording" %}</th>
+    <th>{% trans "Sound" %}</th>
+</tr>
+{% for item in items %}
+<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+    <td class="highlight">
+        <a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>
+    </td>
+    <td>
+        {{ item.code|default:item.old_code }}
+    </td>
+    <td>{{ item.apparent_collector }}</td>
+    {% if location_name %}
+    <td>{{ item.location.name }}</td>
+    {% else %}
+    <td>{{ item.country_or_continent|default:'&nbsp;' }}</td>
+    {% endif %}
+    <td>
+    {% if item.recorded_from_date %}
+        {{ item.recorded_from_date.year }}
+        {% if item.recorded_to_date and not item.recorded_to_date.year|equals:item.recorded_from_date.year %}
+            - {{ item.recorded_to_date.year }}
+        {% endif %}
+    {% endif %}
+    </td>
+    <td align="center">
+        {% if item.file %}
+         <a href="{% url telemeta-item-detail item.public_id %}">
+          <img src="images/ok.png" alt="yes" style="vertical-align:middle" /></a>
+        {% endif %}
+    </td>
+</tr>
+{% endfor %}
+</table>
+
+{% else %}
+    <p>{% trans "No item" %}</p>
+{% endif %}
+
index 69cbd76852e921f0774a887026941b9a5a0bed6d..ecb5448ee8c42548f3e76fadf5af81772f0e3206 100644 (file)
@@ -1 +1,83 @@
-{% extends "telemeta_default/inc/mediaitem_related.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+        <div>
+            <h4><a href="#">{% trans "Related media" %}</a></h4>
+            {% if related_media %}
+            <div>
+                <table class="instruments" width="100%">
+                    <thead>
+                        <tr>
+                            <td>{% trans "Media" %}</td>
+                            <td>{% trans "Preview" %}</td>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        {% for media in related_media %}
+                        <tr>
+                            <td style="font-size: 1em;">
+                            <dl class="listing">
+                                <dt>{% trans "Title" %}</dt>
+                                <dd>
+                                    {% if media.url %}
+                                        <a href="{{ media.url }}" target="_blank">
+                                        {% if media.title %}
+                                            {{ media.title }}</a>
+                                        {% else %}
+                                            {{ media.url|get_filename }}</a>
+                                        {% endif %}
+                                    {% else %}
+                                        <a href="{% url telemeta-item-related item.public_id media.id %}" target="_blank">
+                                        {% if media.title %}
+                                            {{ media.title }}</a>
+                                        {% else %}
+                                            {{ media.file|get_filename }}</a>
+                                        {% endif %} 
+                                    {% endif %}
+                                </dd>
+                                <dt>{% trans "Description" %}</dt>
+                                <dd>{{ media.description|html_line_break|safe }}</dd>
+                                <dt>{% trans "Credits" %}</dt>
+                                <dd>{{ media.credits }}</dd>
+                                {% dl_field media "mime_type" %}
+                                <dt>{% trans "URL" %}</dt>
+                                <dd>
+                                {% if media.url %}
+                                    <a href="{{ media.url }}" target="_blank">{{ media.url }}</a>
+                                {% else %}
+                                    {% if media.file %}
+                                    <a href="{% url telemeta-item-related item.public_id media.id %}" target="_blank">
+                                    {% url telemeta-item-related item.public_id media.id %}
+                                    </a>
+                                    {% endif %}
+                                {% endif %}
+                                </dd>
+                            </dl>
+                            </td>
+
+                            <td style="padding-bottom: 1em;">{% if media.is_image %}
+                                  {% if media.url %}
+                                   <a href="{{ media.url }}">
+                                   <img src="{{ media.url }}" style="max-width: 420px; max-height: 200px;" /></a>
+                                  {% else %}
+                                   <a href="{% url telemeta-item-related item.public_id media.id %}">
+                                   <img src="{% url telemeta-item-related item.public_id media.id %}" style="max-width: 420px; max-height: 200px;" /></a>
+                                   {% endif %}
+                                {% else %}
+                                {% if media.url %}
+                                 {% if "youtu" in media.url %}
+                                 <iframe width="251" height="200" src="{{ media.url|get_youtube }}" frameborder="0" allowfullscreen></iframe>
+                                 {% endif %}
+                                {% endif %}
+                                {% endif %}
+                            </td>
+                        </tr>
+                        {% endfor %}
+                    </tbody>
+                </table>
+            </div>
+            {% endif %}
+            {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
+                <br /><a href="{% url telemeta-item-related_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "related media"%}</a>
+            {% endif %}
+        </div>
index 2b8503fbef2136c1c341b6235c23c9bb5d266a95..5df16154424442beba19e2aac3d11f825870276b 100644 (file)
@@ -1 +1,42 @@
-{% extends "telemeta_default/inc/module_revisions.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+   <div class="module">
+    <h3><a href="{% url telemeta-rss %}">
+      <img src="{% url telemeta-images "rss.png" %}" alt="rss" style="vertical-align:middle" /></a>
+      {% trans "Last changes" %}</h3>
+      <a href="/rss" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
+    <div class="vscroll">
+    <table class="listing" bgcolor="#FFFFFF" style="width: 100%">
+      <tr>
+        <th class="highlight">{% trans "Date" %}</th>
+        <th>{% trans "Title" %}</th>
+        <th>{% trans "Type" %}</th>
+        <th>{% trans "User" %}</th>
+      </tr>
+    {% for r in revisions %}
+     <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td>{{ r.revision.time }}</td>
+        <td>
+        {% if r.element %}
+            {% if r.revision.element_type == "collection" %}
+            <a href="{% url telemeta-collection-detail r.element.public_id %}">{{ r.element.title }}</a>
+            {% endif %}
+            {% if r.revision.element_type == "item" %}
+            <a href="{% url telemeta-item-detail r.element.public_id %}">
+            {% if r.element.title != '' %}{{ r.element.title }}{% else %}{{ r.element.collection.title }} - {{ r.element.track }}{% endif %}</a>
+            {% endif %}
+            {% if r.revision.element_type == "marker" %}
+            <a href="{% url telemeta-item-detail-marker r.element.public_id %}">{{ r.element.title }}</a>
+            {% endif %}
+        {% else %}
+            {% trans "deleted" %}
+        {% endif %}
+        </td>
+        <td>{{ r.revision.element_type }}</td>
+        <td>{% if r.revision.user %}<a href="{% url telemeta-profile-detail r.revision.user.username %}">{{ r.revision.user.username }}</a>{% endif %}</td>
+      </tr>
+    {% endfor %}
+    </table>
+    </div>
+   </div>
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/inc/resource_list.html b/telemeta/templates/telemeta/inc/resource_list.html
new file mode 100644 (file)
index 0000000..2f8c199
--- /dev/null
@@ -0,0 +1,32 @@
+{% load telemeta_utils %}
+{% load i18n %}
+{% if resources %}
+{% if hits %}
+
+<p class="pagination">
+{{ type|capitalize }}{% blocktrans %} from {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
+| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
+</p>
+{% endif %}
+<table class="listing">
+<tr>
+    <th class="highlight">{% trans "Title" %}</th>
+    <th>{% trans "Description" %}</th>
+    <th>{% trans "Code" %}</th>
+    <th>{% trans "Reference" %}</th>
+</tr>
+{% for resource in resources %}
+<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+    <td class="highlight">
+        <a href="{% url telemeta-resource-detail type resource.public_id %}">{{ resource.title }}</a>
+    </td>
+    <td>{{ resource.description }}</td>
+    <td>{{ resource.code }}</td>
+    <td>{{ resource.reference }}</td>
+</tr>
+{% endfor %}
+</table>
+{% else %}
+    <p>{% trans "No resource" %}</p>
+{% endif %}
+
diff --git a/telemeta/templates/telemeta/inc/resource_related.html b/telemeta/templates/telemeta/inc/resource_related.html
new file mode 100644 (file)
index 0000000..71ada2c
--- /dev/null
@@ -0,0 +1,83 @@
+{% load i18n %}
+{% load telemeta_utils %}
+
+        <div>
+            <h4><a href="#">{% trans "Related media" %}</a></h4>
+            {% if related_media %}
+            <div>
+                <table class="instruments" width="100%">
+                    <thead>
+                        <tr>
+                            <td>{% trans "Media" %}</td>
+                            <td>{% trans "Preview" %}</td>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        {% for media in related_media %}
+                        <tr>
+                            <td style="font-size: 1em;">
+                            <dl class="listing">
+                                <dt>{% trans "Title" %}</dt>
+                                <dd>
+                                    {% if media.url %}
+                                        <a href="{{ media.url }}">
+                                        {% if media.title %}
+                                            {{ media.title }}</a>
+                                        {% else %}
+                                            {{ media.url|get_filename }}</a>
+                                        {% endif %}
+                                    {% else %}
+                                        <a href="{% url telemeta-resource-related type resource.public_id media.id %}">
+                                        {% if media.title %}
+                                            {{ media.title }}</a>
+                                        {% else %}
+                                            {{ media.file|get_filename }}</a>
+                                        {% endif %}
+                                    {% endif %}
+                                </dd>
+                                <dt>{% trans "Description" %}</dt>
+                                <dd>{{ media.description|html_line_break|safe }}</dd>
+                                <dt>{% trans "Credits" %}</dt>
+                                <dd>{{ media.credits }}</dd>
+                                {% dl_field media "mime_type" %}
+                                <dt>{% trans "URL" %}</dt>
+                                <dd>
+                                {% if media.url %}
+                                    <a href="{{ media.url }}" target="_blank">{{ media.url }}</a>
+                                {% else %}
+                                    {% if media.file %}
+                                    <a href="{% url telemeta-resource-related type resource.public_id media.id %}" target="_blank">
+                                    {% url telemeta-resource-related type resource.public_id media.id %}
+                                    </a>
+                                    {% endif %}
+                                {% endif %}
+                                </dd>
+                            </dl>
+                            </td>
+
+                            <td style="padding-bottom: 1em;">{% if media.is_image %}
+                                  {% if media.url %}
+                                   <a href="{{ media.url }}">
+                                   <img src="{{ media.url }}" style="max-width: 420px; max-height: 200px;" /></a>
+                                  {% else %}
+                                   <a href="{% url telemeta-resource-related type resource.public_id media.id %}">
+                                   <img src="{% url telemeta-resource-related type resource.public_id media.id %}" style="max-width: 420px; max-height: 200px;" /></a>
+                                   {% endif %}
+                                {% else %}
+                                {% if media.url %}
+                                 {% if "youtu" in media.url %}
+                                 <iframe width="251" height="200" src="{{ media.url|get_youtube }}" frameborder="0" allowfullscreen></iframe>
+                                 {% endif %}
+                                {% endif %}
+                                {% endif %}
+                            </td>
+                        </tr>
+                        {% endfor %}
+                    </tbody>
+                </table>
+            </div>
+            {% endif %}
+            {% if user.is_authenticated and perms.telemeta.change_mediaresource %}
+                <br /><a href="{% url telemeta-resource-related_edit type resource.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "related media"%}</a>
+            {% endif %}
+        </div>
index 09c47422f98aac124db66b98f251b30a6cc1d956..a82240a93b331ad1af4a258c2ee6924515ae975c 100644 (file)
@@ -1 +1,23 @@
-{% extends "telemeta_default/inc/user_list.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+  <table class="listing" width="100%">
+   <thead>
+    <tr><th>{% trans "User"%}</th>
+    <th>{% trans "First Name"%}</th>
+    <th>{% trans "Last Name"%}</th>
+    <th>{% trans "E-mail"%}</th>
+    <th>{% trans "Groups"%}</th>
+    </tr>
+   </thead><tbody>
+    {% for user in users %}
+    <tr>
+     <td><a href="{% url telemeta-profile-detail user.username %}">{{user.username}}</a></td>
+     <td>{{ user.first_name }}</td>
+     <td>{{ user.last_name }}</td>
+     <td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td>
+     <td>{% for group in user.groups.all %}{{ group }} {% endfor %}</td>
+    </tr>
+    {% endfor %}
+    </tbody>
+  </table>
\ No newline at end of file
index faa9b415d95361e48660cc75b6c67439aada14eb..a5bf2dc2724ac8f409bf2ea0d2c0877dea851d9c 100644 (file)
@@ -1 +1,69 @@
-{% extends "telemeta_default/index.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block content %}
+<div class="home-content">
+<div id="module-set">
+
+{% block modules %}
+
+{% if sound_pub_item %}
+<div id="module" class="module">
+    <h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlist" style="vertical-align:middle" />
+    {% trans "Musical selection" %}</h3>
+    <ul class="playlist">
+    <li><a href="{% url telemeta-item-detail sound_pub_item.public_id %}"><b>{{ sound_pub_item }}</b></a>{% if sound_pub_item.alt_title %} ({{ sound_pub_item.alt_title }}){% endif %}<br /><span style="font-size: 90%">{{ sound_pub_item.location.fullnames|to_string }}</span><br />
+<iframe width='376' height='215' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/items/{{ sound_pub_item.public_id }}/player/362x130/'></iframe>
+    </li>
+    </ul>
+</div>
+{% endif %}
+
+<div class="module">
+    <h3><img src="{% url telemeta-images "module_world.png" %}" alt="world" style="vertical-align:middle" />
+    {% trans "Geo Navigator" %}</h3>
+    <a class="image-link" href="{% url telemeta-geo-continents %}">
+    <img class="map-thumbnail" src="{% url telemeta-images "world2.png" %}" alt="{% trans "Open the geographic navigator" %}" style="width:398px" /></a>
+</div>
+
+{% include "telemeta/inc/module_revisions.html" %}
+
+{{ block.super }}
+<div id="module" class="module">
+    <h3><img src="/images/module_playlist.png" style="vertical-align:middle" />
+    Partenaires</h3><br />
+    <div style="background-color: white; padding: 1ex;" align="center">
+    <a href="http://www.cnrs.fr"><img class="image-link" src="{% url telemeta-images "logo-CNRS.png" %}" alt="CNRS"></a>&nbsp;&nbsp;&nbsp;
+    <a href="http://www.culture.gouv.fr"><img class="image-link" src="{% url telemeta-images "logo_mcc_2.png" %}" alt="MCC"></a>&nbsp;&nbsp;
+    <a href="http://www.mnhn.fr"><img class="image-link" src="{% url telemeta-images "logo-mnhn.gif" %}" alt="MNHN"></a>
+    <br /><br />
+    <a href="http://www.tge-adonis.fr"><img class="image-link" src="{% url telemeta-images "logo-adonis.jpg" %}" alt="TGE Adonis"></a>
+    </div>
+</div>
+
+{% endblock %}
+
+</div>
+
+<div class="home-description">
+<img class="align-left" src="{% url telemeta-images "vox.png" %}" alt="vox" style="vertical-align:middle;" />
+{{ page_content|render_flatpage }}
+</div>
+
+{% if sound_pub_items %}
+<div style="margin-top: 1ex;">
+<h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" />
+    {% trans "Musical selection" %}</h1>
+<table style="font-size: 90%"><tr>
+{% for item in sound_pub_items %}
+<td width="390"><a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>{% if item.alt_title %} ({{ item.alt_title }}){% endif %}<br /><span style="font-size: 80%">{{ item.location.fullnames|to_string }}</span><br />
+<iframe width='376' height='220' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/items/{{ item.public_id }}/player/362x130/'></iframe></td>
+{% endfor %}
+</tr>
+</table>
+</div>
+{% endif %}
+
+</div>
+{% endblock %}
index a612c3f4ebc59f3b137997f1cd30a4d4dad3f4d9..4988a6fa3705d04f7d21506127d08c695659c1a0 100644 (file)
@@ -1 +1,49 @@
-{% extends "telemeta_default/instrument_edit.html" %}
+{% extends "telemeta/admin.html" %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Instruments" %} - {{ block.super }}{% endblock %}
+
+{% block tabcontents %}
+ <h4>{% trans "Instruments" %}</h4>
+ <form class="addnew" id="_addinstru" method="POST"
+        action="{% url telemeta-instrument-add %}">{% csrf_token %}
+  <fieldset>
+   <legend>{% trans "Add entry" %}</legend>
+   <div class="field">
+    <label>{% trans "Name" %}: <input type="text" name="value"></label>
+
+   </div>
+   <div class="buttons">
+    <br />
+    <a href="#" class="component_icon button icon_add"
+      onclick="document.getElementById('_addinstru').submit(); return false;">{% trans "Add" %}</a>
+   </div>
+  </fieldset>
+ </form>
+ {% if instruments %}
+ <form id="_updateinstru" method="POST" action="{% url telemeta-instrument-update %}">{% csrf_token %}
+  <table class="listing">
+   <thead>
+    <tr><th class="sel">&nbsp;</th><th>{% trans "Name"%}</th></tr>
+   </thead><tbody>
+    {% for record in instruments %}
+    <tr>
+     <td><input type="checkbox" name="sel" value="{{record.id}}" /></td>
+     <td><a href="{% url telemeta-instrument-record-edit record.id %}">
+        {{record.name}}</a></td>
+    </tr>
+    {% endfor %}
+    </tbody>
+  </table>
+  <div class="buttons">
+   <br />
+   <a href="#" class="component_icon button icon_cancel"
+      onclick="document.getElementById('_updateinstru').submit(); return false;">{% trans "Remove selected items" %}</a>
+  </div>
+ </form>
+ {% else %}
+    <p class="help">{% trans "This instrument list is empty" %}</p>
+ {% endif %}
+
+  <br style="clear: right"/>
+{% endblock %}
index 247ec96898a3719d9018d27ae870c0e233e67dda..ca28c2540828fb53514003dc9e4ff3690e44a993 100644 (file)
@@ -1 +1,26 @@
-{% extends "telemeta_default/instrument_edit_value.html" %}
+{% extends "telemeta/admin.html" %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Instruments" %} - {{ block.super }}{% endblock %}
+
+{% block tabcontents %}
+ <h4>{% trans "Instruments" %}</h4>
+ <form class="mod" id="addinstru" method="post"
+    action="{% url telemeta-instrument-record-update instrument.id %}">{% csrf_token %}
+  <fieldset>
+   <legend>{% trans "Modify an entry" %}</legend>
+   <div class="field">
+    <label>{% trans "Name" %}: <input type="text" name="value" value="{{instrument.name}}" /></label>
+
+   </div>
+   <br />
+   <div class="buttons">
+        <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('addinstru').submit(); return false;">{% trans "Save" %}</a>
+        <a href="{% url telemeta-instrument-edit %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+   </div>
+  </fieldset>
+ </form>
+  <br style="clear: right"/>
+{% endblock %}
index e6c64d5909ce4dd59a315fd0360748a4dec872ff..e4c58c0750e2eda0424cec466738649d1ef0e1ad 100644 (file)
@@ -1 +1,24 @@
-{% extends "telemeta_default/login.html" %}
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block title %}
+ <img src="{% url telemeta-images "user_red.png" %}" style="vertical-align:middle" /> {% trans "User authentication" %}
+{% endblock %}
+
+{% block content %}
+{% if form.errors %}
+<p class="login-error">{% trans "Your username and password didn't match. Please try again." %}</p>
+{% endif %}
+<form class="login" id="_loginForm" method="post" action="{% url telemeta-login %}">{% csrf_token %}
+<p>
+{{ form.username.label_tag }}
+{{ form.username }}<br />
+{{ form.password.label_tag }}
+{{ form.password }}
+</p>
+<a href="#" class="component_icon button icon_login" style="float: right;"
+                onclick="document.getElementById('_loginForm').submit(); return false;">{% trans "Sign in" %}</a>
+<input type="hidden" name="next" value="{{ next }}" />
+<span style="align: right;"><a href="{% url telemeta-password-reset %}">{% trans "Password forgotten" %} ?</a></span>
+</form>
+{% endblock %}
index 954910ddc7f154bc90778638a23b3fd742bb1a55..ee05ac19746fbf313d3a71e5ed523cf8b01f9e5b 100644 (file)
@@ -1 +1,61 @@
-{% extends "telemeta_default/mediaitem_add.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Item" %}- {{ block.super }}{% endblock %}
+
+{% if item %}
+{% block title %}
+    <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> Item : NEW
+{% endblock %}
+
+{% block title_buttons %}
+    {% if perms.telemeta.add_mediaitem %}
+      <a href="{% url telemeta-items %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+    {% endif %}
+{% endblock %}
+
+{% block content %}
+    {% block infos %}
+    <div class="infos">
+     <form method="post" id="_addItemForm" action="" enctype="multipart/form-data">{% csrf_token %}
+       <ul>{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</ul>
+       <table>
+        {% for field in form %}
+            <tr>
+            {% if field.html_name == "copied_from_item" %}
+                <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td>
+            {% else %}
+                <tr><td class="error">{{ field.errors }}</td></tr>
+                <td>{{ field.label_tag }}:</td>
+                    {% if field.html_name == "collection" %}
+                    <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
+                        &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />
+                        {{ field }}</td>
+                    {% else %}
+                    <td>{{ field }}</td>
+                    {% endif %}
+            {% endif %}
+            </tr>
+    {% endfor %}
+       </table>
+       <div align="center" style="margin-top:3ex;">
+        <a href="{% url telemeta-items %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+        <a href="#" class="component_icon button icon_save"
+   onclick="var d=document; d.getElementById('wait-img').style.display='inline'; setTimeout(function(){d.getElementById('_addItemForm').submit();},300); return false;">{% trans "Save" %}</a>
+           <img id="wait-img" style="display:none" style="vertical-align:middle" alt="wait" src="{% url telemeta-images "wait.gif" %}" />
+       </div>
+     </form>
+    </div>
+  {% endblock infos %}
+</div> <!-- with-rightcol -->
+{% endblock %}
+
+{% block delete %}
+{% endblock %}
+
+{% else %}
+<p>No such item</p>
+{% endif %}
index 154f7a0c252b910bcdeef10d7c2dd77338891f79..64bbaac73dd488121b88f5f716a1a75094f0ad51 100644 (file)
@@ -1 +1,56 @@
-{% extends "telemeta_default/mediaitem_copy.html" %}
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Item" %}- {{ block.super }}{% endblock %}
+
+{% block extra_javascript %}
+{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> Item : NEW
+{% endblock %}
+
+{% block title_buttons %}
+    {% if user.is_authenticated and perms.telemeta.add_mediaitem %}
+    <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+    {% endif %}
+{% endblock %}
+
+{% block content %}
+  {% block infos %}    
+    <div class="infos">
+     <form enctype="multipart/form-data" id="_mediaItemCopyForm" method="post" action="">{% csrf_token %}
+     <ul>{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</ul>
+      <table>
+       {% for field in form %}
+            <tr>
+            {% if field.html_name == "copied_from_item" %}
+                <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td>
+            {% else %}
+                <tr><td class="error">{{ field.errors }}</td></tr>
+                <td>{{ field.label_tag }}:</td>
+                    {% if field.html_name == "collection" %}
+                    <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
+                        &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />
+                        {{ field }}</td>
+                    {% else %}
+                    <td>{{ field }}</td>
+                    {% endif %}
+            {% endif %}
+            </tr>
+       {% endfor %}
+       </table>
+       <div align="center" style="margin-top:3ex;">
+           <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+         <a href="#" class="component_icon button icon_save"
+            onclick="document.getElementById('_mediaItemCopyForm').submit(); return false;">{% trans "Save" %}</a>
+       </div>
+     </form>
+    </div>
+  {% endblock infos %}  
+{% endblock %}
+
+{% block delete %}
+{% endblock %}
+
index b09e6a889dc0e8ada38acea1408ea3bf688efd15..927da5fc5d7f6d7f656888d2b14c13aecd839edf 100644 (file)
@@ -1 +1,299 @@
-{% extends "telemeta_default/mediaitem_detail.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Item" %} : {% if item.title %}{{ item.title }}{% else %}{{ item.public_id}}{% endif %} - {{ block.super }}{% endblock %}
+
+{% block stylesheets %}
+{{ block.super }}
+      <link rel="stylesheet" type="text/css" href="{% url telemeta-timeside "skins/lab/style.css" %}" />
+      <link rel="stylesheet" type="text/css" href="{% url telemeta-css "player.css" %}" />
+{% endblock %}
+
+{% block extra_javascript %}
+{% if item %}
+
+{% if item.file %}
+{% if public_access or perms.telemeta.can_play_all_items %}
+<script src="{% url telemeta-timeside "js/libs/soundmanager2-nodebug-jsmin.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-timeside "js/timeside.js" %}" type="text/javascript"></script>
+{% endif %}
+{% endif %}
+
+<script src="{% url telemeta-js "popupdiv-min.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
+
+{% if item.file %}
+{% if public_access or perms.telemeta.can_play_all_items %}
+<script src="{% url telemeta-js "playerLoader.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "divmarker.js" %}" type="text/javascript"></script>
+{% endif %}
+{% endif %}
+
+<script type="text/javascript">
+    {% if item.file %}
+    {% if public_access or perms.telemeta.can_play_all_items %}
+        //initializing soundManager default properties
+        soundManager.flashVersion = 9;
+        soundManager.url = "{% url telemeta-timeside "swf/" %}";
+        soundManager.debugMode = false;
+        soundManager.allowPolling = true;
+        soundManager.useHTML5Audio = true;
+        soundManager.preferFlash = true;
+
+        //initializing the visualizers to be passed to the player
+        var visualizers = {};
+        {% for v in visualizers %}
+            visualizers["{{v.name}}"] = "{% url telemeta-item-visualize item.public_id,v.id,"WIDTH","HEIGHT" %}";
+        {% endfor %}
+        {% if user.is_superuser %}
+             loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',
+              "{% url telemeta-item-export item.public_id,"mp3" %}", undefined, '{{item.id}}', visualizers,
+              CURRENT_USER_NAME,  //undefined if !user.is_authenticated
+              true); //true because superuser
+        {% else %}
+           loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',
+             "{% url telemeta-item-export item.public_id,"mp3" %}", undefined, '{{item.id}}', visualizers,
+             CURRENT_USER_NAME,  //undefined if !user.is_authenticated
+             false); //false because not superuser
+        {% endif %}
+    {% endif %}
+    {% endif %}
+    //playlists:
+    {% if user.is_authenticated %}
+        {% for playlist in playlists %}
+            playlistUtils.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}');
+        {% endfor %}
+            jQuery(window).ready(function(){
+                var anchor = jQuery('#_add_to_playlist');
+                if(anchor.length){
+                    anchor.unbind('click').click(function(){
+                        playlistUtils.showAddResourceToPlaylist(anchor,'item','{{item.id}}',gettrans('item added to the selected playlist'));
+                        return false;
+                    });
+                }
+            });
+    {% endif %}
+</script>
+{% endif %}
+{% endblock %}
+
+{% if item %}
+
+{% block title %}
+<img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" />
+Item : <a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>
+{% endblock %}
+
+{% block title_buttons %}
+<div class="fixedWidthAsPlayer">
+    {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
+    <a href="{% url telemeta-item-edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
+    <a href="{% url telemeta-item-copy item.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
+    {% endif %}
+    {% if user.is_authenticated %}
+    <a id="_add_to_playlist" href='#' class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
+    {% endif %}
+    <a href="{% url telemeta-item-detail previous %}" class="component_icon button icon_previous">{% trans "Previous" %}</a>
+    <a href="{% url telemeta-item-detail next %}" class="component_icon button icon_next">{% trans "Next" %}</a>
+    <a href="{% url telemeta-item-dublincore item.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
+</div>
+{% endblock %}
+
+{% block content %}
+<div class="{% if item.file %}{% if public_access or perms.telemeta.can_play_all_items %}with-rightcol{% endif %}{% endif %}">
+    {% if item.file %}
+    {% if public_access or perms.telemeta.can_play_all_items %}
+    <div id="player_maximized" class="ts-skin-lab">
+        <a href="#" class="toggle">Minimize</a>
+        <a href="#" class="embed_player_frame">&lt;/&gt;</a>
+        <div class="wazing"></div>
+    </div>
+    <div id="rightcol">
+        <div id="player_minimized" class="ts-skin-lab">
+            <a href="#" class="toggle">Maximize</a>
+            <a href="#" class="embed_player_frame">&lt;/&gt;</a>
+            <div class="wazing"></div>
+            <div id="player" class="ts-player">
+            </div>
+        </div>
+
+        <!-- </div> -->
+        <div id="tabs_container">
+            <!-- this div will be hidden when everything is fully loaded-->
+            <span id="loading_span" href="#"><img style="vertical-align:middle" alt="wait" src="{% url telemeta-images "wait.gif" %}" />&nbsp;
+                <span id="loading_span_text">Loading...</span></span>
+            <a id="tab_analysis" style="display:none" class ="tab" href="#">{% trans "Analysis" %}</a><!--
+             do not let space here as it appears in the document!!!!!
+            --><a id="tab_markers" style="display:none" class="tab" href="#">{% trans "Markers" %}</a>
+        </div>
+
+        <div class="markers" id="markers_div_id"></div>
+
+        <div class="analyzer" id="analyzer_div_id">
+            <table width="100%">
+                <tr class="analyzer-title">
+                    <td>{% trans "Property" %}</td>
+                    <td>{% trans "Value" %}</td>
+                    <td>{% trans "Unit" %}</td>
+                </tr>
+            </table>
+        </div>
+        <!--</div>-->
+
+        {% if audio_export_enabled or perms.telemeta.can_download_all_items or user.is_superuser %}
+        <div class="exporter">
+            <p><img src="{% url telemeta-images "download.png" %}" alt="download" style="vertical-align:middle" /> {% trans "Download:" %}
+                {% for format in export_formats %}
+                <a href="{% url telemeta-item-export item.public_id,format.extension %}">
+                    <img src="images/{{ format.extension }}.png" style="vertical-align:middle" alt="{{ format.extension }}" /></a>
+                {% endfor %}</p>
+        </div>
+        {% endif %}
+
+    </div>
+    {% endif %}
+    {% endif %}
+
+    {% block infos %}
+    <div class="infos">
+        {% block general_info %}
+        <dl class="listing">
+            {% dl_field item "title" placeholder %}
+            {% dl_field item "alt_title" %}
+            {% dl_field item "collector" placeholder %}
+            <dt>{% field_label item "collection" %}</dt>
+            <dd><a href="{% url telemeta-collection-detail item.collection.public_id %}">{{ item.collection }}</a></dd>
+            <dt>{% trans "Recording date" %}</dt>
+
+            <dd>{% if item.recorded_from_date %}{{ item.recorded_from_date }}{% endif %}{% if item.recorded_from_date and item.recorded_to_date%} - {% endif %}{% if item.recorded_to_date %}{{ item.recorded_to_date}}{% endif %}</dd>
+
+        </dl>
+        {% endblock general_info %}
+    </div>
+    <div class="extraInfos">
+        {% block geoethnic_data %}
+        <div>
+            <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4>
+            <dl class="listing">
+                <dt>{% trans "Location" %}</dt>
+                <dd>{% if item.location %}{{ item.location.fullnames|join:"<br/>" }}{% endif %}</dd>
+                {% dl_field item "location_comment" %}
+                {% dl_field item "cultural_area" %}
+                {% dl_field item "language" %}
+                {% if item.language_iso %}
+                <dt>{% trans "Language ISO" %}</dt>
+                <dd>{{ item.language_iso.name|to_utf8 }}</dd>
+                {% endif %}
+                {% dl_field item "ethnic_group" placeholder %}
+                <dt>{% trans "Ethnographic context" %}</dt>
+                <dd>{{ item.context_comment|html_line_break|safe }}</dd>
+                {% dl_field item "keywords" join with ", " %}
+            </dl>
+        </div>
+        {% endblock geoethnic_data %}
+    </div>
+    {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
+    <a href="{% url telemeta-item-keywords_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %} {% trans "keywords" %}</a>
+    {% endif %}
+    <div class="extraInfos">
+        {% block musical_data %}
+        <div>
+            <h4><a href="#">{% trans "Musical informations" %}</a></h4>
+            <dl class="listing">
+                {% dl_field item "vernacular_style" %}
+                {% dl_field item "generic_style" %}
+                {% dl_field item "author" %}
+            </dl>
+            {% if item.performances %}
+            <div class="instruments">
+                <table class="instruments">
+                    <thead>
+                        <tr>
+                            <td>{% field_label "MediaItemPerformance" "instruments_num" %}</td>
+                            <td>{% field_label "MediaItemPerformance" "instrument" %}</td>
+                            <td>{% field_label "MediaItemPerformance" "alias" %}</td>
+                            <td>{% field_label "MediaItemPerformance" "musicians" %}</td>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        {% for performance in item.performances.all %}
+                        <tr>
+                            <td>{{ performance.instruments_num }}</td>
+                            <td>{{ performance.instrument|default:"" }}</td>
+                            <td>{{ performance.alias|default:"" }}</td>
+                            <td>{{ performance.musicians }}</td>
+                        </tr>
+                        {% endfor %}
+                    </tbody>
+                </table>
+            </div>
+            {% endif %}
+        </div>
+        {% endblock musical_data %}
+    </div>
+    {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
+    <a href="{% url telemeta-item-performances_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "performance"%}</a>
+    {% endif %}
+    <div class="extraInfos">
+        {% block general_data %}
+        <div>
+            <h4><a href="#">{% trans "General informations" %}</a></h4>
+            <dl class="listing">
+                <dt>{% trans "Remarks" %}</dt>
+                <dd>{{ item.comment|html_line_break|safe }}</dd>
+                {% dl_field item "collector_selection" %}
+            </dl>
+        </div>
+        {% endblock general_data %}
+    </div>
+    <div class="extraInfos">
+        {% block archive_data %}
+        <div>
+            <h4><a href="#">{% trans "Archiving data" %}</a></h4>
+            <dl class="listing">
+                {% dl_field item "code" %}
+                {% dl_field item "old_code" %}
+                {% dl_field item "track" %}
+                {% dl_field item "creator_reference" %}
+                <dt>{% trans "Published references" %}</dt>
+                <dd>{{ item.external_references|html_line_break|safe }}</dd>
+                {% dl_field item "public_access_label" %}
+            </dl>
+        </div>
+        {% endblock archive_data %}
+    </div>
+    <div class="extraInfos">
+        {% block technical_data %}
+        <div>
+            <h4><a href="#">{% trans "Technical data" %}</a></h4>
+            <div>
+                <dl class="listing">
+                    <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd>
+                    {% dl_field item "approx_duration" %}
+                </dl>
+            </div>
+        </div>
+        {% endblock technical_data %}
+    </div>
+    {% endblock infos %}
+</div> <!-- with-rightcol -->
+
+<div class="extraInfos">
+    {% block related %}
+        {% include "telemeta/inc/mediaitem_related.html" %}
+    {% endblock related %}
+</div>
+
+{% endblock %}
+
+{% block delete %}
+{% if user.is_authenticated and perms.telemeta.delete_mediaitem %}
+ <a href="#" onclick="if(confirm(gettrans('delete the item permanently?'))){window.location.href='{% url telemeta-item-delete item.public_id %}';};return false;"
+        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
+{% endif %}
+{% endblock %}
+
+{% else %}
+<p>No such item</p>
+{% endif %}
index 7924eeb347c0da8498e43d2a14014269fc49454a..d745dc6786d551ec6c19e3a9aeb2572821e03b5b 100644 (file)
@@ -1 +1,20 @@
-{% extends "telemeta_default/mediaitem_detail_dc.html" %}
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% if item %}
+{% block title_buttons %}
+ <a class="component_icon button icon_previous" href="{% url telemeta-item-detail item.public_id %}">{% trans "Normal View" %}</a>
+{% endblock %}
+
+{% block infos %}
+{% with item|to_dublincore as resource %}
+{% include "telemeta/inc/dublincore.html" %}
+{% endwith %}
+{% endblock %}
+{% else %}
+    <p>{% trans "No such item" %}</p>
+{% endif %}
+
+{% block related %}
+{% endblock related %}
index db8aacd175b6d7c55d3162fe0bb2415eb1649425..5767f76916113e2412abb8684c8b3780df936518 100644 (file)
@@ -1 +1,51 @@
-{% extends "telemeta_default/mediaitem_edit.html" %}
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block title %}
+<img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> Item : {{ item }}
+{% endblock %}
+
+{% block title_buttons %}
+<a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block infos %}    
+<div class="infos">
+    <form enctype="multipart/form-data" id="_editItemForm" method="post" action="">{% csrf_token %}   
+    <table>
+    <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
+    {% for field in form %}
+    <tr>
+    {% if field.html_name == "copied_from_item" %}
+        <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td>
+    {% else %}
+        <tr><td class="error">{{ field.errors }}</td></tr>
+        <td>{{ field.label_tag }}:</td>
+            {% if field.html_name == "collection" %}
+            <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
+                &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />
+                {{ field }}</td>
+            {% else %}
+            <td>{{ field }}</td>
+            {% endif %}
+    {% endif %}
+    </tr>
+    {% endfor %}
+    </table>
+    <div align="center" style="margin-top:3ex;">
+    <a href="{% url telemeta-item-detail item.public_id %}"
+        class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+    <a href="#" class="component_icon button icon_save" 
+onclick="var d=document; d.getElementById('wait-img').style.display='inline'; setTimeout(function(){d.getElementById('_editItemForm').submit();},300); return false;">{% trans "Save" %}</a>
+           <img id="wait-img" style="display:none" style="vertical-align:middle" alt="wait" src="{% url telemeta-images  "wait.gif" %}" />
+    </div>
+    </form>
+</div>
+{% endblock infos %}
+
+{% block related %} 
+{% endblock %}
+
+{% block delete %}
+{% endblock %}
index 4287ae81ad6ab8f3dc17f75223ca9f92fbfb1e20..9e2ca7d6e0338c48e4ac63ba7d0fa2562ad8d1bc 100644 (file)
@@ -1 +1,48 @@
-{% extends "telemeta_default/mediaitem_keywords_edit.html" %}
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block extra_javascript %}
+{% endblock %}
+
+  {% block title %}
+    <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> <h1>Item : {{ item }}</h1>
+  {% endblock %}
+  {% block title_buttons %}
+   <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+  {% endblock %}
+
+{% block content %}
+  {% block infos %}    
+    <div class="infos">
+     <form method="post" id="_editForm" action="">{% csrf_token %}
+
+    {{ formset.management_form }}
+    {% for form in formset.forms %}
+      <table>
+        <tr><td><b>{% trans "Keyword" %} :</b><td></td></tr>
+        {% for field in form %}
+        <tr>
+        {% if "item" in field.html_name or "id" in field.html_name %}
+            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+        {% else %}
+            <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
+        {% endif %}
+        </tr>
+        {% endfor %}
+       </table>
+       <br />
+    {% endfor %}
+      
+      <div align="center">
+        <a href="{% url telemeta-item-detail item.public_id %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+        <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editForm').submit(); return false;">{% trans "Save" %}</a>
+       </div>
+    
+     </form>
+    </div>
+       
+  {% endblock infos %}
+{% endblock content %}
index 6ee204648d47caf4018dc7451b953d935d312c40..26e4523793aad29a877d80768d34c4cbb0644830 100644 (file)
@@ -1 +1,25 @@
-{% extends "telemeta_default/mediaitem_list.html" %}
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block head_title %}{% trans "Media Items" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> {% trans "Media Items" %}
+{% endblock %}
+
+{% block title_buttons %}
+    <a href="{% url telemeta-items %}" class="component_icon button icon_filter">{% trans "All" %}</a>
+    <a href="{% url telemeta-items-sound %}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+    {% if user.is_authenticated and perms.telemeta.add_mediaitem %}
+      <a href="{% url telemeta-item-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
+    {% endif %}
+{% endblock %}
+
+{% block content %}
+{% with object_list as items %}
+<div class="fullpage">
+{% include "telemeta/inc/mediaitem_list.html" %}
+</div>
+{% endwith %}
+{% endblock %}
index d01dd2452d86445ba2ecc7706174a4f17b49546c..a12ff3fe6b716c7914a187ee356e8dcb6a701ab5 100644 (file)
@@ -1 +1,50 @@
-{% extends "telemeta_default/mediaitem_performances_edit.html" %}
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block extra_javascript %}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> Item : {{ item }}
+{% endblock %}
+
+{% block title_buttons %}
+ <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block content %}
+  {% block infos %}    
+    <div class="infos">
+     <form method="post" id="_editPerformanceForm" action="">{% csrf_token %}
+
+    {{ formset.management_form }}
+    {% for form in formset.forms %}
+      <hr>
+      <table>
+        <tr><td><b>{% trans "Performance" %} :</b><td></td></tr>
+        {% for field in form %}
+        <tr>
+        {% if not "media_item" in field.html_name %}
+            {% if "id" in field.html_name %}
+                <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+            {% else %}
+                <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
+            {% endif %}
+        {% else %}
+            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+        {% endif %}
+        </tr>
+        {% endfor %}
+       </table>
+       <br />
+    {% endfor %}
+      <div align="center">
+        <a href="{% url telemeta-item-detail item.public_id %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+        <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editPerformanceForm').submit(); return false;">{% trans "Save" %}</a>
+       </div>
+     </form>
+    </div>
+  {% endblock infos %}
+{% endblock content %}
index 2b8b1a1a5eac4dcb50f4ce3c43be349d4fb4d77f..0c4149eed8c3ae3d834e92baaac0e2f309c4c31a 100644 (file)
@@ -1 +1,44 @@
-{% extends "telemeta_default/mediaitem_player.html" %}
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+
+{% block stylesheets %}
+{{ block.super }}
+    <style type="text/css">
+        #rightcol {
+            width: {{width}}px;
+        }
+        .ts-skin-lab .ts-player .ts-wave {
+            height: {{height}}px;
+        }
+    </style>
+{% endblock %}
+
+{% block title %}{% endblock %}
+{% block title_buttons %}{% endblock %}
+
+{% block layout %}
+{% block content %}
+<div>
+{% if item.file %}
+    {% if public_access or user.is_staff %}
+    <div id="rightcol" style="float: left; padding-bottom:0;">
+        <div id="player_minimized" class="ts-skin-lab">
+            <div class="wazing"></div>
+            <div id="player" class="ts-player">
+            </div>
+        </div>
+       <div>
+        <span style="font-size:65%; float:left">{% organization %} - Item : <a href="{% url telemeta-item-detail item.public_id %}" target="_blank">{% if item.code %}{{ item.code }}{% else %}{{ item.old_code }}{% endif %}</a></span>
+        <span style="font-size:65%; float:right"><a href="http://telemeta.org" target="_blank">Telemeta</a> powered</span>
+       </div>
+    </div>
+    {% endif %}
+{% endif %}
+</div>
+
+{% endblock content%}
+{% endblock layout %}
+
+{% block footer %}{% endblock %}
index 6b318a9ee3c7d2c50e47b452a38400522de172e9..506d279e5d25f97aa44f485dae5f9bc41fe2d1d0 100644 (file)
@@ -1 +1,47 @@
-{% extends "telemeta_default/mediaitem_related_edit.html" %}
+{% extends "telemeta/mediaitem_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block extra_javascript %}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> Item : {{ item }}
+{% endblock %}
+
+{% block title_buttons %}
+ <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block content %}
+  {% block infos %}    
+    <div class="infos">
+     <form enctype="multipart/form-data" method="post" id="_editMediaItemRelatedFileForm" action="">{% csrf_token %}
+
+    {{ formset.management_form }}
+    {% for form in formset.forms %}
+      <hr>
+      <table>
+        <tr><td><b>{% trans "Media" %} :</b><td></td></tr>
+        {% for field in form %}
+        <tr><td class="error">{{ field.errors }}</td></tr>
+        <tr>
+            {% if "media_item" in field.html_name or "id" in field.html_name or "item" in field.html_name or "mime_type" in field.html_name %}
+                <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+            {% else %}
+                <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
+            {% endif %}
+        </tr>
+        {% endfor %}
+       </table>
+       <br />
+    {% endfor %}
+      <div align="center">
+        <a href="{% url telemeta-item-detail item.public_id %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+        <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editMediaItemRelatedFileForm').submit(); return false;">{% trans "Save" %}</a>
+       </div>
+     </form>
+    </div>
+  {% endblock infos %}
+{% endblock content %}
index f4b9b65ef7025c9916015c5b51176dcb4858b5f7..f899cbecd980e999acb8c35eee5f02695f8d4f14 100644 (file)
@@ -1 +1,13 @@
-{% extends "telemeta_default/mediaitem_xspf.xml" %}
+{% extends "telemeta/base_xspf.xml" %}
+{% load telemeta_utils %}
+
+{% block tracklist %}
+    <track>
+      <title>{{ item }}</title>
+      <meta rel="type">mp3</meta>
+      <location>http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}</location>
+      <duration>{{ item.get_duration|mul:1000 }}</duration>
+      <info>http://{{ host }}{% url telemeta-item-detail item.public_id %}</info>
+    </track>
+{% endblock %}
+
index 787f796ade00022c85209f19db26607d55748255..c0442beabcf8c3fbf871a1dbb55cd664ac68bd69 100644 (file)
@@ -1 +1,12 @@
-{% extends "telemeta_default/messages.html" %}
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% if messages %}
+ {% for message in messages %}
+  <h1>{{ message }}</h1>
+  <p>{{ description }}
+ {% endfor %}
+{% endif %}
+{% endblock %}
+
index 98e2779c7f29e262caaa5a7e3058c62026137e9c..e47187d6d8cadc7415a562a803abad4e02ad498b 100644 (file)
@@ -1 +1,24 @@
-{% extends "telemeta_default/paginator.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% if has_previous %}
+    <a href="?page={{ previous }}&amp;{{ criteria|build_query_string }}">&lt; {% trans "Previous" %}</a>
+{% endif %}
+
+{% if show_first %}
+<a href="?page=1">1</a> ...
+{% endif %}
+{% for linkpage in page_numbers %}
+    {% ifequal linkpage page %}
+        {{ page }}
+    {% else %}
+        <a href="?page={{ linkpage }}&amp;{{ criteria|build_query_string }}">{{ linkpage }}</a>
+    {% endifequal %}
+{% endfor %}
+{% if show_last %}
+    ...
+    <a href="?page=last">{{ pages }}</a>
+{% endif %}
+{% if has_next %}
+    <a href="?page={{ next }}&amp;{{ criteria|build_query_string }}">{% trans "Next" %} &gt;</a>
+{% endif %}
index 4561152565b48df18c84c3e680de2f232124b801..b24b08604b4d00e372c0ad7c894d783304b11d78 100644 (file)
@@ -1 +1,71 @@
-{% extends "telemeta_default/profile_detail.html" %}
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+        
+{% block head_title %}{% trans "User Profile" %} : {{ usr.username }}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "user_red.png" %}" alt="user" style="vertical-align:middle" /> {% trans "User profile" %} : {{ usr.username }}
+{% endblock %}
+
+{% block content %}
+  <div id="module-set" style="width: 33%">
+  {% block modules %}
+  <div class="module">
+    <h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlists" style="vertical-align:middle" />
+    {% trans "Playlists" %}</h3>
+    <ul class="playlist">
+    {% for p in playlists %}
+    <li>
+        <b>{{ p.playlist.title }}</b>
+        <br />
+        <span class="info">{{ p.playlist.description }}</span>
+    </li>
+    {% endfor %}
+    </ul>
+   </div>
+  {% endblock %}
+ </div>
+
+    <div class="infos" style="padding-top: 1em;">
+     <dl class="listing">
+      <dt>{% trans "First Name" %}</dt><dd>{{ usr.first_name }}</dd>
+      <dt>{% trans "Last Name" %}</dt><dd>{{ usr.last_name }}</dd>
+      <dt>{% trans "Email" %}</dt><dd>{{ usr.email }}</dd>
+      
+      <dt>{% trans "Institution" %}</dt><dd>{% if profile %}{{ profile.institution }}{% endif %}</dd>
+      <dt>{% trans "Function" %}</dt><dd>{% if profile %}{{ profile.function }}{% endif %}</dd>
+      <dt>{% trans "Address" %}</dt><dd>{% if profile %}{{ profile.address }}{% endif %}</dd>
+      <dt>{% trans "Telephone" %}</dt><dd>{% if profile %}{{ profile.telephone }}{% endif %}</dd>
+      <dt>{% trans "Expiration date" %}</dt><dd>{% if profile %}{{ profile.expiration_date }}{% endif %}</dd>
+      
+      <dt>{% trans "Is staff" %}</dt><dd>{{ usr.is_staff }}</dd>
+      <dt>{% trans "Is superuser" %}</dt><dd>{{ usr.is_superuser }}</dd>
+      <dt>{% blocktrans count user.groups.all.count as counter %}Group{% plural %}Groups{% endblocktrans %}</dt><dd>{% for group in usr.groups.all %}{{ group }} {% endfor %}</dd>
+      <dt>{% trans "Last login" %}</dt><dd>{{ usr.last_login }}</dd>
+      {% if user.is_authenticated and user.username == usr.username %}
+      <dt>{% trans "Language" %}</dt><dd><form id="setlang" action="/i18n/setlang/" method="post">{% csrf_token %}
+        <input name="next" type="hidden" value="" />
+          <select name="language">
+            {% for lang in LANGUAGES %}
+             <option {% if lang.0 == LANGUAGE_CODE %}selected{% endif %} value="{{ lang.0 }}">{{ lang.1 }}</option>
+            {% endfor %}
+          </select>
+          <a href="#" class="component_icon button icon_ok" 
+            onclick="document.getElementById('setlang').submit(); return false;">{% trans "Apply" %}</a>
+         </form>
+        </dd>
+      {%  endif %}
+     </dl>
+    </div>
+        
+    {% if user.is_authenticated and user.username == usr.username or user.is_staff %}
+    <a href="{% url telemeta-profile-edit usr.username %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
+    {%  endif %}
+    {% if user.is_authenticated and user.username == usr.username %}
+    <a href="{% url telemeta-password-change %}" class="component_icon button icon_login">{% trans "Change password" %}</a>
+    {%  endif %}
+  </div>
+{% endblock %}
+
index 5b95280416f4ce11bf4260de15eb26e9fb4b487f..3a64c7e541ad6e69df305007d39975a610b5b9d3 100644 (file)
@@ -1 +1,35 @@
-{% extends "telemeta_default/profile_edit.html" %}
+{% extends "telemeta/profile_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block title_buttons %}
+ <a href="{% url telemeta-profile-detail usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block content %}
+      <div class="infos" style="padding-top: 1em;">
+       <form method="POST" id="_editUserProfileForm" action="">{% csrf_token %}
+        <table>
+        {% for form in forms %}
+            {% for field in form %}
+            {% if not field.html_name in user_hidden_fields %}
+            <tr>
+                <tr><td class="error">{{ field.errors }}</td></tr>
+                <td>{% trans field.label_tag %} : </td><td>{{ field }}</td>
+            </tr>
+            {% else %}
+            <tr>
+            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+            </tr>
+            {% endif %}
+            {% endfor %}
+        {% endfor %}
+        </table>
+        <div align="center">
+         <a href="{% url telemeta-profile-detail usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+         <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editUserProfileForm').submit(); return false;">{% trans "Save" %}</a>
+        </div>
+       </form>        
+      </div>
+{% endblock %}
index 12e792ac0dfccc280b8c033599de69a0d79d781f..8a31a2c0e256291759f327d043f46bdc53e2ccc4 100644 (file)
@@ -1,8 +1,6 @@
 {% extends "telemeta/base.html" %}
 {% load i18n %}
 
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %}
-
 {% block content %}
 
 <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
index 63bc2191913a611ef54a364ef265c4fcff783299..075a6855f757f543e1f205c7685f2ab2f3a6862c 100644 (file)
@@ -1 +1,11 @@
-{% extends "telemeta_default/registration/password_change_done.html" %}
\ No newline at end of file
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}{% trans 'Change password' %} / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
+
+{% block title %}<br />{% trans 'Password change successful' %}{% endblock %}
+
+{% block content %}
+
+<p>{% trans 'Your password was changed.' %}</p>
+
+{% endblock %}
index c2f232c2be5d7398fa4b4da1e2760bc8d83a3c75..79274dbb10fde9ad6fa4d3e26c0b4b89732e5901 100644 (file)
@@ -1 +1,49 @@
-{% extends "telemeta_default/registration/password_change_form.html" %}
\ No newline at end of file
+{% extends "telemeta/base.html" %}
+{% load i18n adminmedia %}
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
+{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %} {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
+
+{% block title %}<br />{% trans 'Password change' %}{% endblock %}
+
+{% block content %}<div id="content-main">
+
+<form id="password_change" action="" method="post">{% csrf_token %}
+<div>
+{% if form.errors %}
+    <p class="errornote">
+    {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+    </p>
+{% endif %}
+
+<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
+
+<fieldset class="aligned wide">
+
+<div class="form-row">
+    {{ form.old_password.errors }}
+    <label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }}
+</div>
+
+<div class="form-row">
+    {{ form.new_password1.errors }}
+    <label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }}
+</div>
+
+<div class="form-row">
+{{ form.new_password2.errors }}
+    <label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }}
+</div>
+
+</fieldset>
+
+<br />
+<div class="submit-row">
+   <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('password_change').submit(); return false;">{% trans 'Change my password' %}</a>
+</div>
+
+<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
+</div>
+</form></div>
+
+{% endblock %}
index 069712c943738ea01d9d0001952e4f1946605167..d32849ff8ad70ce205e6c8b37da5f987ede448a7 100644 (file)
@@ -1 +1,9 @@
-{% extends "telemeta_default/registration/password_reset_complete.html" %}
\ No newline at end of file
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block title %}<br />{% trans 'Password reset complete' %}{% endblock %}
+
+{% block content %}
+<p>{% trans "Your password has been set.  You may go ahead and log in now." %}</p>
+<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
+{% endblock %}
index cf76fccfed5c8aa749c9936bf69717838ca89f7f..9a8b6829bb24b5d47a8afc54ffe64c97b8a73794 100644 (file)
@@ -1 +1,23 @@
-{% extends "telemeta_default/registration/password_reset_confirm.html" %}
\ No newline at end of file
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block title %}<br />{% trans 'Password reset' %}{% endblock %}
+
+{% block content %}
+{% if validlink %}
+<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
+
+<form id="password_confirm" action="" method="post">{% csrf_token %}
+{{ form.new_password1.errors }}
+<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
+{{ form.new_password2.errors }}
+<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
+<p><a href="#" class="component_icon button icon_save" onclick="document.getElementById('password_confirm').submit(); return false;">{% trans 'Change my password' %}</a></p>
+</form>
+
+{% else %}
+<h1>{% trans 'Password reset unsuccessful' %}</h1>
+<p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
+
+{% endif %}
+{% endblock %}
index d32a6dde04c154ef478dc6505f36c28eabb7d4f9..88a57c46764a1a9c56591cc840411613528dfe59 100644 (file)
@@ -1 +1,8 @@
-{% extends "telemeta_default/registration/password_reset_done.html" %}
\ No newline at end of file
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block title %}<br />{% trans 'Password reset successful' %}{% endblock %}
+
+{% block content %}
+<p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p>
+{% endblock %}
index 7c1c273104469b4c94e13aa928e91864d603c58b..3b786ac4c9012f7a1638c54efe10e34685662c73 100644 (file)
@@ -1 +1,15 @@
-{% extends "telemeta_default/registration/password_reset_email.html" %}
\ No newline at end of file
+{% load i18n %}{% autoescape off %}
+{% trans "You're receiving this e-mail because you requested a password reset" %}
+{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}.
+
+{% trans "Please go to the following page and choose a new password:" %}
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url telemeta-password-reset-confirm uidb36=uid token=token %}
+{% endblock %}
+{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
+
+{% trans "Thanks for using our site!" %}
+
+{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
+
+{% endautoescape %}
index f02a94c9c412cb82b4f51443bb24f589bc67299f..6da1b8472812dcd8ded5ab5d9ce44d1b09b4026c 100644 (file)
@@ -1 +1,13 @@
-{% extends "telemeta_default/registration/password_reset_form.html" %}
\ No newline at end of file
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block title %}<br />{% trans "Password reset" %}{% endblock %}
+
+{% block content %}
+<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
+
+<form id="password_reset" action="" method="post">{% csrf_token %}
+{{ form.email.errors }}
+<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <a href="#" class="component_icon button icon_ok" onclick="document.getElementById('password_reset').submit(); return false;">{% trans 'Reset my password' %}</a></p>
+</form>
+{% endblock %}
diff --git a/telemeta/templates/telemeta/resource_add.html b/telemeta/templates/telemeta/resource_add.html
new file mode 100644 (file)
index 0000000..23ddb22
--- /dev/null
@@ -0,0 +1,36 @@
+{% extends "telemeta/resource_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block title %}
+    <img src="{% url telemeta-images "corpus_red.png" %}" style="vertical-align:middle" /> {{ type }} : {% trans "New" %}
+{% endblock %}
+
+{% block title_buttons %}
+    <a href="/archives/{{type}}/" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+
+{% block infos %}
+        <div class="infos">
+        <form method="post" id ="_addResourceForm" action="">{% csrf_token %}
+        <table>
+        <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
+        {% for field in form %}
+         <tr>
+            <tr><td class="error">{{ field.errors }}</td></tr>
+            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+        </tr>
+        {% endfor %}
+        </table>
+        <div align="center" style="margin-top:3ex;">
+            <a href="/archives/{{type}}/" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+            <a href="#" class="component_icon button icon_save"
+                onclick="document.getElementById('_addResourceForm').submit(); return false;">{% trans "Save" %}</a>
+        </div>
+        </form>
+        </div>
+{% endblock infos%}
+
+{% block delete %}
+{% endblock %}
diff --git a/telemeta/templates/telemeta/resource_detail.html b/telemeta/templates/telemeta/resource_detail.html
new file mode 100644 (file)
index 0000000..b36604d
--- /dev/null
@@ -0,0 +1,74 @@
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block head_title %}{% trans type %}{{resource|prepend:' : '}} - {{ block.super }}{% endblock %}
+
+{% block extra_javascript %}
+{% endblock %}
+
+{% if resource %}
+
+{% block title %}
+    <img src="{% url telemeta-images resource.icon %}" style="vertical-align:middle" />
+    {{ type|capitalize }} :
+    <a href="{% url telemeta-resource-detail type resource.public_id %}">{{ resource.title }}</a>
+{% endblock %}
+
+{% block title_buttons %}
+  <div class="fixedWidthAsPlayer">
+    {% if user.is_authenticated and perms.telemeta.change_mediaresource %}
+      <a href="{% url telemeta-resource-edit type resource.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
+      <a href="{% url telemeta-resource-copy type resource.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
+     {% endif %}
+    {% if user.is_authenticated %}
+    <a href=# id ="_add_to_playlist" class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
+    {% endif %}
+    <a href="{% url telemeta-resource-dublincore type resource.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
+   </div>
+{% endblock %}
+
+{% block content %}
+      {% block infos %}
+        <div class="intro">
+
+        </div>
+        <div class="infos">
+        {% block general_info %}
+            <dl class="listing">
+                {% dl_field resource "reference" %}
+                {% dl_field resource "title"  %}
+                {% dl_field resource "description" %}
+                {% dl_field resource "code" %}
+            </dl>
+        {% endblock general_info %}
+
+        <div class="extraInfos">
+            {% block related %}
+                {% include "telemeta/inc/resource_related.html" %}
+            {% endblock related %}
+        </div>
+
+        <div class="extraInfos">
+        <h4><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" />{{resource.children_type|capitalize }} </h4>
+        {% with resource.children.all as children %}
+            {% include "telemeta/inc/children_list.html" %}
+        {% endwith %}
+        </div>
+
+        {% endblock infos %}
+    </div>
+{% endblock %}
+
+{% block delete %}
+{% if user.is_authenticated and perms.telemeta.delete_mediaresource %}
+ <a href="#" onclick="if(confirm(gettrans('delete the resource permanently?'))){window.location.href='{% url telemeta-resource-delete type resource.public_id %}';};return false;"
+        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
+{% endif %}
+
+{% endblock %}
+
+{% else %}
+    <p>No such resource</p>
+{% endif %}
+
diff --git a/telemeta/templates/telemeta/resource_edit.html b/telemeta/templates/telemeta/resource_edit.html
new file mode 100644 (file)
index 0000000..6996ba2
--- /dev/null
@@ -0,0 +1,34 @@
+{% extends "telemeta/resource_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block title %}
+    <img src="{% url telemeta-images "corpus_red.png" %}" style="vertical-align:middle" /> {{ type }} : {{ resource }}
+{% endblock %}
+{% block title_buttons %}
+    <a href="{% url telemeta-resource-detail type resource.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block infos %}
+     <div class="infos">
+      <form method="post" id="_editCollectionForm" action="">{% csrf_token %}
+       <table>
+       <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
+       {% for field in form %}
+       <tr>
+            <tr><td class="error">{{ field.errors }}</td></tr>
+            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+        </tr>
+       {% endfor %}
+       </table>
+        <div align="center" style="margin-top:3ex;">
+         <a href="{% url telemeta-resource-detail type resource.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+         <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editCollectionForm').submit(); return false;">{% trans "Save" %}</a>
+        </div>
+      </form>
+     </div>
+{% endblock infos%}
+
+{% block delete %}
+{% endblock %}
diff --git a/telemeta/templates/telemeta/resource_list.html b/telemeta/templates/telemeta/resource_list.html
new file mode 100644 (file)
index 0000000..47820da
--- /dev/null
@@ -0,0 +1,23 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans type %} - {{ block.super }}{% endblock %}
+
+{% block title%}
+ <img src="{% url telemeta-images "corpus_red.png" %}" style="vertical-align:middle" /> {{ type|capitalize }}
+{% endblock %}
+
+{% block title_buttons %}
+    {% if user.is_authenticated and perms.telemeta.add_mediacollection %}
+      <a href="{% url telemeta-resource-add type %}" class="component_icon button icon_add">{% trans "Add" %}</a>
+    {% endif %}
+{% endblock %}
+
+{% block content %}
+{% with object_list as resources and type as type %}
+<div class="fullpage">
+{% include "telemeta/inc/resource_list.html" %}
+</div>
+{% endwith %}
+{% endblock %}
diff --git a/telemeta/templates/telemeta/resource_related_edit.html b/telemeta/templates/telemeta/resource_related_edit.html
new file mode 100644 (file)
index 0000000..35c4afc
--- /dev/null
@@ -0,0 +1,47 @@
+{% extends "telemeta/resource_detail.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block extra_javascript %}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> {{ type|capitalize }} : {{ resource }}
+{% endblock %}
+
+{% block title_buttons %}
+ <a href="{% url telemeta-resource-detail type resource.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+{% endblock %}
+
+{% block content %}
+  {% block infos %}
+    <div class="infos">
+     <form enctype="multipart/form-data" method="post" id="_editMediaRelatedFileForm" action="">{% csrf_token %}
+
+    {{ formset.management_form }}
+    {% for form in formset.forms %}
+      <hr>
+      <table>
+        <tr><td><b>{% trans "Media" %} :</b><td></td></tr>
+        {% for field in form %}
+        <tr><td class="error">{{ field.errors }}</td></tr>
+        <tr>
+            {% if "resource" in field.html_name or "id" in field.html_name or "mime_type" in field.html_name %}
+                <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+            {% else %}
+                <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
+            {% endif %}
+        </tr>
+        {% endfor %}
+       </table>
+       <br />
+    {% endfor %}
+      <div align="center">
+        <a href="{% url telemeta-resource-detail type resource.public_id %}"
+           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+        <a href="#" class="component_icon button icon_save"
+   onclick="document.getElementById('_editMediaRelatedFileForm').submit(); return false;">{% trans "Save" %}</a>
+       </div>
+     </form>
+    </div>
+  {% endblock infos %}
+{% endblock content %}
index 7f1b05a0ba226b4e8984065af09a8897b33e2140..6885f9e8cfcc0d5661a638476251defa80056d80 100644 (file)
@@ -1 +1,142 @@
-{% extends "telemeta_default/search_criteria.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Advanced Search" %} - {{ block.super }}{% endblock %}
+
+{% block stylesheets %}
+{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{% url telemeta-css "jquery.autocomplete.css" %}" />
+{% endblock %}
+
+{% block extra_javascript %}
+<script src="{% url telemeta-js "jquery.bgiframe.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "jquery.autocomplete.js" %}" type="text/javascript"></script>
+<script type="text/javascript">
+function update_period(source, from_field, to_field) {
+    var from_year = $(from_field);
+    var to_year = $(to_field);
+
+    if (from_year.val() == "0") {
+        to_year.attr('disabled', '1');
+        to_year.val('0');
+    } else {
+        to_year.removeAttr('disabled');
+        if ($(source).is(to_field)) {
+            if (parseInt(from_year.val()) > parseInt(to_year.val()))
+                from_year.val(to_year.val());
+        } else if (parseInt(from_year.val()) > parseInt(to_year.val())) {
+            to_year.val(from_year.val());
+        }
+    }
+}
+
+$(document).ready(function () {
+    $('#location').autocomplete('{% url telemeta-complete-location %}', {
+        max: 20,
+        formatResult: function(data) {
+            return data[0].replace(/ *\([0-9]+.*\) *$/, '');
+        }
+    });
+    update_period('#rec_year_from', '#rec_year_to');
+    $('#rec_year_from, #rec_year_to').change(function () {
+        update_period(this, '#rec_year_from', '#rec_year_to');
+    });
+    update_period('#pub_year_from', '#pub_year_to');
+    $('#pub_year_from, #pub_year_to').change(function () {
+        update_period(this, '#pub_year_from', '#pub_year_to');
+    });
+});
+
+</script>
+{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "adv_search_red.png" %}" alt="advanced-search" style="vertical-align:middle" /> {% trans "Advanced Search" %}
+{% endblock %}
+
+{% block content %}
+<form action="{% url telemeta-search %}" id="searchform">{% csrf_token %}
+<fieldset>
+
+    <p>
+    <label for="location">{% field_label "Location" %}</label>
+    <input type="text" name="location" id="location" value="{{ criteria.location }}" />
+    </p>
+
+    <p>
+    <label for="ethnic_group">{% field_label "EthnicGroup" %}</label>
+    <select id="ethnic_group" name="ethnic_group">
+        <option value="">All ethnic groups</option>
+    {% for group in ethnic_groups %}
+        <option value="{{group.id}}" {% ifequal criteria.ethnic_group.id group.id %}selected {% endifequal %}>{{group|escape}}</option>
+    {% endfor %}
+    </select>
+    </p>
+
+    <p>
+    <label for="title">{% trans "Title" %}</label>
+    <input type="text" id="title" name="title" />
+    </p>
+
+    <p>
+    <label for="creator">{% field_label "MediaCollection" "creator" %}</label>
+    <input type="text" id="creator" name="creator" />
+    </p>
+
+    <p>
+    <label for="collector">{% field_label "MediaCollection" "collector" %}</label>
+    <input type="text" id="collector" name="collector" />
+    </p>
+
+    {% if rec_years %} 
+    <p>
+    <label for="rec_date_from">{% trans "Year of recording" %}</label>
+    <select id="rec_year_from" name="rec_year_from" class="tiny">
+        <option value="0"></option>
+        {% for year in rec_years %}
+        <option value="{{ year }}" {% ifequal criteria.rec_year_from year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    {% trans "to" %}
+    <select id="rec_year_to" name="rec_year_to" class="tiny">
+        <option value="0"></option>
+        {% for year in rec_years %}
+        <option value="{{ year }}" {% ifequal criteria.rec_year_to year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    </p>
+    {% endif %}
+
+    {% if pub_years %} 
+    <p>
+    <label for="pub_date_from">{% trans "Year of publication" %}</label>
+    <select id="pub_year_from" name="pub_year_from" class="tiny">
+        <option value="0"></option>
+        {% for year in pub_years %}
+        <option value="{{ year }}" {% ifequal criteria.pub_year_from year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    {% trans "to" %}
+    <select id="pub_year_to" name="pub_year_to" class="tiny">
+        <option value="0"></option>
+        {% for year in pub_years %}
+        <option value="{{ year }}" {% ifequal criteria.pub_year_to year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    </p>
+    {% endif %}
+
+    <p><label for="sound">{% trans "Sound" %}</label>
+    <input type="checkbox" name="sound" value="True" align="left" />
+    </p>
+
+</fieldset>
+
+<p class="input">
+<a href="#" class="component_icon button icon_search"
+      onclick="document.getElementById('searchform').submit(); return false;">{% trans 'Search' %}</a>
+</p>
+
+</form>
+{% endblock %}
index 846d411088769bc951642ea6e9525de050e55f4d..ced7817178f6def1ae588ae6ad2c96ce9e0ef6ef 100644 (file)
@@ -1 +1,85 @@
-{% extends "telemeta_default/search_results.html" %}
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Search Results" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "search_red.png" %}" alt="search-results" style="vertical-align:middle" /> {% trans "Search Results" %}
+{% endblock %}
+
+{% block title_buttons %}
+    {% ifequal type 'items' %}
+     <a href="{% url telemeta-search-items %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
+     <a href="{% url telemeta-search-items %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+    {% else %}
+     <a href="{% url telemeta-search-collections %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
+     <a href="{% url telemeta-search-collections %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+    {% endifequal %}
+{% endblock %}
+
+{% block content %}
+{% if criteria %}
+<ul>
+  {% if criteria.pattern %}
+    <li><b>{% trans "Search pattern" %}:</b> {{criteria.pattern}}</li>
+  {% endif %}
+  {% if criteria.location %}
+    <li><b>{% field_label "Location" %}:</b> {{criteria.location}}</li>
+  {% endif %}
+  {% if criteria.ethnic_group %}
+    <li><b>{% field_label "EthnicGroup" %}:</b> {{criteria.ethnic_group}}</li>
+  {% endif %}
+  {% if criteria.creator %}
+    <li><b>{% field_label "MediaCollection" "creator" %}:</b> {{criteria.creator}}</li>
+  {% endif %}
+  {% if criteria.collector %}
+    <li><b>{% field_label "MediaCollection" "collector" %}:</b> {{criteria.collector}}</li>
+  {% endif %}
+  {% if criteria.title %}
+    <li><b>{% trans "Title" %}:</b> {{criteria.title}}</li>
+  {% endif %}
+  {% if criteria.rec_year_from %}
+    <li><b>{% trans "Year of recording" %}:</b> {{criteria.rec_year_from}}
+     {% ifnotequal criteria.rec_year_to criteria.rec_year_from %}
+     {% trans "to" %} {{criteria.rec_year_to}}
+     {% endifnotequal %}
+    </li>
+  {% endif %}
+  {% if criteria.pub_year_from %}
+    <li><b>{% trans "Year of publication" %}:</b> {{criteria.pub_year_from}}
+     {% ifnotequal criteria.pub_year_to criteria.pub_year_from %}
+     {% trans "to" %} {{criteria.pub_year_to}}
+     {% endifnotequal %}
+    </li>
+  {% endif %}
+    {% if criteria.sound %}
+    <li><b>{% trans "Sound" %}:</b> {{criteria.sound}}</li>
+  {% endif %}
+</ul>
+{% endif %}
+
+{% ifequal type 'items' %}
+
+  <p><a href="{% url telemeta-search-collections %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <b>Items ({{items_num}})</b></p>
+
+  {% with object_list as items %}
+   <div class="fullpage">
+      {% include "telemeta/inc/mediaitem_list.html" %}
+   </div>
+  {% endwith %}    
+
+{% else %}
+
+  <p><b>Collections ({{collections_num}})</b> | <a href="{% url telemeta-search-items %}?{{criteria|build_query_string}}">Items ({{items_num}})</a>
+  </p>
+
+  {% with object_list as collections %}
+   <div class="fullpage">
+      {% include "telemeta/inc/collection_list.html" %}
+   </div>
+  {% endwith %}
+
+{% endifequal %}
+
+{% endblock %}
index 8a03ebf4b67aae4b407895be430478472f3af6b7..4f73df1e9b71a80a53c0729506a38f7a34a34137 100644 (file)
@@ -1 +1,18 @@
-{% extends "telemeta_default/users.html" %}
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+{% load telemeta_utils %}
+
+{% block head_title %}{% trans "Users" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+ <img src="{% url telemeta-images "user_red.png" %}" alt="user" style="vertical-align:middle" /> {% trans "Users" %}
+{% endblock %}
+
+{% block content %}
+ {% if users %}
+  <br />
+  {% include "telemeta/inc/user_list.html" %}
+ {% else %}
+    <p class="help">{% trans "No users" %}</p>
+ {% endif %}
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/admin.html b/telemeta/templates/telemeta_default/admin.html
deleted file mode 100644 (file)
index ff32173..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block stylesheets %}
-{{ block.super }}
-<link rel="stylesheet" type="text/css" href="{% url telemeta-css "admin.css" %}" />
-{% endblock %}
-
-{% block title %}
-<h1><img src="{% url telemeta-images "admin_red.png" %}" style="vertical-align:middle" /> {% trans "Administration" %}</h1>
-{% endblock %}
-
-{% block content %}
-
-{% block tab %}
-<div class="tabs">
-<ul>
-<li><a href="{% url telemeta-admin-general %}">{% trans "General administration" %}</a></li>
-<li><a href="{% url telemeta-admin-users %}">{% trans "Users" %}</a></li>
-<li><a href="{% url telemeta-admin-enumerations %}">{% trans "Enumerations" %}</a></li>
-<li><a href="{% url telemeta-instrument-edit %}">{% trans "Instruments" %}</a></li>
-</ul>
-</div>
-{% endblock tab %}
-
-<div class="tabcontents">
-    {% block tabcontents %}
-    {% endblock %}
-</div>
-
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/admin_enumerations.html b/telemeta/templates/telemeta_default/admin_enumerations.html
deleted file mode 100644 (file)
index 9c68d74..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block tabcontents %}
- <h4>{% trans "Enumerations" %}</h4>
-{% if enumerations %}
-
-  <table class="listing">
-   <thead>
-    <tr><th>{% trans "Title"%}</th></tr>
-   </thead><tbody>
-    {% for enum in enumerations %}
-         <tr><td><a href="{% url telemeta-enumeration-edit enum.id %}">
-                {{ enum.name|capfirst }}</a></td></tr>    
-    {% endfor %}
-    </tbody>
-  </table>
-  {% else %}
-    <p class="help">{% trans "No enumerations" %}</p>
- {% endif %}
-
-{% endblock %}
-
-
diff --git a/telemeta/templates/telemeta_default/admin_general.html b/telemeta/templates/telemeta_default/admin_general.html
deleted file mode 100644 (file)
index ec56232..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load i18n %}
-
-{% block tabcontents %}
- <iframe align="middle" frameborder="0" width="100%" height="600px"  src="{% url telemeta-home %}admin/django/" />
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/admin_instruments.html b/telemeta/templates/telemeta_default/admin_instruments.html
deleted file mode 100644 (file)
index 5a3fa5f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block tabcontents %}
- <h4>{% trans "Users" %}</h4>
-
- {% if users %}
-   <ul>
-    {% for user in users %}
-    <li>{{user.username}}</li>
-    {% endfor %}
-    </ul>
- {% else %}
-    <p class="help">{% trans "No users" %}</p>
- {% endif %}
-
-{% endblock %}
-
-
-
diff --git a/telemeta/templates/telemeta_default/admin_users.html b/telemeta/templates/telemeta_default/admin_users.html
deleted file mode 100644 (file)
index 5a277a9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block tabcontents %}
- <h4>{% trans "Users" %}</h4>
-
- {% if users %}
-  {% include "telemeta/inc/user_list.html" %}
- {% else %}
-    <p class="help">{% trans "No users" %}</p>
- {% endif %}
-
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/base.html b/telemeta/templates/telemeta_default/base.html
deleted file mode 100644 (file)
index 173a3a7..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-{% load i18n %}
-{% load telemeta_utils %}
-{% get_current_language as LANGUAGE_CODE %}
-{% get_available_languages as LANGUAGES %}
-<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
-
-<head>
-<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
-<title>{%block head_title %}{% description %} - Telemeta{% endblock %}</title>
-
-{% block stylesheets %}
-<link rel="stylesheet" type="text/css" href="{% url telemeta-css "telemeta.css" %}" />
-<link rel="alternate" href="/rss" title="RSS 2.0" type="application/rss+xml" />
-<!--[if IE]>
-<link rel="stylesheet" type="text/css" href="{% url telemeta-css "telemeta_ie.css" %}" />
-<![endif]-->
-<!--[if lte IE 6]>
-<link rel="stylesheet"type="text/css" href="{% url telemeta-css "telemeta_ie6.css" %}" />
-<![endif]-->
-{% endblock %}
-
-{% block javascript %}
-<script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
-<!--<script src="{% url telemeta-js "jquery-1.6.min.js" %}" type="text/javascript"></script>-->
-<script src="{% url telemeta-timeside "js/libs/jquery-1.6.min.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "locale.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "application.js" %}" type="text/javascript"></script>
-{% if user.is_authenticated %}
-<script type='text/javascript'>var CURRENT_USER_NAME="{{ user.username }}";</script>
-{% else %}
-<script type='text/javascript'>var CURRENT_USER_NAME=undefined;</script>
-{% endif %}
-{% endblock %}
-
-{% block extra_javascript %}{% endblock %}
-</head>
-
-<body>
-{% block layout %}
-<div id="layout">
-{% block header %}
-<div id="header">
-<div id="logo">
-{% block logo %}
-<a href="{% url telemeta-home %}"><img src="{% url telemeta-images "logo_telemeta_2.png" %}" alt="Telemeta" /></a>
-{% endblock %}
-</div>
-
-<div id="auth_info">
-{% if user.is_authenticated %}
-<img src="{% url telemeta-images "user.png" %}" alt="user" style="vertical-align:middle" />
-{% trans "Welcome" %}, 
-{% if user.first_name and user.last_name %}
-{{ user.first_name }} {{ user.last_name }} |
-{% else %}
-{{ user.username }} |
-{% endif %}
-<a href="{% url telemeta-profile-detail user.username %}">{% trans "Profile" %}</a> |
-<a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> | 
-<a href="{% url telemeta-logout %}">{% trans "Sign out" %}
-<img src="{% url telemeta-images "logout.png" %}" alt="logout" style="vertical-align:middle" /></a>
-{% else %}
-<a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> |
-<a href="{% url telemeta-login %}?next={{ request.path|urlencode }}">{% trans "Sign in" %}</a>
-{% endif %}
-</div>
-
-<div id="quick_search">
-<form action="{% url telemeta-search %}" id="_quickSearchForm" method="get">
-<input type="text" id="quick_search_pattern" name="pattern" />
-<a href="#" class="component button"
-                onclick="document.getElementById('_quickSearchForm').submit(); return false;">{% trans "Search" %}</a>
-</form>
-</div>
-
-<div id="menu" class="nav">
-{% block menu %}
-
-{# spaces between li and a elements breaks layout #}
-
-<!--<ul id="nav">
- <a href="{% url telemeta-home %}" class="darkblue">{% trans "Home" %}</a>
- <a href="{% url telemeta-collections %}" class="blue">{% trans "Collections" %}</a>
- <a href="{% url telemeta-items %}" class="green">{% trans "Items" %}</a></li>
- <a href="{% url telemeta-geo-continents %}" class="yellow">{% trans "Geo Navigator" %}</a>
- <a href="{% url telemeta-search-criteria %}" class="orange">{% trans "Advanced search" %}</a>
- {% if user.is_authenticated %}
- <a href="{% url telemeta-users %}" class="red">{% trans "Users" %}</a>
- {% endif %}
- {% if user.is_staff %}
- <a href="{% url telemeta-admin %}" class="violet">{% trans "Admin" %}</a>
-{% endif %}
-</ul>-->
-
-<ul id="nav">
- <li><a href="{% url telemeta-home %}" class="blue">{% trans "Home" %}</a></li>
-
- <li><a href="{% url telemeta-archives %}" class="green">{% trans "Archives" %}</a>
-  <ul>
-     <li><a href="{% url telemeta-funds %}">{% trans "Funds" %}</a></li>
-     <li><a href="{% url telemeta-corpus %}">{% trans "Corpus" %}</a></li>
-     <li><a href="{% url telemeta-collections %}">{% trans "Collections" %}</a></li>
-     <li><a href="{% url telemeta-items %}">{% trans "Items" %}</a></li>
-  </ul>
-  <div class="clear"></div>
- </li>
- <li><a href="{% url telemeta-geo-continents %}" class="yellow">{% trans "Geo Navigator" %}</a></li>
- <li><a href="{% url telemeta-search-criteria %}" class="orange">{% trans "Advanced search" %}</a></li>
- {% if user.is_authenticated %}
- <li><a href="{% url telemeta-users %}" class="red">{% trans "Users" %}</a></li>
- {% endif %}
- {% if user.is_staff %}
- <li><a href="{% url telemeta-admin %}" class="violet">{% trans "Admin" %}</a></li>
-{% endif %}
-</ul>
-<div class="clear"></div>
-
-{% endblock %}
-</div>
-</div>
-{% endblock header %}
-
-<div id="content">
-    <table id="content_header"><tr>
-            <td class="leftcol"><h1>{% block title %}{% endblock %}</h1></td>
-            <td class="rightcol">{% block title_buttons %}{% endblock %}</td>
-    </tr></table>
-{% block content %}{% endblock %}
-<div class="nett"></div>
-{% block delete %}{% endblock %}
-</div>
-
-{% block footer %}
-<div id="footer">
- <hr />
- <table width="100%">
-  <tr>
-   <td>
-    <a id="telemeta_powered" href="{% telemeta_url %}" target="_blank"><img src="{% url telemeta-images "logo_mini_2.png" %}" height="30" width="93"
-   alt="Telemeta Powered"/></a>
-    <p class="left">
-    {% trans "Powered by" %} <a href="{% telemeta_url %}" target="_blank"><strong>Telemeta {% telemeta_version %}</strong></a><br />
-    {% trans "By" %} <a href="http://www.parisson.com/">Parisson SARL</a>
-    </p>
-   </td>
-   <td>
-    <p class="center">
-    {% trans "Usage of the archives in the respect of cultural heritage of the original communities." %}
-    </p>
-   </td>
-   <td>
-    <p class="right">
-    Copyright &copy; {% current_year %} {% organization %}<br />
-    <a href="{% url telemeta-flatpage "legal_notices" %}">{% trans "Legal notices" %}</a>
-    </p>
-   </td>
-  </tr>
- </table>
-</div>
-{% endblock %}
-</div>
-{% endblock layout %}
-
-{% block analytics %}
-{% endblock analytics %}
-
-</body>
-</html>
diff --git a/telemeta/templates/telemeta_default/base_xspf.xml b/telemeta/templates/telemeta_default/base_xspf.xml
deleted file mode 100644 (file)
index af4166b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<playlist version="1" xmlns="http://xspf.org/ns/0/">
-{% block listinfo %}{% endblock %}
-  <trackList>
-  {% block tracklist %}{% endblock %}
-  </trackList>
-</playlist>
-
-
diff --git a/telemeta/templates/telemeta_default/collection.m3u b/telemeta/templates/telemeta_default/collection.m3u
deleted file mode 100644 (file)
index 2f00ed1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U{% load telemeta_utils %}{% for item in collection.items.all %}
-#EXTINF:{{ item.get_duration }},{{ item }}
-http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}{% endfor %}
diff --git a/telemeta/templates/telemeta_default/collection_add.html b/telemeta/templates/telemeta_default/collection_add.html
deleted file mode 100644 (file)
index abbda5b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-{% extends "telemeta/collection_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title %}
-    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : NEW
-{% endblock %}
-
-{% block title_buttons %}
-     <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block infos %}
-        <div class="infos">
-        <form method="post" id ="_addCollectionForm" action="">{% csrf_token %}
-        <table>
-        <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
-        {% for field in form %}
-         <tr>
-        {% if field.html_name == "copied_from_item" or field.html_name == "doctype_code" %}
-            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-        {% else %}
-            <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
-        {% endif %}
-        </tr>
-        {% endfor %}
-        </table>
-        <div align="center" style="margin-top:3ex;">
-            <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-            <a href="#" class="component_icon button icon_save"
-                onclick="document.getElementById('_addCollectionForm').submit(); return false;">{% trans "Save" %}</a>
-        </div>
-        </form>
-        </div>
-{% endblock infos%}
-
-{% block delete %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/collection_detail.html b/telemeta/templates/telemeta_default/collection_detail.html
deleted file mode 100644 (file)
index d366290..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block head_title %}{% trans "Collection" %}{{collection|prepend:' : '}} - {{ block.super }}{% endblock %}
-
-{% block extra_javascript %}
-<script src="{% url telemeta-js "swfobject.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "popupdiv.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
-<script>
-    {% if user.is_authenticated %}
-    jQuery(document).ready(function(){
-        var p = playlistUtils;
-        
-        {% for playlist in playlists %}
-        p.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}');
-        {% endfor %}
-
-        {% if collection %}
-        var anchor = jQuery('#_add_to_playlist');
-        if(anchor.length){
-        anchor.click(function(){
-            p.showAddResourceToPlaylist(anchor,'collection','{{collection.id}}',gettrans('collection added to the selected playlist'));return false;
-        });
-        }
-        {% endif %}
-    });
-        {% endif %}
-</script>
-{% endblock %}
-
-{% if collection %}
-
-{% block title %}
-    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> 
-    Collection : 
-    <a href="{% url telemeta-collection-detail collection.public_id %}">{{ collection.title }}</a>
-{% endblock %}
-
-{% block title_buttons %}
-  <div class="fixedWidthAsPlayer">
-    {% if user.is_authenticated and perms.telemeta.change_mediacollection %}
-      <a href="{% url telemeta-collection-edit collection.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
-      <a href="{% url telemeta-collection-copy collection.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
-      <a href="{% url telemeta-collection-additem collection.public_id %}" class="component_icon button icon_add">{% trans "Add item" %}</a>
-     {% endif %}
-    {% if user.is_authenticated %}
-    <a href=# id ="_add_to_playlist" class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
-    {% endif %}
-    <a href="{% url telemeta-collection-dublincore collection.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
-   </div>
-{% endblock %}
-
-{% block content %}
-    <div class="{% if collection.has_mediafile %}{% if public_access or perms.telemeta.can_play_all_items %}with-rightcol{% endif %}{% endif %}">
-        {% if collection.has_mediafile %}
-        {% if public_access or perms.telemeta.can_play_all_items %}
-        <div id="rightcol">
-            <div id="collection_player">
-             <div class="title">
-              <h3><b>{% trans "Listen to this collection" %}</b>
-              (<a href="{% url telemeta-collection-m3u collection.public_id %}">M3U</a>,
-              <a href="{% url telemeta-collection-xspf collection.public_id %}">XSPF</a>)</h3>
-             </div>
-                <!-- This is Jeroen Wijering's Flash MP3 Player, 
-                  under CC Attribution-NonCommercial-ShareAlike 2.0 license
-                  from: http://www.jeroenwijering.com/?item=Flash_MP3_Player-->
-                <p id="collection_player_c">
-                  <a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.
-                </p>
-                <script type="text/javascript">
-                  var so = new SWFObject('{% url telemeta-swf "mp3player.swf" %}','playlist','362','200','7');
-                  so.addVariable("file","{% url telemeta-collection-xspf collection.public_id %}");
-                  so.addVariable("displayheight","0");
-                  so.addParam("wmode", "opaque");
-                  so.write('collection_player_c');
-                </script> 
-            </div>
-        </div>
-        {% endif %}
-        {% endif %}
-      {% block infos %}
-        <div class="intro">
-            <span><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% if collection.items.count %}{{ collection.items.count }} {% ifequal collection.items.count 1 %}item{% else %}items{% endifequal %}{% else %}No item{% endif %}</span>
-        </div>
-        <div class="infos">
-        {% block general_info %}
-            <dl class="listing">
-                {% dl_field collection "reference" %}
-                {% dl_field collection "title"  %}
-                {% dl_field collection "alt_title" %}
-                {% dl_field collection "creator" placeholder %}
-                {% dl_field collection "recording_context" %}
-                <dt>{% trans "Recording period" %}</dt>
-                    <dd>{% if collection.recorded_from_year %}{{ collection.recorded_from_year }}{% endif %}{% if collection.recorded_from_year and collection.recorded_to_year %} - {% endif %}{% if  collection.recorded_to_year %}{{ collection.recorded_to_year}}{% endif %}</dd>
-                {% dl_field collection "year_published" placeholder %}
-            </dl>
-        {% endblock general_info %}
-        </div>
-        <div class="extraInfos">
-        {% block geoethnic_data %}
-            <div>
-                <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4>
-                <div>
-                    <dl class="listing">
-                        {% dl_field collection "countries" join with ", " %}
-                        {% dl_field collection "ethnic_groups" join with ", " placeholder %}
-                    </dl>
-                </div>
-            </div>
-        {% endblock geoethnic_data %}
-        </div>
-        <div class="extraInfos">
-        {% block legal_data %}
-            <div>
-                <h4><a href="#">{% trans "Legal notices" %}</a></h4>
-                <div>
-                    <dl class="listing">
-                        {% if collection.collector_is_creator %}
-                          {% if collection.creator %}
-                          <dt>{% trans "Recordist" %}</dt><dd>{{ collection.creator }}</dd>
-                          {% endif%}
-                        {% else %}
-                        {% dl_field collection "collector" %}
-                        {% endif %}
-                        {% dl_field collection "publisher" %}
-                        {% dl_field collection "publisher_collection" %}
-                        {% dl_field collection "publisher_serial" %}
-                        {% dl_field collection "booklet_author" %}
-                        <dt>{% trans "Bibliographic references" %}</dt>
-                        <dd>{{ collection.external_references|html_line_break|safe }}</dd>
-                        {% dl_field collection "doctype_code" %}
-                        {% dl_field collection "public_access_label" %}
-                        {% dl_field collection "legal_rights" %}
-                    </dl>
-                </div>
-            </div>
-        {% endblock legal_data %}
-        </div>
-        <div class="extraInfos">
-        {% block archive_data %}
-            <div>
-                <h4><a href="#">{% trans "Archiving data" %}</a></h4>
-                <div>
-                    <dl class="listing">
-                        {% dl_field collection "acquisition_mode" %}
-                        {% dl_field collection "cnrs_contributor" %}
-                        {% dl_field collection "metadata_author" %}
-                        <dt>{% trans "Related documentation" %}</dt>
-                        <dd>{{ collection.booklet_description|html_line_break|safe }}</dd>
-                        {% dl_field collection "publishing_status" %}
-                        {% dl_field collection "alt_ids" %}
-                        <dt>{% trans "Comments" %}</dt>
-                        <dd>{{ collection.comment|html_line_break|safe }}</dd>
-                        {% dl_field collection "metadata_writer" %}
-                        {% dl_field collection "travail" %}
-                        {% dl_field collection "items_done" %}
-                        {% dl_field collection "conservation_site" %}
-                    </dl>
-                </div>
-            </div>
-        {% endblock archive_data %}
-        </div>
-        <div class="extraInfos">
-        {% block technical_data %}
-            <div>
-                <h4><a href="#">{% trans "Technical data" %}</a></h4>
-                <div>
-                    <dl class="listing">
-                        {% dl_field collection "code" %}
-                        {% dl_field collection "old_code" %}
-                        <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd>
-                        {% dl_field collection "approx_duration" %}
-                        {% dl_field collection "computed_duration" %}
-                        {% dl_field collection "physical_items_num" %}
-                        <div class="wazing"></div>
-                        <dt>{% trans "Number of items" %}</dt><dd>{{ collection.items.count }}</dd>
-                        {% dl_field collection "physical_format" %}
-                        {% dl_field collection "ad_conversion" %}
-                    </dl>
-                </div>
-            </div>
-        {% endblock technical_data %}
-        </div>
-        
-        <div class="extraInfos">
-            {% block related %}
-                {% include "telemeta/inc/collection_related.html" %}
-            {% endblock related %}
-        </div>
-        
-        <div class="extraInfos">
-        <h4><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> Items</h4>
-        {% with "1" as location_name %}
-            {% include "telemeta/inc/mediaitem_list.html" %}
-        {% endwith %}
-        </div>
-
-        {% endblock infos %}
-    </div>
-{% endblock %}
-
-{% block delete %}
-{% if user.is_authenticated and perms.telemeta.delete_mediacollection %}
- <a href="#" onclick="if(confirm(gettrans('delete the collection permanently?'))){window.location.href='{% url telemeta-collection-delete collection.public_id %}';};return false;"
-        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
-{% endif %}
-
-{% endblock %}
-
-{% else %}
-    <p>No such collection</p>
-{% endif %}
-
diff --git a/telemeta/templates/telemeta_default/collection_detail_dc.html b/telemeta/templates/telemeta_default/collection_detail_dc.html
deleted file mode 100644 (file)
index ea7c7af..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Collection" %}{{collection|prepend:': '}} - {{ block.super }}{% endblock %}
-
-{% if collection %}
-{% block title %}
-<h1>Collection: {{ collection }}</h1>
-{% endblock %}
-{% block title_buttons %}
-    <a class="component_icon button icon_previous" href="{% url telemeta-collection-detail collection.public_id %}">{% trans "Normal View" %}</a>
-{% endblock %}
-
-{% block content %}
-{% with collection|to_dublincore as resource %}
-{% include "telemeta/inc/dublincore.html" %}
-{% endwith %}
-
-{% endblock %}
-{% else %}
-    <p>{% trans "No such collection" %}</p>
-{% endif %}
diff --git a/telemeta/templates/telemeta_default/collection_edit.html b/telemeta/templates/telemeta_default/collection_edit.html
deleted file mode 100644 (file)
index 6cd84fa..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-{% extends "telemeta/collection_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title %}
-    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : {{ collection }}
-{% endblock %}
-{% block title_buttons %}
-    <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block infos %}
-     <div class="infos">
-      <form method="post" id="_editCollectionForm" action="">{% csrf_token %}
-       <table>
-       <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
-       {% for field in form %}
-       <tr>
-        {% if field.html_name == "copied_from_item" or field.html_name == "doctype_code" %}
-            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-        {% else %}
-            <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
-        {% endif %}
-        </tr>
-       {% endfor %}
-       </table>
-        <div align="center" style="margin-top:3ex;">
-         <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-         <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editCollectionForm').submit(); return false;">{% trans "Save" %}</a>
-        </div>
-      </form>
-     </div>
-{% endblock infos%}
-
-{% block delete %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/collection_list.html b/telemeta/templates/telemeta_default/collection_list.html
deleted file mode 100644 (file)
index 64ffd7c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Media Collections" %} - {{ block.super }}{% endblock %}
-
-{% block title%}
- <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> {% trans "Media Collections" %}
-{% endblock %}
-
-{% block title_buttons %}
-     <a href="{% url telemeta-collections %}" class="component_icon button icon_filter">{% trans "All" %}</a>
-     <a href="{% url telemeta-collections-unpublished %}" class="component_icon button icon_filter">{% trans "Unpublished" %}</a>
-     <a href="{% url telemeta-collections-published %}" class="component_icon button icon_filter">{% trans "Published" %}</a>
-     <a href="{% url telemeta-collections-sound %}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
-    {% if user.is_authenticated and perms.telemeta.add_mediacollection %}
-      <a href="{% url telemeta-collection-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
-    {% endif %}
-{% endblock %}
-
-{% block content %}
-{% with object_list as collections %}
-<div class="fullpage">
-{% include "telemeta/inc/collection_list.html" %}
-</div>
-{% endwith %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/collection_related_edit.html b/telemeta/templates/telemeta_default/collection_related_edit.html
deleted file mode 100644 (file)
index 4dd6b8c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends "telemeta/collection_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block extra_javascript %}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : {{ collection }}
-{% endblock %}
-
-{% block title_buttons %}
- <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block content %}
-  {% block infos %}    
-    <div class="infos">
-     <form enctype="multipart/form-data" method="post" id="_editMediaCollectionRelatedFileForm" action="">{% csrf_token %}
-
-    {{ formset.management_form }}
-    {% for form in formset.forms %}
-      <hr>
-      <table>
-        <tr><td><b>{% trans "Media" %} :</b><td></td></tr>
-        {% for field in form %}
-        <tr><td class="error">{{ field.errors }}</td></tr>
-        <tr>
-            {% if "media_collection" in field.html_name or "id" in field.html_name or "collection" in field.html_name or "mime_type" in field.html_name %}
-                <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-            {% else %}
-                <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
-            {% endif %}
-        </tr>
-        {% endfor %}
-       </table>
-       <br />
-    {% endfor %}
-      <div align="center">
-        <a href="{% url telemeta-collection-detail collection.public_id %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-        <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editMediaCollectionRelatedFileForm').submit(); return false;">{% trans "Save" %}</a>
-       </div>
-     </form>
-    </div>
-  {% endblock infos %}
-{% endblock content %}
diff --git a/telemeta/templates/telemeta_default/collection_xspf.xml b/telemeta/templates/telemeta_default/collection_xspf.xml
deleted file mode 100644 (file)
index 317284b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% extends "telemeta/base_xspf.xml" %}
-{% load telemeta_utils %}
-
-{% block listinfo %} 
-{% with collection.to_dublincore.flatten as dc %}
-  <creator>{{ dc.creator }}</creator>
-  <title>{{ dc.title }}</title>
-  <info>http://{{ host }}{% url telemeta-collection-detail collection.public_id %}</info>
-{% endwith %}
-{% endblock %}
-
-{% block tracklist %}
-{% for item in collection.items.all %}
-    <track>
-      <title>{{ item }}</title>
-      <meta rel="type">mp3</meta>
-      <location>http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}</location>
-      <duration>{{ item.computed_duration.as_seconds|mul:1000 }}</duration>
-      <info>http://{{ host }}{% url telemeta-item-detail item.public_id %}</info>
-    </track>
-{% endfor %}
-{% endblock %}
-
diff --git a/telemeta/templates/telemeta_default/corpus_add.html b/telemeta/templates/telemeta_default/corpus_add.html
deleted file mode 100644 (file)
index e6e63e9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends "telemeta/corpus_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title %}
-    <img src="{% url telemeta-images "corpus_red.png" %}" style="vertical-align:middle" /> Corpus : NEW
-{% endblock %}
-
-{% block title_buttons %}
-     <a href="{% url telemeta-corpus %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block infos %}
-        <div class="infos">
-        <form method="post" id ="_addCorpusForm" action="">{% csrf_token %}
-        <table>
-        <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
-        {% for field in form %}
-         <tr>
-            <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
-        </tr>
-        {% endfor %}
-        </table>
-        <div align="center" style="margin-top:3ex;">
-            <a href="{% url telemeta-corpus %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-            <a href="#" class="component_icon button icon_save"
-                onclick="document.getElementById('_addCorpusForm').submit(); return false;">{% trans "Save" %}</a>
-        </div>
-        </form>
-        </div>
-{% endblock infos%}
-
-{% block delete %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/corpus_detail.html b/telemeta/templates/telemeta_default/corpus_detail.html
deleted file mode 100644 (file)
index b7e4b1d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block head_title %}{% trans "Corpus" %}{{corpus|prepend:' : '}} - {{ block.super }}{% endblock %}
-
-{% block extra_javascript %}
-{% endblock %}
-
-{% if corpus %}
-
-{% block title %}
-    <img src="{% url telemeta-images "corpuss_red.png" %}" style="vertical-align:middle" /> 
-    Collection : 
-    <a href="{% url telemeta-corpus-detail corpus.public_id %}">{{ corpus.title }}</a>
-{% endblock %}
-
-{% block title_buttons %}
-  <div class="fixedWidthAsPlayer">
-    {% if user.is_authenticated and perms.telemeta.change_mediacorpus %}
-      <a href="{% url telemeta-corpus-edit corpus.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
-      <a href="{% url telemeta-corpus-copy corpus.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
-     {% endif %}
-    {% if user.is_authenticated %}
-    <a href=# id ="_add_to_playlist" class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
-    {% endif %}
-    <a href="{% url telemeta-corpus-dublincore corpus.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
-   </div>
-{% endblock %}
-
-{% block content %}
-      {% block infos %}
-        <div class="intro">
-            <span><img src="{% url telemeta-images "collection_title.png" %}" style="vertical-align:middle" /> {% if corpus.items.count %}{{ corpus.collections.count }} {% ifequal corpus.collections.count 1 %}item{% else %}collections{% endifequal %}{% else %}No collection% endif %}</span>
-        </div>
-        <div class="infos">
-        {% block general_info %}
-            <dl class="listing">
-                {% dl_field corpus "reference" %}
-                {% dl_field corpus "title"  %}
-                {% dl_field corpus "description" %}
-                {% dl_field corpus "code" %}
-            </dl>
-        {% endblock general_info %}
-        
-        <div class="extraInfos">
-            {% block related %}
-                {% include "telemeta/inc/corpus_related.html" %}
-            {% endblock related %}
-        </div>
-        
-        <div class="extraInfos">
-        <h4><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> Collections</h4>
-        {% with "1" as location_name %}
-            {% include "telemeta/inc/mediacollection_list.html" %}
-        {% endwith %}
-        </div>
-
-        {% endblock infos %}
-    </div>
-{% endblock %}
-
-{% block delete %}
-{% if user.is_authenticated and perms.telemeta.delete_mediacorpus %}
- <a href="#" onclick="if(confirm(gettrans('delete the corpus permanently?'))){window.location.href='{% url telemeta-corpus-delete corpus.public_id %}';};return false;"
-        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
-{% endif %}
-
-{% endblock %}
-
-{% else %}
-    <p>No such corpus</p>
-{% endif %}
-
diff --git a/telemeta/templates/telemeta_default/corpus_edit.html b/telemeta/templates/telemeta_default/corpus_edit.html
deleted file mode 100644 (file)
index 23c56e7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-{% extends "telemeta/corpus_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title %}
-    <img src="{% url telemeta-images "corpus_red.png" %}" style="vertical-align:middle" /> Corpus : {{ corpus }}
-{% endblock %}
-{% block title_buttons %}
-    <a href="{% url telemeta-corpus-detail corpus.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block infos %}
-     <div class="infos">
-      <form method="post" id="_editCollectionForm" action="">{% csrf_token %}
-       <table>
-       <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
-       {% for field in form %}
-       <tr>
-            <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
-        </tr>
-       {% endfor %}
-       </table>
-        <div align="center" style="margin-top:3ex;">
-         <a href="{% url telemeta-corpus-detail corpus.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-         <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editCollectionForm').submit(); return false;">{% trans "Save" %}</a>
-        </div>
-      </form>
-     </div>
-{% endblock infos%}
-
-{% block delete %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/corpus_list.html b/telemeta/templates/telemeta_default/corpus_list.html
deleted file mode 100644 (file)
index 8486c0a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Media Corpus" %} - {{ block.super }}{% endblock %}
-
-{% block title%}
- <img src="{% url telemeta-images "corpus_red.png" %}" style="vertical-align:middle" /> {% trans "Media Corpus" %}
-{% endblock %}
-
-{% block title_buttons %}
-     <a href="{% url telemeta-corpus %}" class="component_icon button icon_filter">{% trans "All" %}</a>
-    {% if user.is_authenticated and perms.telemeta.add_mediacorpus %}
-      <a href="{% url telemeta-corpus-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
-    {% endif %}
-{% endblock %}
-
-{% block content %}
-{% with object_list as corpus %}
-<div class="fullpage">
-{% include "telemeta/inc/corpus_list.html" %}
-</div>
-{% endwith %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/country_info.html b/telemeta/templates/telemeta_default/country_info.html
deleted file mode 100644 (file)
index 0783dee..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-<h2>{{ country }}</h2>
-<p>
-<a href="{% url telemeta-geo-country-items continent.flatname,country.flatname %}">
-{{ country.items|resources_num }}
-</a>
-{% trans "in" %}
-<a href="{% url telemeta-geo-country-collections continent.flatname,country.flatname %}">
-{{ country.collections|resources_num }}
-</a>
-</p>
-<!--
-{% with country.items.all.ethnic_groups as ethnic_groups %}
-{% if ethnic_groups %}
-<p>
-<b>{% trans "Populations / Social groups" %}:</b>
-{{ ethnic_groups|join:', ' }}
-</p>
-{% endif %}
-{% endwith %}
--->
diff --git a/telemeta/templates/telemeta_default/enumeration_edit.html b/telemeta/templates/telemeta_default/enumeration_edit.html
deleted file mode 100644 (file)
index 56f17dd..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Enumeration" %}: {{ enumeration_name|capfirst }} - {{ block.super }}{% endblock %}
-
-{% block tabcontents %}
- <h4>{% trans "Enumeration" %}: {{ enumeration_name|capfirst }}</h4>
-
- <form class="addnew" id="_addenum" method="POST"
-        action="{% url telemeta-enumeration-add enumeration_id %}">{% csrf_token %}
-  <fieldset>
-   <legend>{% trans "Add entry" %}</legend>
-   <div class="field">
-    <label>{% trans "Value" %}: <input id="id_value_add" type="text" name="value"></label>
-
-   </div>
-   <div class="buttons">
-    <br />
-    <a href="#" class="component_icon button icon_add"
-      onclick="document.getElementById('_addenum').submit(); return false;">{% trans "Add" %}</a>
-   </div>
-  </fieldset>
- </form>
- {% if enumeration_values %}
- <form id="_updateenum" method="POST" action="{% url telemeta-enumeration-update enumeration_id %}">{% csrf_token %}
-  <table class="listing">
-   <thead>
-    <tr><th class="sel">&nbsp;</th><th>{% trans "Value"%}</th>
-
-    </tr>
-   </thead><tbody>
-    {% for record in enumeration_values %}
-    <tr>
-     <td><input type="checkbox" name="sel" value="{{record.id}}" /></td>
-     <td><a href="{% url telemeta-enumeration-record-edit enumeration_id,record.id %}">
-        {{record.value}}</a></td>
-    </tr>
-    {% endfor %}
-    </tbody>
-  </table>
-  <div class="buttons">
-   <br />
-   <a href="#" class="component_icon button icon_cancel"
-      onclick="document.getElementById('_updateenum').submit(); return false;">{% trans "Remove selected items" %}</a>
-  </div>
- </form>
- {% else %}
-    <p class="help">{% trans "This enumeration is empty" %}</p>
- {% endif %}
-
-  <br style="clear: right"/>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/enumeration_edit_value.html b/telemeta/templates/telemeta_default/enumeration_edit_value.html
deleted file mode 100644 (file)
index 103f9ff..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Enumeration" %}: {{ enumeration_name|capfirst }} - {{ block.super }}{% endblock %}
-
-{% block tabcontents %}
- <h4>{% trans "Enumeration" %}: {{ enumeration_name|capfirst }}</h4>
-
- <form class="mod" id="addenum" method="post"
-    action="{% url telemeta-enumeration-record-update enumeration_id,enumeration_record.id %}">{% csrf_token %}
-  <fieldset>
-   <legend>{% trans "Modify an entry" %}</legend>
-   <div class="field">
-    <label>{% trans "Value" %}: <input id="id_value_edit" type="text" name="value" value="{{enumeration_record.value}}" /></label>
-
-   </div>
-   <br />
-   <div class="buttons">
-        <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('addenum').submit(); return false;">{% trans "Save" %}</a>
-        <a href="{% url telemeta-enumeration-edit enumeration_id %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-   </div>
-  </fieldset>
- </form>
-  <br style="clear: right"/>
-
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/flatpage.html b/telemeta/templates/telemeta_default/flatpage.html
deleted file mode 100644 (file)
index 6b2b55f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% block content %}
-{{ page_content|render_flatpage }}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/fund_add.html b/telemeta/templates/telemeta_default/fund_add.html
deleted file mode 100644 (file)
index 7ae7d36..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends "telemeta/fund_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title %}
-    <img src="{% url telemeta-images "fund_red.png" %}" style="vertical-align:middle" /> Corpus : NEW
-{% endblock %}
-
-{% block title_buttons %}
-     <a href="{% url telemeta-fund %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block infos %}
-        <div class="infos">
-        <form method="post" id ="_addCorpusForm" action="">{% csrf_token %}
-        <table>
-        <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
-        {% for field in form %}
-         <tr>
-            <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
-        </tr>
-        {% endfor %}
-        </table>
-        <div align="center" style="margin-top:3ex;">
-            <a href="{% url telemeta-fund %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-            <a href="#" class="component_icon button icon_save"
-                onclick="document.getElementById('_addCorpusForm').submit(); return false;">{% trans "Save" %}</a>
-        </div>
-        </form>
-        </div>
-{% endblock infos%}
-
-{% block delete %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/fund_detail.html b/telemeta/templates/telemeta_default/fund_detail.html
deleted file mode 100644 (file)
index 0df73c7..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block head_title %}{% trans "Funds" %}{{fund|prepend:' : '}} - {{ block.super }}{% endblock %}
-
-{% block extra_javascript %}
-{% endblock %}
-
-{% if fund %}
-
-{% block title %}
-    <img src="{% url telemeta-images "funds_red.png" %}" style="vertical-align:middle" /> 
-    Collection : 
-    <a href="{% url telemeta-fund-detail fund.public_id %}">{{ fund.title }}</a>
-{% endblock %}
-
-{% block title_buttons %}
-  <div class="fixedWidthAsPlayer">
-    {% if user.is_authenticated and perms.telemeta.change_mediafund %}
-      <a href="{% url telemeta-fund-edit fund.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
-      <a href="{% url telemeta-fund-copy fund.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
-     {% endif %}
-    {% if user.is_authenticated %}
-    <a href=# id ="_add_to_playlist" class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
-    {% endif %}
-    <a href="{% url telemeta-fund-dublincore fund.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
-   </div>
-{% endblock %}
-
-{% block content %}
-      {% block infos %}
-        <div class="intro">
-            <span><img src="{% url telemeta-images "corpus_title.png" %}" style="vertical-align:middle" /> {% if fund.corpus.count %}{{ fund.corpus.count }} {% ifequal fund.corpus.count 1 %}item{% else %}corpus{% endifequal %}{% else %}No corpus% endif %}</span>
-        </div>
-        <div class="infos">
-        {% block general_info %}
-            <dl class="listing">
-                {% dl_field fund "reference" %}
-                {% dl_field fund "title"  %}
-                {% dl_field fund "description" %}
-                {% dl_field fund "code" %}
-            </dl>
-        {% endblock general_info %}
-        
-        <div class="extraInfos">
-            {% block related %}
-                {% include "telemeta/inc/fund_related.html" %}
-            {% endblock related %}
-        </div>
-        
-        <div class="extraInfos">
-        <h4><img src="{% url telemeta-images "copus_title.png" %}" style="vertical-align:middle" /> Corpus</h4>
-        {% with "1" as location_name %}
-            {% include "telemeta/inc/corpus_list.html" %}
-        {% endwith %}
-        </div>
-
-        {% endblock infos %}
-    </div>
-{% endblock %}
-
-{% block delete %}
-{% if user.is_authenticated and perms.telemeta.delete_mediafund %}
- <a href="#" onclick="if(confirm(gettrans('delete the fund permanently?'))){window.location.href='{% url telemeta-fund-delete fund.public_id %}';};return false;"
-        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
-{% endif %}
-
-{% endblock %}
-
-{% else %}
-    <p>No such fund</p>
-{% endif %}
-
diff --git a/telemeta/templates/telemeta_default/fund_edit.html b/telemeta/templates/telemeta_default/fund_edit.html
deleted file mode 100644 (file)
index 8a1520f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-{% extends "telemeta/fund_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title %}
-    <img src="{% url telemeta-images "fund_red.png" %}" style="vertical-align:middle" /> Fund : {{ fund }}
-{% endblock %}
-{% block title_buttons %}
-    <a href="{% url telemeta-fund-detail fund.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block infos %}
-     <div class="infos">
-      <form method="post" id="_editCollectionForm" action="">{% csrf_token %}
-       <table>
-       <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
-       {% for field in form %}
-       <tr>
-            <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
-        </tr>
-       {% endfor %}
-       </table>
-        <div align="center" style="margin-top:3ex;">
-         <a href="{% url telemeta-fund-detail fund.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-         <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editCollectionForm').submit(); return false;">{% trans "Save" %}</a>
-        </div>
-      </form>
-     </div>
-{% endblock infos%}
-
-{% block delete %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/fund_list.html b/telemeta/templates/telemeta_default/fund_list.html
deleted file mode 100644 (file)
index 0c89303..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Media Funds" %} - {{ block.super }}{% endblock %}
-
-{% block title%}
- <img src="{% url telemeta-images "funds_red.png" %}" style="vertical-align:middle" /> {% trans "Media Funds" %}
-{% endblock %}
-
-{% block title_buttons %}
-     <a href="{% url telemeta-funds %}" class="component_icon button icon_filter">{% trans "All" %}</a>
-    {% if user.is_authenticated and perms.telemeta.add_mediafunds %}
-      <a href="{% url telemeta-funds-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
-    {% endif %}
-{% endblock %}
-
-{% block content %}
-{% with object_list as funds %}
-<div class="fullpage">
-{% include "telemeta/inc/fund_list.html" %}
-</div>
-{% endwith %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/geo_continents.html b/telemeta/templates/telemeta_default/geo_continents.html
deleted file mode 100644 (file)
index 6e36b61..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
-
-{% block extra_javascript %}
-{% if gmap_key %}
-<script src="http://www.google.com/jsapi?key={{ gmap_key }}" type="text/javascript"></script>
-<script src="{% url telemeta-js "resourcemap.js" %}" type="text/javascript"></script>
-<script type="text/javascript">
-var resourceMap = new ResourceMap('.continents', {
-    'countryInfoUri': '/geo/country_info/RESOURCEID/'
-});
-</script>
-{% endif %}
-{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "world_red.png" %}" alt="geo-navigator" style="vertical-align:middle" /> {% trans "Geographic Navigator" %}
-{% endblock %}
-
-{% block title_buttons %}
-        {% if continents %}
-        <a href="#" onclick="resourceMap.toggle('map'); return false;" class="component button">{% trans "Map" %}</a> |
-        <a href="#" onclick="resourceMap.toggle('list'); return false;" class="component button">{% trans "List" %}</a>
-        {% endif %}
-{% endblock %}
-
-{% block content %}
-{% if continents %}
-<ul class="continents">
-{% for group in continents %}
-  <li class="name {% if not forloop.counter0|divisibleby:"2" %}odd{% endif %}"><b><a href="{% url telemeta-geo-countries group.continent.flatname %}">{{ group.continent }}</a></b>
-    <ul>
-    {% for country in group.countries %}
-      <li id="resource-{{country.id}}" class="country_name resourcemap-element">
-        <a href="{% url telemeta-geo-country-collections group.continent.flatname,country.flatname %}">
-          <span class="resourcemap-name">{{ country }}</span></a>
-        {% if not country.latitude|is_none and not country.longitude|is_none %}
-        <input type="hidden" class="resourcemap-lat" value="{{country.latitude}}" />
-        <input type="hidden" class="resourcemap-lng" value="{{country.longitude}}" />
-        {% endif %}
-      </li>
-    {% endfor %}
-    </ul>
-  </li>
-{% endfor %}
-</ul>
-{% else %}
-<p>No data</p>
-{% endif %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/geo_countries.html b/telemeta/templates/telemeta_default/geo_countries.html
deleted file mode 100644 (file)
index 1c92015..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{{ continent }} - {% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "world_red.png" %}" alt="geo-countries" style="vertical-align:middle" /> <a href="{% url telemeta-geo-continents %}">{% trans "World" %}</a> / {{ continent }}
-{% endblock title %}
-
-{% block content %}
-<table class="listing">
-    <tr>
-        <th>{% trans "Country" %}</th>
-        <th>{% trans "Number of collections" %}</th>
-        <th>{% trans "Number of items" %}</th>
-    </tr>
-    {% for country in countries %}
-    <tr>
-    <td>{{ country }}</td>
-    <td>
-    {% with country.collections.count as num %}
-    <a href="{% url telemeta-geo-country-collections continent.flatname,country.flatname %}">
-    {% blocktrans count num as counter %}1 collection{% plural %}{{ counter }} collections{% endblocktrans %}
-    </a>
-    {% endwith %}
-    </td>
-    <td>
-    {% with country.items.count as num %}
-    <a href="{% url telemeta-geo-country-items continent.flatname,country.flatname %}">
-    {% blocktrans count num as counter %}1 item{% plural %}{{ counter }} items {% endblocktrans %}
-    </a>
-    {% endwith %}
-    </td>
-    </tr>  
-{% endfor %}
-</table>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/geo_country_collections.html b/telemeta/templates/telemeta_default/geo_country_collections.html
deleted file mode 100644 (file)
index f1da15c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{{ country }} - {% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
-<img src="{% url telemeta-images "world_red.png" %}" alt="geo-country" style="vertical-align:middle" /> <a href="{% url telemeta-geo-continents %}">{% trans "World" %}</a> /
-  <a href="{% url telemeta-geo-countries continent.flatname %}">{{ continent }}</a> / {{ country }}
-{% endblock title %}
-
-{% block content %}
-{% with object_list as collections %}
-<div class="fullpage">
-{% include "telemeta/inc/collection_list.html" %}
-</div>
-{% endwith %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/geo_country_items.html b/telemeta/templates/telemeta_default/geo_country_items.html
deleted file mode 100644 (file)
index d1e1829..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{{ country }} - {% trans "Geographic Navigator" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
-<a href="{% url telemeta-geo-continents %}">{% trans "World" %}</a> /
-  <a href="{% url telemeta-geo-countries continent.flatname %}">{{ continent }}</a> 
-  / {{ country }}
-{% endblock title %}
-
-{% block content %}
-{% with object_list as items %}
-<div class="fullpage">
-{% include "telemeta/inc/mediaitem_list.html" %}
-</div>
-{% endwith %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/home.html b/telemeta/templates/telemeta_default/home.html
deleted file mode 100644 (file)
index 8b2bf7b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block extra_javascript %}
-<script src="{% url telemeta-js "popupdiv-min.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
-<script>
-    jQuery(window).ready(function(){
-        var p = playlistUtils;
-        var a = jQuery('#_new_playlist'); 
-        a.unbind('click').click(function(){p.showAdd(a);return false;});
-    });
-   
-</script>
-{% endblock %}
-
-{% block content %}
-<div id="module-set" style="width: 33%">
-    {% block modules %}
-    {% include "telemeta/inc/module_revisions.html" %}
-    {% endblock %}
-</div>
-<div class="home-description">
-    <h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" /> {% trans "Playlists" %}</h1>
-    <a href=# id="_new_playlist" style="float:right" class="component_icon button icon_add">
-        {% trans "Add" %}</a>
-    {% for playlist in playlists %}
-    <table class="listing" style="width:100%;margin-top: 3em">
-        <tr>
-            <td style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 100%">{{ playlist.playlist.title }}</td>
-            <td style="width:66ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
-                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'collections' %}" class="component_icon button icon_csv">CSV Collections</a>
-                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'items' %}" class="component_icon button icon_csv">CSV Items</a>
-                <a href="#" id="{{playlist.playlist.public_id}}" onclick="playlistUtils.remove(this.id);return false;" class="component_icon button icon_cancel">{% trans "Delete" %}</a>
-            </td>
-        </tr>
-        {% if playlist.playlist.description %}
-         <tr>
-          <td colspan="2" style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 80%">{{ playlist.playlist.description }}</td>
-         </tr>
-        {% endif %}  
-    </table>
-    <table class="listing" width="100%">
-        <tr>
-            <th class="highlight">{% trans "Title" %}</th>
-            <th>{% trans "Type" %}</th>
-            <th>{% trans "Code" %}</th>
-            <th>{% trans "Recordist" %}</th>
-            <th>{% trans "Recording period" %}</th>
-            <th>{% trans "Sound" %}</th>
-            <th>{% trans "Action" %}</th>
-        </tr>
-        {% for resource in playlist.resources %}
-        <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td>
-                {% if resource.type == "item" and not resource.element == None %}
-                <a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
-                {% endif %}
-                {% if resource.type == "collection" and not resource.element == None %}
-                <a href="{% url telemeta-collection-detail resource.element.public_id %}">{% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %}</a>
-                {% endif %}
-                {% if resource.type == "marker" and not resource.element == None  %}
-                <a href="{% url telemeta-item-detail-marker resource.element.public_id %}">{{ resource.element }}</a>
-                {% endif %}
-                {% if resource.element == None %}{% trans "deleted" %}{% endif %}
-            </td>
-            <td>{{ resource.type }}</td>
-            <td>
-                {{ resource.element.public_id }}
-            </td>
-            <td>{{ resource.element.apparent_collector }}</td>
-
-            <td>
-                {% if resource.element.recorded_from_date %}
-                {{ resource.element.recorded_from_date.year }}
-                {% if resource.element.recorded_to_date and not resource.element.recorded_to_date.year|equals:resource.element.recorded_from_date.year %}
-                - {{ resource.element.recorded_to_date.year }}
-                {% endif %}
-                {% endif %}
-            </td>
-            <td align="center" style="vertical-align:middle">
-                {% if resource.element.file or resource.element.has_mediafile %}
-                <img src="{% url telemeta-images "ok.png" %}" alt="yes" style="vertical-align:middle" /></a>
-                {% endif %}
-            </td>
-            <td style="vertical-align:middle">
-                <a href="#" onclick="playlistUtils.removeResource('{{resource.public_id}}');return false;" class="component_icon button icon_cancel" style="padding: 4px 12px;"></a>
-            </td>
-        </tr>
-        {% endfor %}
-    </table>
-    {% endfor %}
-</div>
-{% endblock %}
-
diff --git a/telemeta/templates/telemeta_default/inc/collection_list.html b/telemeta/templates/telemeta_default/inc/collection_list.html
deleted file mode 100644 (file)
index 24c6865..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-{% if collections %}
-{% if hits %}
-
-<p class="pagination">
-{% blocktrans %}Collections {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
-| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
-</p>
-{% endif %}
-<table class="listing">
-<tr>
-    <th class="highlight">{% trans "Title" %}</th>
-    <th>{% trans "Code" %}</th>
-    <th>{% field_label "MediaCollection" "creator" %}</th>
-    <th>{% trans "Recordist" %}</th>
-    <th>{% trans "Recording period" %}</th>
-    <th>{% trans "Sound" %}</th>
-</tr>
-{% for collection in collections %}
-<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-    <td class="highlight">
-        <a href="{% url telemeta-collection-detail collection.public_id %}">{{ collection.title }}</a>
-    </td>
-    <td>
-        {{ collection.code|default:collection.old_code }}
-    </td>
-    <td>{{ collection.creator }}</td>
-    <td>{{ collection.apparent_collector }}</td>
-    <td>
-    {% if collection.recorded_from_year %}
-        {{ collection.recorded_from_year }}
-        {% if collection.recorded_to_year and not collection.recorded_to_year|equals:collection.recorded_from_year %}
-            - {{ collection.recorded_to_year }}
-        {% endif %}
-    {% endif %}
-    </td>
-    <td>
-      {% if collection.has_mediafile %}
-       <img src="images/ok.png" alt="yes" style="vertical-align:middle" />
-      {% endif %}
-    </td>
-</tr>
-{% endfor %}
-</table>
-{% else %}
-    <p>{% trans "No collection" %}</p>
-{% endif %}
-
diff --git a/telemeta/templates/telemeta_default/inc/collection_related.html b/telemeta/templates/telemeta_default/inc/collection_related.html
deleted file mode 100644 (file)
index 14a3513..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{% load i18n %}
-{% load telemeta_utils %}
-
-        <div>
-            <h4><a href="#">{% trans "Related media" %}</a></h4>
-            {% if related_media %}
-            <div>
-                <table class="instruments" width="100%">
-                    <thead>
-                        <tr>
-                            <td>{% trans "Media" %}</td>
-                            <td>{% trans "Preview" %}</td>
-                        </tr>
-                    </thead>
-                    <tbody>
-                        {% for media in related_media %}
-                        <tr>
-                            <td style="font-size: 1em;">
-                            <dl class="listing">
-                                <dt>{% trans "Title" %}</dt>
-                                <dd>
-                                    {% if media.url %}
-                                        <a href="{{ media.url }}" target="_blank">
-                                        {% if media.title %}
-                                            {{ media.title }}</a>
-                                        {% else %}
-                                            {{ media.url|get_filename }}</a>
-                                        {% endif %}
-                                    {% else %}
-                                        <a href="{% url telemeta-collection-related collection.public_id media.id %}" target="_blank">
-                                        {% if media.title %}
-                                            {{ media.title }}</a>
-                                        {% else %}
-                                            {{ media.file|get_filename }}</a>
-                                        {% endif %} 
-                                    {% endif %}
-                                </dd>
-                                <dt>{% trans "Description" %}</dt>
-                                <dd>{{ media.description|html_line_break|safe }}</dd>
-                                <dt>{% trans "Credits" %}</dt>
-                                <dd>{{ media.credits }}</dd>
-                                {% dl_field media "mime_type" %}
-                                <dt>{% trans "URL" %}</dt>
-                                <dd>
-                                {% if media.url %}
-                                    <a href="{{ media.url }}" target="_blank">{{ media.url }}</a>
-                                {% else %}
-                                    {% if media.file %}
-                                    <a href="{% url telemeta-collection-related collection.public_id media.id %}" target="_blank">
-                                    {% url telemeta-collection-related collection.public_id media.id %}
-                                    </a>
-                                    {% endif %}
-                                {% endif %}
-                                </dd>
-                            </dl>
-                            </td>
-
-                            <td style="padding-bottom: 1em;">{% if media.is_image %}
-                                  {% if media.url %}
-                                   <a href="{{ media.url }}">
-                                   <img src="{{ media.url }}" style="max-width: 420px; max-height: 200px;" /></a>
-                                  {% else %}
-                                   <a href="{% url telemeta-collection-related collection.public_id media.id %}">
-                                   <img src="{% url telemeta-collection-related collection.public_id media.id %}" style="max-width: 420px; max-height: 200px;" /></a>
-                                   {% endif %}
-                                {% else %}
-                                {% if media.url %}
-                                 {% if "youtu" in media.url %}
-                                 <iframe width="251" height="200" src="{{ media.url|get_youtube }}" frameborder="0" allowfullscreen></iframe>
-                                 {% endif %}
-                                {% endif %}
-                                {% endif %}
-                            </td>
-                        </tr>
-                        {% endfor %}
-                    </tbody>
-                </table>
-            </div>
-            {% endif %}
-            {% if user.is_authenticated and perms.telemeta.change_mediacollection %}
-                <br /><a href="{% url telemeta-collection-related_edit collection.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "related media"%}</a>
-            {% endif %}
-        </div>
diff --git a/telemeta/templates/telemeta_default/inc/corpus_list.html b/telemeta/templates/telemeta_default/inc/corpus_list.html
deleted file mode 100644 (file)
index 1e50ea3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-{% if corpi %}
-{% if hits %}
-
-<p class="pagination">
-{% blocktrans %}Corpus {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
-| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
-</p>
-{% endif %}
-<table class="listing">
-<tr>
-    <th class="highlight">{% trans "Title" %}</th>
-    <th>{% trans "Description" %}</th>
-    <th>{% trans "Code" %}</th>
-    <th>{% trans "Reference" %}</th>
-</tr>
-{% for corpus in corpi %}
-<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-    <td class="highlight">
-        <a href="{% url telemeta-corpus-detail corpus.public_id %}">{{ corpus.title }}</a>
-    </td>
-    <td>{{ corpus.code }}</td>
-    <td>{{ corpus.reference }}</td>
-</tr>
-{% endfor %}
-</table>
-{% else %}
-    <p>{% trans "No corpus" %}</p>
-{% endif %}
-
diff --git a/telemeta/templates/telemeta_default/inc/dublincore.html b/telemeta/templates/telemeta_default/inc/dublincore.html
deleted file mode 100644 (file)
index 9d2a151..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-    <h4 class="dublincore">{% trans "Dublin Core Metadata" %}</h4>
-    <dl class="dublincore">
-        <dt class="caption"><span>Element</span>Refinement</dt><dd class="caption">Value</dd>
-        {% for element in resource.elements %}
-        <dt><span>{{ element.name }}</span>{{ element.refinement|default:"&nbsp;" }}</dt>
-        <dd>
-        {% if element.related|is_item or element.related|is_collection %}
-            {% if element.related|is_item %}
-            <a href="{% url telemeta-item-dublincore element.related.public_id %}">{{ element.value }}</a>
-            {% else %}
-            <a href="{% url telemeta-collection-dublincore element.related.public_id %}">{{ element.value }}</a>
-            {% endif %}
-        {% else %}
-            {{ element.value }}
-        {% endif %}
-        </dd>
-        {% endfor %}
-    </dl>
diff --git a/telemeta/templates/telemeta_default/inc/fund_list.html b/telemeta/templates/telemeta_default/inc/fund_list.html
deleted file mode 100644 (file)
index 00f5e8d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-{% if funds %}
-{% if hits %}
-
-<p class="pagination">
-{% blocktrans %}Funds {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
-| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
-</p>
-{% endif %}
-<table class="listing">
-<tr>
-    <th class="highlight">{% trans "Title" %}</th>
-    <th>{% trans "Description" %}</th>
-    <th>{% trans "Code" %}</th>
-    <th>{% trans "Reference" %}</th>
-</tr>
-{% for fund in funds %}
-<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-    <td class="highlight">
-        <a href="{% url telemeta-funds-detail funds.public_id %}">{{ fund.title }}</a>
-    </td>
-    <td>{{ fund.code }}</td>
-    <td>{{ fund.reference }}</td>
-</tr>
-{% endfor %}
-</table>
-{% else %}
-    <p>{% trans "No fund" %}</p>
-{% endif %}
-
diff --git a/telemeta/templates/telemeta_default/inc/mediaitem_list.html b/telemeta/templates/telemeta_default/inc/mediaitem_list.html
deleted file mode 100644 (file)
index cc09245..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-{% if items %}
-
-{% if hits %}
-<p class="pagination">
-{% blocktrans %}Items {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
-| Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
-</p>
-{% endif %}
-
-<table class="listing">
-<tr>
-    <th class="highlight">{% trans "Title" %}</th>
-    <th>{% trans "Code" %}</th>
-    <th>{% trans "Recordist" %}</th>
-    {% if location_name %}
-    <th>{% trans "Location" %}</th>
-    {% else %}
-    <th>{% trans "Country/Continent" %}</th>
-    {% endif %}
-    <th>{% trans "Year of recording" %}</th>
-    <th>{% trans "Sound" %}</th>
-</tr>
-{% for item in items %}
-<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-    <td class="highlight">
-        <a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>
-    </td>
-    <td>
-        {{ item.code|default:item.old_code }}
-    </td>
-    <td>{{ item.apparent_collector }}</td>
-    {% if location_name %}
-    <td>{{ item.location.name }}</td>
-    {% else %}
-    <td>{{ item.country_or_continent|default:'&nbsp;' }}</td>
-    {% endif %}
-    <td>
-    {% if item.recorded_from_date %}
-        {{ item.recorded_from_date.year }}
-        {% if item.recorded_to_date and not item.recorded_to_date.year|equals:item.recorded_from_date.year %}
-            - {{ item.recorded_to_date.year }}
-        {% endif %}
-    {% endif %}
-    </td>
-    <td align="center">
-        {% if item.file %}
-         <a href="{% url telemeta-item-detail item.public_id %}">
-          <img src="images/ok.png" alt="yes" style="vertical-align:middle" /></a>
-        {% endif %}
-    </td>
-</tr>
-{% endfor %}
-</table>
-
-{% else %}
-    <p>{% trans "No item" %}</p>
-{% endif %}
-
diff --git a/telemeta/templates/telemeta_default/inc/mediaitem_related.html b/telemeta/templates/telemeta_default/inc/mediaitem_related.html
deleted file mode 100644 (file)
index ecb5448..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{% load i18n %}
-{% load telemeta_utils %}
-
-        <div>
-            <h4><a href="#">{% trans "Related media" %}</a></h4>
-            {% if related_media %}
-            <div>
-                <table class="instruments" width="100%">
-                    <thead>
-                        <tr>
-                            <td>{% trans "Media" %}</td>
-                            <td>{% trans "Preview" %}</td>
-                        </tr>
-                    </thead>
-                    <tbody>
-                        {% for media in related_media %}
-                        <tr>
-                            <td style="font-size: 1em;">
-                            <dl class="listing">
-                                <dt>{% trans "Title" %}</dt>
-                                <dd>
-                                    {% if media.url %}
-                                        <a href="{{ media.url }}" target="_blank">
-                                        {% if media.title %}
-                                            {{ media.title }}</a>
-                                        {% else %}
-                                            {{ media.url|get_filename }}</a>
-                                        {% endif %}
-                                    {% else %}
-                                        <a href="{% url telemeta-item-related item.public_id media.id %}" target="_blank">
-                                        {% if media.title %}
-                                            {{ media.title }}</a>
-                                        {% else %}
-                                            {{ media.file|get_filename }}</a>
-                                        {% endif %} 
-                                    {% endif %}
-                                </dd>
-                                <dt>{% trans "Description" %}</dt>
-                                <dd>{{ media.description|html_line_break|safe }}</dd>
-                                <dt>{% trans "Credits" %}</dt>
-                                <dd>{{ media.credits }}</dd>
-                                {% dl_field media "mime_type" %}
-                                <dt>{% trans "URL" %}</dt>
-                                <dd>
-                                {% if media.url %}
-                                    <a href="{{ media.url }}" target="_blank">{{ media.url }}</a>
-                                {% else %}
-                                    {% if media.file %}
-                                    <a href="{% url telemeta-item-related item.public_id media.id %}" target="_blank">
-                                    {% url telemeta-item-related item.public_id media.id %}
-                                    </a>
-                                    {% endif %}
-                                {% endif %}
-                                </dd>
-                            </dl>
-                            </td>
-
-                            <td style="padding-bottom: 1em;">{% if media.is_image %}
-                                  {% if media.url %}
-                                   <a href="{{ media.url }}">
-                                   <img src="{{ media.url }}" style="max-width: 420px; max-height: 200px;" /></a>
-                                  {% else %}
-                                   <a href="{% url telemeta-item-related item.public_id media.id %}">
-                                   <img src="{% url telemeta-item-related item.public_id media.id %}" style="max-width: 420px; max-height: 200px;" /></a>
-                                   {% endif %}
-                                {% else %}
-                                {% if media.url %}
-                                 {% if "youtu" in media.url %}
-                                 <iframe width="251" height="200" src="{{ media.url|get_youtube }}" frameborder="0" allowfullscreen></iframe>
-                                 {% endif %}
-                                {% endif %}
-                                {% endif %}
-                            </td>
-                        </tr>
-                        {% endfor %}
-                    </tbody>
-                </table>
-            </div>
-            {% endif %}
-            {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
-                <br /><a href="{% url telemeta-item-related_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "related media"%}</a>
-            {% endif %}
-        </div>
diff --git a/telemeta/templates/telemeta_default/inc/module_revisions.html b/telemeta/templates/telemeta_default/inc/module_revisions.html
deleted file mode 100644 (file)
index 5df1615..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-   <div class="module">
-    <h3><a href="{% url telemeta-rss %}">
-      <img src="{% url telemeta-images "rss.png" %}" alt="rss" style="vertical-align:middle" /></a>
-      {% trans "Last changes" %}</h3>
-      <a href="/rss" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
-    <div class="vscroll">
-    <table class="listing" bgcolor="#FFFFFF" style="width: 100%">
-      <tr>
-        <th class="highlight">{% trans "Date" %}</th>
-        <th>{% trans "Title" %}</th>
-        <th>{% trans "Type" %}</th>
-        <th>{% trans "User" %}</th>
-      </tr>
-    {% for r in revisions %}
-     <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td>{{ r.revision.time }}</td>
-        <td>
-        {% if r.element %}
-            {% if r.revision.element_type == "collection" %}
-            <a href="{% url telemeta-collection-detail r.element.public_id %}">{{ r.element.title }}</a>
-            {% endif %}
-            {% if r.revision.element_type == "item" %}
-            <a href="{% url telemeta-item-detail r.element.public_id %}">
-            {% if r.element.title != '' %}{{ r.element.title }}{% else %}{{ r.element.collection.title }} - {{ r.element.track }}{% endif %}</a>
-            {% endif %}
-            {% if r.revision.element_type == "marker" %}
-            <a href="{% url telemeta-item-detail-marker r.element.public_id %}">{{ r.element.title }}</a>
-            {% endif %}
-        {% else %}
-            {% trans "deleted" %}
-        {% endif %}
-        </td>
-        <td>{{ r.revision.element_type }}</td>
-        <td>{% if r.revision.user %}<a href="{% url telemeta-profile-detail r.revision.user.username %}">{{ r.revision.user.username }}</a>{% endif %}</td>
-      </tr>
-    {% endfor %}
-    </table>
-    </div>
-   </div>
\ No newline at end of file
diff --git a/telemeta/templates/telemeta_default/inc/user_list.html b/telemeta/templates/telemeta_default/inc/user_list.html
deleted file mode 100644 (file)
index a82240a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% load i18n %}
-{% load telemeta_utils %}
-
-  <table class="listing" width="100%">
-   <thead>
-    <tr><th>{% trans "User"%}</th>
-    <th>{% trans "First Name"%}</th>
-    <th>{% trans "Last Name"%}</th>
-    <th>{% trans "E-mail"%}</th>
-    <th>{% trans "Groups"%}</th>
-    </tr>
-   </thead><tbody>
-    {% for user in users %}
-    <tr>
-     <td><a href="{% url telemeta-profile-detail user.username %}">{{user.username}}</a></td>
-     <td>{{ user.first_name }}</td>
-     <td>{{ user.last_name }}</td>
-     <td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td>
-     <td>{% for group in user.groups.all %}{{ group }} {% endfor %}</td>
-    </tr>
-    {% endfor %}
-    </tbody>
-  </table>
\ No newline at end of file
diff --git a/telemeta/templates/telemeta_default/index.html b/telemeta/templates/telemeta_default/index.html
deleted file mode 100644 (file)
index a5bf2dc..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block content %}
-<div class="home-content">
-<div id="module-set">
-
-{% block modules %}
-
-{% if sound_pub_item %}
-<div id="module" class="module">
-    <h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlist" style="vertical-align:middle" />
-    {% trans "Musical selection" %}</h3>
-    <ul class="playlist">
-    <li><a href="{% url telemeta-item-detail sound_pub_item.public_id %}"><b>{{ sound_pub_item }}</b></a>{% if sound_pub_item.alt_title %} ({{ sound_pub_item.alt_title }}){% endif %}<br /><span style="font-size: 90%">{{ sound_pub_item.location.fullnames|to_string }}</span><br />
-<iframe width='376' height='215' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/items/{{ sound_pub_item.public_id }}/player/362x130/'></iframe>
-    </li>
-    </ul>
-</div>
-{% endif %}
-
-<div class="module">
-    <h3><img src="{% url telemeta-images "module_world.png" %}" alt="world" style="vertical-align:middle" />
-    {% trans "Geo Navigator" %}</h3>
-    <a class="image-link" href="{% url telemeta-geo-continents %}">
-    <img class="map-thumbnail" src="{% url telemeta-images "world2.png" %}" alt="{% trans "Open the geographic navigator" %}" style="width:398px" /></a>
-</div>
-
-{% include "telemeta/inc/module_revisions.html" %}
-
-{{ block.super }}
-<div id="module" class="module">
-    <h3><img src="/images/module_playlist.png" style="vertical-align:middle" />
-    Partenaires</h3><br />
-    <div style="background-color: white; padding: 1ex;" align="center">
-    <a href="http://www.cnrs.fr"><img class="image-link" src="{% url telemeta-images "logo-CNRS.png" %}" alt="CNRS"></a>&nbsp;&nbsp;&nbsp;
-    <a href="http://www.culture.gouv.fr"><img class="image-link" src="{% url telemeta-images "logo_mcc_2.png" %}" alt="MCC"></a>&nbsp;&nbsp;
-    <a href="http://www.mnhn.fr"><img class="image-link" src="{% url telemeta-images "logo-mnhn.gif" %}" alt="MNHN"></a>
-    <br /><br />
-    <a href="http://www.tge-adonis.fr"><img class="image-link" src="{% url telemeta-images "logo-adonis.jpg" %}" alt="TGE Adonis"></a>
-    </div>
-</div>
-
-{% endblock %}
-
-</div>
-
-<div class="home-description">
-<img class="align-left" src="{% url telemeta-images "vox.png" %}" alt="vox" style="vertical-align:middle;" />
-{{ page_content|render_flatpage }}
-</div>
-
-{% if sound_pub_items %}
-<div style="margin-top: 1ex;">
-<h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" />
-    {% trans "Musical selection" %}</h1>
-<table style="font-size: 90%"><tr>
-{% for item in sound_pub_items %}
-<td width="390"><a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>{% if item.alt_title %} ({{ item.alt_title }}){% endif %}<br /><span style="font-size: 80%">{{ item.location.fullnames|to_string }}</span><br />
-<iframe width='376' height='220' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/items/{{ item.public_id }}/player/362x130/'></iframe></td>
-{% endfor %}
-</tr>
-</table>
-</div>
-{% endif %}
-
-</div>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/instrument_edit.html b/telemeta/templates/telemeta_default/instrument_edit.html
deleted file mode 100644 (file)
index 4988a6f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Instruments" %} - {{ block.super }}{% endblock %}
-
-{% block tabcontents %}
- <h4>{% trans "Instruments" %}</h4>
- <form class="addnew" id="_addinstru" method="POST"
-        action="{% url telemeta-instrument-add %}">{% csrf_token %}
-  <fieldset>
-   <legend>{% trans "Add entry" %}</legend>
-   <div class="field">
-    <label>{% trans "Name" %}: <input type="text" name="value"></label>
-
-   </div>
-   <div class="buttons">
-    <br />
-    <a href="#" class="component_icon button icon_add"
-      onclick="document.getElementById('_addinstru').submit(); return false;">{% trans "Add" %}</a>
-   </div>
-  </fieldset>
- </form>
- {% if instruments %}
- <form id="_updateinstru" method="POST" action="{% url telemeta-instrument-update %}">{% csrf_token %}
-  <table class="listing">
-   <thead>
-    <tr><th class="sel">&nbsp;</th><th>{% trans "Name"%}</th></tr>
-   </thead><tbody>
-    {% for record in instruments %}
-    <tr>
-     <td><input type="checkbox" name="sel" value="{{record.id}}" /></td>
-     <td><a href="{% url telemeta-instrument-record-edit record.id %}">
-        {{record.name}}</a></td>
-    </tr>
-    {% endfor %}
-    </tbody>
-  </table>
-  <div class="buttons">
-   <br />
-   <a href="#" class="component_icon button icon_cancel"
-      onclick="document.getElementById('_updateinstru').submit(); return false;">{% trans "Remove selected items" %}</a>
-  </div>
- </form>
- {% else %}
-    <p class="help">{% trans "This instrument list is empty" %}</p>
- {% endif %}
-
-  <br style="clear: right"/>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/instrument_edit_value.html b/telemeta/templates/telemeta_default/instrument_edit_value.html
deleted file mode 100644 (file)
index ca28c25..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{% extends "telemeta/admin.html" %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Instruments" %} - {{ block.super }}{% endblock %}
-
-{% block tabcontents %}
- <h4>{% trans "Instruments" %}</h4>
- <form class="mod" id="addinstru" method="post"
-    action="{% url telemeta-instrument-record-update instrument.id %}">{% csrf_token %}
-  <fieldset>
-   <legend>{% trans "Modify an entry" %}</legend>
-   <div class="field">
-    <label>{% trans "Name" %}: <input type="text" name="value" value="{{instrument.name}}" /></label>
-
-   </div>
-   <br />
-   <div class="buttons">
-        <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('addinstru').submit(); return false;">{% trans "Save" %}</a>
-        <a href="{% url telemeta-instrument-edit %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-   </div>
-  </fieldset>
- </form>
-  <br style="clear: right"/>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/login.html b/telemeta/templates/telemeta_default/login.html
deleted file mode 100644 (file)
index e4c58c0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block title %}
- <img src="{% url telemeta-images "user_red.png" %}" style="vertical-align:middle" /> {% trans "User authentication" %}
-{% endblock %}
-
-{% block content %}
-{% if form.errors %}
-<p class="login-error">{% trans "Your username and password didn't match. Please try again." %}</p>
-{% endif %}
-<form class="login" id="_loginForm" method="post" action="{% url telemeta-login %}">{% csrf_token %}
-<p>
-{{ form.username.label_tag }}
-{{ form.username }}<br />
-{{ form.password.label_tag }}
-{{ form.password }}
-</p>
-<a href="#" class="component_icon button icon_login" style="float: right;"
-                onclick="document.getElementById('_loginForm').submit(); return false;">{% trans "Sign in" %}</a>
-<input type="hidden" name="next" value="{{ next }}" />
-<span style="align: right;"><a href="{% url telemeta-password-reset %}">{% trans "Password forgotten" %} ?</a></span>
-</form>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_add.html b/telemeta/templates/telemeta_default/mediaitem_add.html
deleted file mode 100644 (file)
index ee05ac1..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Item" %}- {{ block.super }}{% endblock %}
-
-{% if item %}
-{% block title %}
-    <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> Item : NEW
-{% endblock %}
-
-{% block title_buttons %}
-    {% if perms.telemeta.add_mediaitem %}
-      <a href="{% url telemeta-items %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-    {% endif %}
-{% endblock %}
-
-{% block content %}
-    {% block infos %}
-    <div class="infos">
-     <form method="post" id="_addItemForm" action="" enctype="multipart/form-data">{% csrf_token %}
-       <ul>{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</ul>
-       <table>
-        {% for field in form %}
-            <tr>
-            {% if field.html_name == "copied_from_item" %}
-                <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td>
-            {% else %}
-                <tr><td class="error">{{ field.errors }}</td></tr>
-                <td>{{ field.label_tag }}:</td>
-                    {% if field.html_name == "collection" %}
-                    <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
-                        &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />
-                        {{ field }}</td>
-                    {% else %}
-                    <td>{{ field }}</td>
-                    {% endif %}
-            {% endif %}
-            </tr>
-    {% endfor %}
-       </table>
-       <div align="center" style="margin-top:3ex;">
-        <a href="{% url telemeta-items %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-        <a href="#" class="component_icon button icon_save"
-   onclick="var d=document; d.getElementById('wait-img').style.display='inline'; setTimeout(function(){d.getElementById('_addItemForm').submit();},300); return false;">{% trans "Save" %}</a>
-           <img id="wait-img" style="display:none" style="vertical-align:middle" alt="wait" src="{% url telemeta-images "wait.gif" %}" />
-       </div>
-     </form>
-    </div>
-  {% endblock infos %}
-</div> <!-- with-rightcol -->
-{% endblock %}
-
-{% block delete %}
-{% endblock %}
-
-{% else %}
-<p>No such item</p>
-{% endif %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_copy.html b/telemeta/templates/telemeta_default/mediaitem_copy.html
deleted file mode 100644 (file)
index 64bbaac..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{% extends "telemeta/mediaitem_detail.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Item" %}- {{ block.super }}{% endblock %}
-
-{% block extra_javascript %}
-{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> Item : NEW
-{% endblock %}
-
-{% block title_buttons %}
-    {% if user.is_authenticated and perms.telemeta.add_mediaitem %}
-    <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-    {% endif %}
-{% endblock %}
-
-{% block content %}
-  {% block infos %}    
-    <div class="infos">
-     <form enctype="multipart/form-data" id="_mediaItemCopyForm" method="post" action="">{% csrf_token %}
-     <ul>{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</ul>
-      <table>
-       {% for field in form %}
-            <tr>
-            {% if field.html_name == "copied_from_item" %}
-                <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td>
-            {% else %}
-                <tr><td class="error">{{ field.errors }}</td></tr>
-                <td>{{ field.label_tag }}:</td>
-                    {% if field.html_name == "collection" %}
-                    <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
-                        &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />
-                        {{ field }}</td>
-                    {% else %}
-                    <td>{{ field }}</td>
-                    {% endif %}
-            {% endif %}
-            </tr>
-       {% endfor %}
-       </table>
-       <div align="center" style="margin-top:3ex;">
-           <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-         <a href="#" class="component_icon button icon_save"
-            onclick="document.getElementById('_mediaItemCopyForm').submit(); return false;">{% trans "Save" %}</a>
-       </div>
-     </form>
-    </div>
-  {% endblock infos %}  
-{% endblock %}
-
-{% block delete %}
-{% endblock %}
-
diff --git a/telemeta/templates/telemeta_default/mediaitem_detail.html b/telemeta/templates/telemeta_default/mediaitem_detail.html
deleted file mode 100644 (file)
index 927da5f..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Item" %} : {% if item.title %}{{ item.title }}{% else %}{{ item.public_id}}{% endif %} - {{ block.super }}{% endblock %}
-
-{% block stylesheets %}
-{{ block.super }}
-      <link rel="stylesheet" type="text/css" href="{% url telemeta-timeside "skins/lab/style.css" %}" />
-      <link rel="stylesheet" type="text/css" href="{% url telemeta-css "player.css" %}" />
-{% endblock %}
-
-{% block extra_javascript %}
-{% if item %}
-
-{% if item.file %}
-{% if public_access or perms.telemeta.can_play_all_items %}
-<script src="{% url telemeta-timeside "js/libs/soundmanager2-nodebug-jsmin.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-timeside "js/timeside.js" %}" type="text/javascript"></script>
-{% endif %}
-{% endif %}
-
-<script src="{% url telemeta-js "popupdiv-min.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
-
-{% if item.file %}
-{% if public_access or perms.telemeta.can_play_all_items %}
-<script src="{% url telemeta-js "playerLoader.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "divmarker.js" %}" type="text/javascript"></script>
-{% endif %}
-{% endif %}
-
-<script type="text/javascript">
-    {% if item.file %}
-    {% if public_access or perms.telemeta.can_play_all_items %}
-        //initializing soundManager default properties
-        soundManager.flashVersion = 9;
-        soundManager.url = "{% url telemeta-timeside "swf/" %}";
-        soundManager.debugMode = false;
-        soundManager.allowPolling = true;
-        soundManager.useHTML5Audio = true;
-        soundManager.preferFlash = true;
-
-        //initializing the visualizers to be passed to the player
-        var visualizers = {};
-        {% for v in visualizers %}
-            visualizers["{{v.name}}"] = "{% url telemeta-item-visualize item.public_id,v.id,"WIDTH","HEIGHT" %}";
-        {% endfor %}
-        {% if user.is_superuser %}
-             loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',
-              "{% url telemeta-item-export item.public_id,"mp3" %}", undefined, '{{item.id}}', visualizers,
-              CURRENT_USER_NAME,  //undefined if !user.is_authenticated
-              true); //true because superuser
-        {% else %}
-           loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',
-             "{% url telemeta-item-export item.public_id,"mp3" %}", undefined, '{{item.id}}', visualizers,
-             CURRENT_USER_NAME,  //undefined if !user.is_authenticated
-             false); //false because not superuser
-        {% endif %}
-    {% endif %}
-    {% endif %}
-    //playlists:
-    {% if user.is_authenticated %}
-        {% for playlist in playlists %}
-            playlistUtils.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}');
-        {% endfor %}
-            jQuery(window).ready(function(){
-                var anchor = jQuery('#_add_to_playlist');
-                if(anchor.length){
-                    anchor.unbind('click').click(function(){
-                        playlistUtils.showAddResourceToPlaylist(anchor,'item','{{item.id}}',gettrans('item added to the selected playlist'));
-                        return false;
-                    });
-                }
-            });
-    {% endif %}
-</script>
-{% endif %}
-{% endblock %}
-
-{% if item %}
-
-{% block title %}
-<img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" />
-Item : <a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>
-{% endblock %}
-
-{% block title_buttons %}
-<div class="fixedWidthAsPlayer">
-    {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
-    <a href="{% url telemeta-item-edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
-    <a href="{% url telemeta-item-copy item.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
-    {% endif %}
-    {% if user.is_authenticated %}
-    <a id="_add_to_playlist" href='#' class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
-    {% endif %}
-    <a href="{% url telemeta-item-detail previous %}" class="component_icon button icon_previous">{% trans "Previous" %}</a>
-    <a href="{% url telemeta-item-detail next %}" class="component_icon button icon_next">{% trans "Next" %}</a>
-    <a href="{% url telemeta-item-dublincore item.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
-</div>
-{% endblock %}
-
-{% block content %}
-<div class="{% if item.file %}{% if public_access or perms.telemeta.can_play_all_items %}with-rightcol{% endif %}{% endif %}">
-    {% if item.file %}
-    {% if public_access or perms.telemeta.can_play_all_items %}
-    <div id="player_maximized" class="ts-skin-lab">
-        <a href="#" class="toggle">Minimize</a>
-        <a href="#" class="embed_player_frame">&lt;/&gt;</a>
-        <div class="wazing"></div>
-    </div>
-    <div id="rightcol">
-        <div id="player_minimized" class="ts-skin-lab">
-            <a href="#" class="toggle">Maximize</a>
-            <a href="#" class="embed_player_frame">&lt;/&gt;</a>
-            <div class="wazing"></div>
-            <div id="player" class="ts-player">
-            </div>
-        </div>
-
-        <!-- </div> -->
-        <div id="tabs_container">
-            <!-- this div will be hidden when everything is fully loaded-->
-            <span id="loading_span" href="#"><img style="vertical-align:middle" alt="wait" src="{% url telemeta-images "wait.gif" %}" />&nbsp;
-                <span id="loading_span_text">Loading...</span></span>
-            <a id="tab_analysis" style="display:none" class ="tab" href="#">{% trans "Analysis" %}</a><!--
-             do not let space here as it appears in the document!!!!!
-            --><a id="tab_markers" style="display:none" class="tab" href="#">{% trans "Markers" %}</a>
-        </div>
-
-        <div class="markers" id="markers_div_id"></div>
-
-        <div class="analyzer" id="analyzer_div_id">
-            <table width="100%">
-                <tr class="analyzer-title">
-                    <td>{% trans "Property" %}</td>
-                    <td>{% trans "Value" %}</td>
-                    <td>{% trans "Unit" %}</td>
-                </tr>
-            </table>
-        </div>
-        <!--</div>-->
-
-        {% if audio_export_enabled or perms.telemeta.can_download_all_items or user.is_superuser %}
-        <div class="exporter">
-            <p><img src="{% url telemeta-images "download.png" %}" alt="download" style="vertical-align:middle" /> {% trans "Download:" %}
-                {% for format in export_formats %}
-                <a href="{% url telemeta-item-export item.public_id,format.extension %}">
-                    <img src="images/{{ format.extension }}.png" style="vertical-align:middle" alt="{{ format.extension }}" /></a>
-                {% endfor %}</p>
-        </div>
-        {% endif %}
-
-    </div>
-    {% endif %}
-    {% endif %}
-
-    {% block infos %}
-    <div class="infos">
-        {% block general_info %}
-        <dl class="listing">
-            {% dl_field item "title" placeholder %}
-            {% dl_field item "alt_title" %}
-            {% dl_field item "collector" placeholder %}
-            <dt>{% field_label item "collection" %}</dt>
-            <dd><a href="{% url telemeta-collection-detail item.collection.public_id %}">{{ item.collection }}</a></dd>
-            <dt>{% trans "Recording date" %}</dt>
-
-            <dd>{% if item.recorded_from_date %}{{ item.recorded_from_date }}{% endif %}{% if item.recorded_from_date and item.recorded_to_date%} - {% endif %}{% if item.recorded_to_date %}{{ item.recorded_to_date}}{% endif %}</dd>
-
-        </dl>
-        {% endblock general_info %}
-    </div>
-    <div class="extraInfos">
-        {% block geoethnic_data %}
-        <div>
-            <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4>
-            <dl class="listing">
-                <dt>{% trans "Location" %}</dt>
-                <dd>{% if item.location %}{{ item.location.fullnames|join:"<br/>" }}{% endif %}</dd>
-                {% dl_field item "location_comment" %}
-                {% dl_field item "cultural_area" %}
-                {% dl_field item "language" %}
-                {% if item.language_iso %}
-                <dt>{% trans "Language ISO" %}</dt>
-                <dd>{{ item.language_iso.name|to_utf8 }}</dd>
-                {% endif %}
-                {% dl_field item "ethnic_group" placeholder %}
-                <dt>{% trans "Ethnographic context" %}</dt>
-                <dd>{{ item.context_comment|html_line_break|safe }}</dd>
-                {% dl_field item "keywords" join with ", " %}
-            </dl>
-        </div>
-        {% endblock geoethnic_data %}
-    </div>
-    {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
-    <a href="{% url telemeta-item-keywords_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %} {% trans "keywords" %}</a>
-    {% endif %}
-    <div class="extraInfos">
-        {% block musical_data %}
-        <div>
-            <h4><a href="#">{% trans "Musical informations" %}</a></h4>
-            <dl class="listing">
-                {% dl_field item "vernacular_style" %}
-                {% dl_field item "generic_style" %}
-                {% dl_field item "author" %}
-            </dl>
-            {% if item.performances %}
-            <div class="instruments">
-                <table class="instruments">
-                    <thead>
-                        <tr>
-                            <td>{% field_label "MediaItemPerformance" "instruments_num" %}</td>
-                            <td>{% field_label "MediaItemPerformance" "instrument" %}</td>
-                            <td>{% field_label "MediaItemPerformance" "alias" %}</td>
-                            <td>{% field_label "MediaItemPerformance" "musicians" %}</td>
-                        </tr>
-                    </thead>
-                    <tbody>
-                        {% for performance in item.performances.all %}
-                        <tr>
-                            <td>{{ performance.instruments_num }}</td>
-                            <td>{{ performance.instrument|default:"" }}</td>
-                            <td>{{ performance.alias|default:"" }}</td>
-                            <td>{{ performance.musicians }}</td>
-                        </tr>
-                        {% endfor %}
-                    </tbody>
-                </table>
-            </div>
-            {% endif %}
-        </div>
-        {% endblock musical_data %}
-    </div>
-    {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
-    <a href="{% url telemeta-item-performances_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "performance"%}</a>
-    {% endif %}
-    <div class="extraInfos">
-        {% block general_data %}
-        <div>
-            <h4><a href="#">{% trans "General informations" %}</a></h4>
-            <dl class="listing">
-                <dt>{% trans "Remarks" %}</dt>
-                <dd>{{ item.comment|html_line_break|safe }}</dd>
-                {% dl_field item "collector_selection" %}
-            </dl>
-        </div>
-        {% endblock general_data %}
-    </div>
-    <div class="extraInfos">
-        {% block archive_data %}
-        <div>
-            <h4><a href="#">{% trans "Archiving data" %}</a></h4>
-            <dl class="listing">
-                {% dl_field item "code" %}
-                {% dl_field item "old_code" %}
-                {% dl_field item "track" %}
-                {% dl_field item "creator_reference" %}
-                <dt>{% trans "Published references" %}</dt>
-                <dd>{{ item.external_references|html_line_break|safe }}</dd>
-                {% dl_field item "public_access_label" %}
-            </dl>
-        </div>
-        {% endblock archive_data %}
-    </div>
-    <div class="extraInfos">
-        {% block technical_data %}
-        <div>
-            <h4><a href="#">{% trans "Technical data" %}</a></h4>
-            <div>
-                <dl class="listing">
-                    <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd>
-                    {% dl_field item "approx_duration" %}
-                </dl>
-            </div>
-        </div>
-        {% endblock technical_data %}
-    </div>
-    {% endblock infos %}
-</div> <!-- with-rightcol -->
-
-<div class="extraInfos">
-    {% block related %}
-        {% include "telemeta/inc/mediaitem_related.html" %}
-    {% endblock related %}
-</div>
-
-{% endblock %}
-
-{% block delete %}
-{% if user.is_authenticated and perms.telemeta.delete_mediaitem %}
- <a href="#" onclick="if(confirm(gettrans('delete the item permanently?'))){window.location.href='{% url telemeta-item-delete item.public_id %}';};return false;"
-        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
-{% endif %}
-{% endblock %}
-
-{% else %}
-<p>No such item</p>
-{% endif %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_detail_dc.html b/telemeta/templates/telemeta_default/mediaitem_detail_dc.html
deleted file mode 100644 (file)
index d745dc6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends "telemeta/mediaitem_detail.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% if item %}
-{% block title_buttons %}
- <a class="component_icon button icon_previous" href="{% url telemeta-item-detail item.public_id %}">{% trans "Normal View" %}</a>
-{% endblock %}
-
-{% block infos %}
-{% with item|to_dublincore as resource %}
-{% include "telemeta/inc/dublincore.html" %}
-{% endwith %}
-{% endblock %}
-{% else %}
-    <p>{% trans "No such item" %}</p>
-{% endif %}
-
-{% block related %}
-{% endblock related %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_edit.html b/telemeta/templates/telemeta_default/mediaitem_edit.html
deleted file mode 100644 (file)
index 5767f76..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-{% extends "telemeta/mediaitem_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title %}
-<img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> Item : {{ item }}
-{% endblock %}
-
-{% block title_buttons %}
-<a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block infos %}    
-<div class="infos">
-    <form enctype="multipart/form-data" id="_editItemForm" method="post" action="">{% csrf_token %}   
-    <table>
-    <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
-    {% for field in form %}
-    <tr>
-    {% if field.html_name == "copied_from_item" %}
-        <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td>
-    {% else %}
-        <tr><td class="error">{{ field.errors }}</td></tr>
-        <td>{{ field.label_tag }}:</td>
-            {% if field.html_name == "collection" %}
-            <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
-                &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />
-                {{ field }}</td>
-            {% else %}
-            <td>{{ field }}</td>
-            {% endif %}
-    {% endif %}
-    </tr>
-    {% endfor %}
-    </table>
-    <div align="center" style="margin-top:3ex;">
-    <a href="{% url telemeta-item-detail item.public_id %}"
-        class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-    <a href="#" class="component_icon button icon_save" 
-onclick="var d=document; d.getElementById('wait-img').style.display='inline'; setTimeout(function(){d.getElementById('_editItemForm').submit();},300); return false;">{% trans "Save" %}</a>
-           <img id="wait-img" style="display:none" style="vertical-align:middle" alt="wait" src="{% url telemeta-images  "wait.gif" %}" />
-    </div>
-    </form>
-</div>
-{% endblock infos %}
-
-{% block related %} 
-{% endblock %}
-
-{% block delete %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_keywords_edit.html b/telemeta/templates/telemeta_default/mediaitem_keywords_edit.html
deleted file mode 100644 (file)
index 9e2ca7d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-{% extends "telemeta/mediaitem_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block extra_javascript %}
-{% endblock %}
-
-  {% block title %}
-    <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> <h1>Item : {{ item }}</h1>
-  {% endblock %}
-  {% block title_buttons %}
-   <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-  {% endblock %}
-
-{% block content %}
-  {% block infos %}    
-    <div class="infos">
-     <form method="post" id="_editForm" action="">{% csrf_token %}
-
-    {{ formset.management_form }}
-    {% for form in formset.forms %}
-      <table>
-        <tr><td><b>{% trans "Keyword" %} :</b><td></td></tr>
-        {% for field in form %}
-        <tr>
-        {% if "item" in field.html_name or "id" in field.html_name %}
-            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-        {% else %}
-            <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
-        {% endif %}
-        </tr>
-        {% endfor %}
-       </table>
-       <br />
-    {% endfor %}
-      
-      <div align="center">
-        <a href="{% url telemeta-item-detail item.public_id %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-        <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editForm').submit(); return false;">{% trans "Save" %}</a>
-       </div>
-    
-     </form>
-    </div>
-       
-  {% endblock infos %}
-{% endblock content %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_list.html b/telemeta/templates/telemeta_default/mediaitem_list.html
deleted file mode 100644 (file)
index 26e4523..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block head_title %}{% trans "Media Items" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> {% trans "Media Items" %}
-{% endblock %}
-
-{% block title_buttons %}
-    <a href="{% url telemeta-items %}" class="component_icon button icon_filter">{% trans "All" %}</a>
-    <a href="{% url telemeta-items-sound %}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
-    {% if user.is_authenticated and perms.telemeta.add_mediaitem %}
-      <a href="{% url telemeta-item-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
-    {% endif %}
-{% endblock %}
-
-{% block content %}
-{% with object_list as items %}
-<div class="fullpage">
-{% include "telemeta/inc/mediaitem_list.html" %}
-</div>
-{% endwith %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_performances_edit.html b/telemeta/templates/telemeta_default/mediaitem_performances_edit.html
deleted file mode 100644 (file)
index a12ff3f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-{% extends "telemeta/mediaitem_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block extra_javascript %}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> Item : {{ item }}
-{% endblock %}
-
-{% block title_buttons %}
- <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block content %}
-  {% block infos %}    
-    <div class="infos">
-     <form method="post" id="_editPerformanceForm" action="">{% csrf_token %}
-
-    {{ formset.management_form }}
-    {% for form in formset.forms %}
-      <hr>
-      <table>
-        <tr><td><b>{% trans "Performance" %} :</b><td></td></tr>
-        {% for field in form %}
-        <tr>
-        {% if not "media_item" in field.html_name %}
-            {% if "id" in field.html_name %}
-                <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-            {% else %}
-                <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
-            {% endif %}
-        {% else %}
-            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-        {% endif %}
-        </tr>
-        {% endfor %}
-       </table>
-       <br />
-    {% endfor %}
-      <div align="center">
-        <a href="{% url telemeta-item-detail item.public_id %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-        <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editPerformanceForm').submit(); return false;">{% trans "Save" %}</a>
-       </div>
-     </form>
-    </div>
-  {% endblock infos %}
-{% endblock content %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_player.html b/telemeta/templates/telemeta_default/mediaitem_player.html
deleted file mode 100644 (file)
index 0c4149e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-{% extends "telemeta/mediaitem_detail.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-
-{% block stylesheets %}
-{{ block.super }}
-    <style type="text/css">
-        #rightcol {
-            width: {{width}}px;
-        }
-        .ts-skin-lab .ts-player .ts-wave {
-            height: {{height}}px;
-        }
-    </style>
-{% endblock %}
-
-{% block title %}{% endblock %}
-{% block title_buttons %}{% endblock %}
-
-{% block layout %}
-{% block content %}
-<div>
-{% if item.file %}
-    {% if public_access or user.is_staff %}
-    <div id="rightcol" style="float: left; padding-bottom:0;">
-        <div id="player_minimized" class="ts-skin-lab">
-            <div class="wazing"></div>
-            <div id="player" class="ts-player">
-            </div>
-        </div>
-       <div>
-        <span style="font-size:65%; float:left">{% organization %} - Item : <a href="{% url telemeta-item-detail item.public_id %}" target="_blank">{% if item.code %}{{ item.code }}{% else %}{{ item.old_code }}{% endif %}</a></span>
-        <span style="font-size:65%; float:right"><a href="http://telemeta.org" target="_blank">Telemeta</a> powered</span>
-       </div>
-    </div>
-    {% endif %}
-{% endif %}
-</div>
-
-{% endblock content%}
-{% endblock layout %}
-
-{% block footer %}{% endblock %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_related_edit.html b/telemeta/templates/telemeta_default/mediaitem_related_edit.html
deleted file mode 100644 (file)
index 506d279..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends "telemeta/mediaitem_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block extra_javascript %}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> Item : {{ item }}
-{% endblock %}
-
-{% block title_buttons %}
- <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block content %}
-  {% block infos %}    
-    <div class="infos">
-     <form enctype="multipart/form-data" method="post" id="_editMediaItemRelatedFileForm" action="">{% csrf_token %}
-
-    {{ formset.management_form }}
-    {% for form in formset.forms %}
-      <hr>
-      <table>
-        <tr><td><b>{% trans "Media" %} :</b><td></td></tr>
-        {% for field in form %}
-        <tr><td class="error">{{ field.errors }}</td></tr>
-        <tr>
-            {% if "media_item" in field.html_name or "id" in field.html_name or "item" in field.html_name or "mime_type" in field.html_name %}
-                <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-            {% else %}
-                <td>{{ field.label_tag }}: </td><td>{{ field }}</td>
-            {% endif %}
-        </tr>
-        {% endfor %}
-       </table>
-       <br />
-    {% endfor %}
-      <div align="center">
-        <a href="{% url telemeta-item-detail item.public_id %}"
-           class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-        <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editMediaItemRelatedFileForm').submit(); return false;">{% trans "Save" %}</a>
-       </div>
-     </form>
-    </div>
-  {% endblock infos %}
-{% endblock content %}
diff --git a/telemeta/templates/telemeta_default/mediaitem_xspf.xml b/telemeta/templates/telemeta_default/mediaitem_xspf.xml
deleted file mode 100644 (file)
index f899cbe..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "telemeta/base_xspf.xml" %}
-{% load telemeta_utils %}
-
-{% block tracklist %}
-    <track>
-      <title>{{ item }}</title>
-      <meta rel="type">mp3</meta>
-      <location>http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}</location>
-      <duration>{{ item.get_duration|mul:1000 }}</duration>
-      <info>http://{{ host }}{% url telemeta-item-detail item.public_id %}</info>
-    </track>
-{% endblock %}
-
diff --git a/telemeta/templates/telemeta_default/messages.html b/telemeta/templates/telemeta_default/messages.html
deleted file mode 100644 (file)
index c0442be..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block content %}
-{% if messages %}
- {% for message in messages %}
-  <h1>{{ message }}</h1>
-  <p>{{ description }}
- {% endfor %}
-{% endif %}
-{% endblock %}
-
diff --git a/telemeta/templates/telemeta_default/paginator.html b/telemeta/templates/telemeta_default/paginator.html
deleted file mode 100644 (file)
index e47187d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% if has_previous %}
-    <a href="?page={{ previous }}&amp;{{ criteria|build_query_string }}">&lt; {% trans "Previous" %}</a>
-{% endif %}
-
-{% if show_first %}
-<a href="?page=1">1</a> ...
-{% endif %}
-{% for linkpage in page_numbers %}
-    {% ifequal linkpage page %}
-        {{ page }}
-    {% else %}
-        <a href="?page={{ linkpage }}&amp;{{ criteria|build_query_string }}">{{ linkpage }}</a>
-    {% endifequal %}
-{% endfor %}
-{% if show_last %}
-    ...
-    <a href="?page=last">{{ pages }}</a>
-{% endif %}
-{% if has_next %}
-    <a href="?page={{ next }}&amp;{{ criteria|build_query_string }}">{% trans "Next" %} &gt;</a>
-{% endif %}
diff --git a/telemeta/templates/telemeta_default/profile_detail.html b/telemeta/templates/telemeta_default/profile_detail.html
deleted file mode 100644 (file)
index b24b086..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-        
-{% block head_title %}{% trans "User Profile" %} : {{ usr.username }}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "user_red.png" %}" alt="user" style="vertical-align:middle" /> {% trans "User profile" %} : {{ usr.username }}
-{% endblock %}
-
-{% block content %}
-  <div id="module-set" style="width: 33%">
-  {% block modules %}
-  <div class="module">
-    <h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlists" style="vertical-align:middle" />
-    {% trans "Playlists" %}</h3>
-    <ul class="playlist">
-    {% for p in playlists %}
-    <li>
-        <b>{{ p.playlist.title }}</b>
-        <br />
-        <span class="info">{{ p.playlist.description }}</span>
-    </li>
-    {% endfor %}
-    </ul>
-   </div>
-  {% endblock %}
- </div>
-
-    <div class="infos" style="padding-top: 1em;">
-     <dl class="listing">
-      <dt>{% trans "First Name" %}</dt><dd>{{ usr.first_name }}</dd>
-      <dt>{% trans "Last Name" %}</dt><dd>{{ usr.last_name }}</dd>
-      <dt>{% trans "Email" %}</dt><dd>{{ usr.email }}</dd>
-      
-      <dt>{% trans "Institution" %}</dt><dd>{% if profile %}{{ profile.institution }}{% endif %}</dd>
-      <dt>{% trans "Function" %}</dt><dd>{% if profile %}{{ profile.function }}{% endif %}</dd>
-      <dt>{% trans "Address" %}</dt><dd>{% if profile %}{{ profile.address }}{% endif %}</dd>
-      <dt>{% trans "Telephone" %}</dt><dd>{% if profile %}{{ profile.telephone }}{% endif %}</dd>
-      <dt>{% trans "Expiration date" %}</dt><dd>{% if profile %}{{ profile.expiration_date }}{% endif %}</dd>
-      
-      <dt>{% trans "Is staff" %}</dt><dd>{{ usr.is_staff }}</dd>
-      <dt>{% trans "Is superuser" %}</dt><dd>{{ usr.is_superuser }}</dd>
-      <dt>{% blocktrans count user.groups.all.count as counter %}Group{% plural %}Groups{% endblocktrans %}</dt><dd>{% for group in usr.groups.all %}{{ group }} {% endfor %}</dd>
-      <dt>{% trans "Last login" %}</dt><dd>{{ usr.last_login }}</dd>
-      {% if user.is_authenticated and user.username == usr.username %}
-      <dt>{% trans "Language" %}</dt><dd><form id="setlang" action="/i18n/setlang/" method="post">{% csrf_token %}
-        <input name="next" type="hidden" value="" />
-          <select name="language">
-            {% for lang in LANGUAGES %}
-             <option {% if lang.0 == LANGUAGE_CODE %}selected{% endif %} value="{{ lang.0 }}">{{ lang.1 }}</option>
-            {% endfor %}
-          </select>
-          <a href="#" class="component_icon button icon_ok" 
-            onclick="document.getElementById('setlang').submit(); return false;">{% trans "Apply" %}</a>
-         </form>
-        </dd>
-      {%  endif %}
-     </dl>
-    </div>
-        
-    {% if user.is_authenticated and user.username == usr.username or user.is_staff %}
-    <a href="{% url telemeta-profile-edit usr.username %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
-    {%  endif %}
-    {% if user.is_authenticated and user.username == usr.username %}
-    <a href="{% url telemeta-password-change %}" class="component_icon button icon_login">{% trans "Change password" %}</a>
-    {%  endif %}
-  </div>
-{% endblock %}
-
diff --git a/telemeta/templates/telemeta_default/profile_edit.html b/telemeta/templates/telemeta_default/profile_edit.html
deleted file mode 100644 (file)
index 3a64c7e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends "telemeta/profile_detail.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block title_buttons %}
- <a href="{% url telemeta-profile-detail usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
-
-{% block content %}
-      <div class="infos" style="padding-top: 1em;">
-       <form method="POST" id="_editUserProfileForm" action="">{% csrf_token %}
-        <table>
-        {% for form in forms %}
-            {% for field in form %}
-            {% if not field.html_name in user_hidden_fields %}
-            <tr>
-                <tr><td class="error">{{ field.errors }}</td></tr>
-                <td>{% trans field.label_tag %} : </td><td>{{ field }}</td>
-            </tr>
-            {% else %}
-            <tr>
-            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
-            </tr>
-            {% endif %}
-            {% endfor %}
-        {% endfor %}
-        </table>
-        <div align="center">
-         <a href="{% url telemeta-profile-detail usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-         <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_editUserProfileForm').submit(); return false;">{% trans "Save" %}</a>
-        </div>
-       </form>        
-      </div>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/registration/logged_out.html b/telemeta/templates/telemeta_default/registration/logged_out.html
deleted file mode 100644 (file)
index 8a31a2c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block content %}
-
-<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
-
-<p><a href="../">{% trans 'Log in again' %}</a></p>
-
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/registration/password_change_done.html b/telemeta/templates/telemeta_default/registration/password_change_done.html
deleted file mode 100644 (file)
index 075a685..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}{% trans 'Change password' %} / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
-
-{% block title %}<br />{% trans 'Password change successful' %}{% endblock %}
-
-{% block content %}
-
-<p>{% trans 'Your password was changed.' %}</p>
-
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/registration/password_change_form.html b/telemeta/templates/telemeta_default/registration/password_change_form.html
deleted file mode 100644 (file)
index 79274db..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n adminmedia %}
-{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
-{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %} {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
-
-{% block title %}<br />{% trans 'Password change' %}{% endblock %}
-
-{% block content %}<div id="content-main">
-
-<form id="password_change" action="" method="post">{% csrf_token %}
-<div>
-{% if form.errors %}
-    <p class="errornote">
-    {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
-    </p>
-{% endif %}
-
-<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
-
-<fieldset class="aligned wide">
-
-<div class="form-row">
-    {{ form.old_password.errors }}
-    <label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }}
-</div>
-
-<div class="form-row">
-    {{ form.new_password1.errors }}
-    <label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }}
-</div>
-
-<div class="form-row">
-{{ form.new_password2.errors }}
-    <label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }}
-</div>
-
-</fieldset>
-
-<br />
-<div class="submit-row">
-   <a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('password_change').submit(); return false;">{% trans 'Change my password' %}</a>
-</div>
-
-<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
-</div>
-</form></div>
-
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/registration/password_reset_complete.html b/telemeta/templates/telemeta_default/registration/password_reset_complete.html
deleted file mode 100644 (file)
index d32849f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block title %}<br />{% trans 'Password reset complete' %}{% endblock %}
-
-{% block content %}
-<p>{% trans "Your password has been set.  You may go ahead and log in now." %}</p>
-<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/registration/password_reset_confirm.html b/telemeta/templates/telemeta_default/registration/password_reset_confirm.html
deleted file mode 100644 (file)
index 9a8b682..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block title %}<br />{% trans 'Password reset' %}{% endblock %}
-
-{% block content %}
-{% if validlink %}
-<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
-
-<form id="password_confirm" action="" method="post">{% csrf_token %}
-{{ form.new_password1.errors }}
-<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
-{{ form.new_password2.errors }}
-<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
-<p><a href="#" class="component_icon button icon_save" onclick="document.getElementById('password_confirm').submit(); return false;">{% trans 'Change my password' %}</a></p>
-</form>
-
-{% else %}
-<h1>{% trans 'Password reset unsuccessful' %}</h1>
-<p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
-
-{% endif %}
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/registration/password_reset_done.html b/telemeta/templates/telemeta_default/registration/password_reset_done.html
deleted file mode 100644 (file)
index 88a57c4..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block title %}<br />{% trans 'Password reset successful' %}{% endblock %}
-
-{% block content %}
-<p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/registration/password_reset_email.html b/telemeta/templates/telemeta_default/registration/password_reset_email.html
deleted file mode 100644 (file)
index 3b786ac..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{% load i18n %}{% autoescape off %}
-{% trans "You're receiving this e-mail because you requested a password reset" %}
-{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}.
-
-{% trans "Please go to the following page and choose a new password:" %}
-{% block reset_link %}
-{{ protocol }}://{{ domain }}{% url telemeta-password-reset-confirm uidb36=uid token=token %}
-{% endblock %}
-{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
-
-{% trans "Thanks for using our site!" %}
-
-{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
-
-{% endautoescape %}
diff --git a/telemeta/templates/telemeta_default/registration/password_reset_form.html b/telemeta/templates/telemeta_default/registration/password_reset_form.html
deleted file mode 100644 (file)
index 6da1b84..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block title %}<br />{% trans "Password reset" %}{% endblock %}
-
-{% block content %}
-<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
-
-<form id="password_reset" action="" method="post">{% csrf_token %}
-{{ form.email.errors }}
-<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <a href="#" class="component_icon button icon_ok" onclick="document.getElementById('password_reset').submit(); return false;">{% trans 'Reset my password' %}</a></p>
-</form>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/search_criteria.html b/telemeta/templates/telemeta_default/search_criteria.html
deleted file mode 100644 (file)
index 6885f9e..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Advanced Search" %} - {{ block.super }}{% endblock %}
-
-{% block stylesheets %}
-{{ block.super }}
-<link rel="stylesheet" type="text/css" href="{% url telemeta-css "jquery.autocomplete.css" %}" />
-{% endblock %}
-
-{% block extra_javascript %}
-<script src="{% url telemeta-js "jquery.bgiframe.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "jquery.autocomplete.js" %}" type="text/javascript"></script>
-<script type="text/javascript">
-function update_period(source, from_field, to_field) {
-    var from_year = $(from_field);
-    var to_year = $(to_field);
-
-    if (from_year.val() == "0") {
-        to_year.attr('disabled', '1');
-        to_year.val('0');
-    } else {
-        to_year.removeAttr('disabled');
-        if ($(source).is(to_field)) {
-            if (parseInt(from_year.val()) > parseInt(to_year.val()))
-                from_year.val(to_year.val());
-        } else if (parseInt(from_year.val()) > parseInt(to_year.val())) {
-            to_year.val(from_year.val());
-        }
-    }
-}
-
-$(document).ready(function () {
-    $('#location').autocomplete('{% url telemeta-complete-location %}', {
-        max: 20,
-        formatResult: function(data) {
-            return data[0].replace(/ *\([0-9]+.*\) *$/, '');
-        }
-    });
-    update_period('#rec_year_from', '#rec_year_to');
-    $('#rec_year_from, #rec_year_to').change(function () {
-        update_period(this, '#rec_year_from', '#rec_year_to');
-    });
-    update_period('#pub_year_from', '#pub_year_to');
-    $('#pub_year_from, #pub_year_to').change(function () {
-        update_period(this, '#pub_year_from', '#pub_year_to');
-    });
-});
-
-</script>
-{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "adv_search_red.png" %}" alt="advanced-search" style="vertical-align:middle" /> {% trans "Advanced Search" %}
-{% endblock %}
-
-{% block content %}
-<form action="{% url telemeta-search %}" id="searchform">{% csrf_token %}
-<fieldset>
-
-    <p>
-    <label for="location">{% field_label "Location" %}</label>
-    <input type="text" name="location" id="location" value="{{ criteria.location }}" />
-    </p>
-
-    <p>
-    <label for="ethnic_group">{% field_label "EthnicGroup" %}</label>
-    <select id="ethnic_group" name="ethnic_group">
-        <option value="">All ethnic groups</option>
-    {% for group in ethnic_groups %}
-        <option value="{{group.id}}" {% ifequal criteria.ethnic_group.id group.id %}selected {% endifequal %}>{{group|escape}}</option>
-    {% endfor %}
-    </select>
-    </p>
-
-    <p>
-    <label for="title">{% trans "Title" %}</label>
-    <input type="text" id="title" name="title" />
-    </p>
-
-    <p>
-    <label for="creator">{% field_label "MediaCollection" "creator" %}</label>
-    <input type="text" id="creator" name="creator" />
-    </p>
-
-    <p>
-    <label for="collector">{% field_label "MediaCollection" "collector" %}</label>
-    <input type="text" id="collector" name="collector" />
-    </p>
-
-    {% if rec_years %} 
-    <p>
-    <label for="rec_date_from">{% trans "Year of recording" %}</label>
-    <select id="rec_year_from" name="rec_year_from" class="tiny">
-        <option value="0"></option>
-        {% for year in rec_years %}
-        <option value="{{ year }}" {% ifequal criteria.rec_year_from year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    {% trans "to" %}
-    <select id="rec_year_to" name="rec_year_to" class="tiny">
-        <option value="0"></option>
-        {% for year in rec_years %}
-        <option value="{{ year }}" {% ifequal criteria.rec_year_to year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    </p>
-    {% endif %}
-
-    {% if pub_years %} 
-    <p>
-    <label for="pub_date_from">{% trans "Year of publication" %}</label>
-    <select id="pub_year_from" name="pub_year_from" class="tiny">
-        <option value="0"></option>
-        {% for year in pub_years %}
-        <option value="{{ year }}" {% ifequal criteria.pub_year_from year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    {% trans "to" %}
-    <select id="pub_year_to" name="pub_year_to" class="tiny">
-        <option value="0"></option>
-        {% for year in pub_years %}
-        <option value="{{ year }}" {% ifequal criteria.pub_year_to year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    </p>
-    {% endif %}
-
-    <p><label for="sound">{% trans "Sound" %}</label>
-    <input type="checkbox" name="sound" value="True" align="left" />
-    </p>
-
-</fieldset>
-
-<p class="input">
-<a href="#" class="component_icon button icon_search"
-      onclick="document.getElementById('searchform').submit(); return false;">{% trans 'Search' %}</a>
-</p>
-
-</form>
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/search_results.html b/telemeta/templates/telemeta_default/search_results.html
deleted file mode 100644 (file)
index ced7817..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Search Results" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "search_red.png" %}" alt="search-results" style="vertical-align:middle" /> {% trans "Search Results" %}
-{% endblock %}
-
-{% block title_buttons %}
-    {% ifequal type 'items' %}
-     <a href="{% url telemeta-search-items %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
-     <a href="{% url telemeta-search-items %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
-    {% else %}
-     <a href="{% url telemeta-search-collections %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
-     <a href="{% url telemeta-search-collections %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
-    {% endifequal %}
-{% endblock %}
-
-{% block content %}
-{% if criteria %}
-<ul>
-  {% if criteria.pattern %}
-    <li><b>{% trans "Search pattern" %}:</b> {{criteria.pattern}}</li>
-  {% endif %}
-  {% if criteria.location %}
-    <li><b>{% field_label "Location" %}:</b> {{criteria.location}}</li>
-  {% endif %}
-  {% if criteria.ethnic_group %}
-    <li><b>{% field_label "EthnicGroup" %}:</b> {{criteria.ethnic_group}}</li>
-  {% endif %}
-  {% if criteria.creator %}
-    <li><b>{% field_label "MediaCollection" "creator" %}:</b> {{criteria.creator}}</li>
-  {% endif %}
-  {% if criteria.collector %}
-    <li><b>{% field_label "MediaCollection" "collector" %}:</b> {{criteria.collector}}</li>
-  {% endif %}
-  {% if criteria.title %}
-    <li><b>{% trans "Title" %}:</b> {{criteria.title}}</li>
-  {% endif %}
-  {% if criteria.rec_year_from %}
-    <li><b>{% trans "Year of recording" %}:</b> {{criteria.rec_year_from}}
-     {% ifnotequal criteria.rec_year_to criteria.rec_year_from %}
-     {% trans "to" %} {{criteria.rec_year_to}}
-     {% endifnotequal %}
-    </li>
-  {% endif %}
-  {% if criteria.pub_year_from %}
-    <li><b>{% trans "Year of publication" %}:</b> {{criteria.pub_year_from}}
-     {% ifnotequal criteria.pub_year_to criteria.pub_year_from %}
-     {% trans "to" %} {{criteria.pub_year_to}}
-     {% endifnotequal %}
-    </li>
-  {% endif %}
-    {% if criteria.sound %}
-    <li><b>{% trans "Sound" %}:</b> {{criteria.sound}}</li>
-  {% endif %}
-</ul>
-{% endif %}
-
-{% ifequal type 'items' %}
-
-  <p><a href="{% url telemeta-search-collections %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <b>Items ({{items_num}})</b></p>
-
-  {% with object_list as items %}
-   <div class="fullpage">
-      {% include "telemeta/inc/mediaitem_list.html" %}
-   </div>
-  {% endwith %}    
-
-{% else %}
-
-  <p><b>Collections ({{collections_num}})</b> | <a href="{% url telemeta-search-items %}?{{criteria|build_query_string}}">Items ({{items_num}})</a>
-  </p>
-
-  {% with object_list as collections %}
-   <div class="fullpage">
-      {% include "telemeta/inc/collection_list.html" %}
-   </div>
-  {% endwith %}
-
-{% endifequal %}
-
-{% endblock %}
diff --git a/telemeta/templates/telemeta_default/users.html b/telemeta/templates/telemeta_default/users.html
deleted file mode 100644 (file)
index 4f73df1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-
-{% block head_title %}{% trans "Users" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
- <img src="{% url telemeta-images "user_red.png" %}" alt="user" style="vertical-align:middle" /> {% trans "Users" %}
-{% endblock %}
-
-{% block content %}
- {% if users %}
-  <br />
-  {% include "telemeta/inc/user_list.html" %}
- {% else %}
-    <p class="help">{% trans "No users" %}</p>
- {% endif %}
-{% endblock %}
index 4ea2b15e87fe188d7a8eef7948f5227d8bc04eed..88879c794e07914339106396771b9852af8ef127 100644 (file)
@@ -15,6 +15,7 @@ import re
 import os
 import datetime
 from django.conf import settings
+from django.template.defaultfilters import stringfilter
 
 register = template.Library()
 
@@ -356,3 +357,8 @@ def get_youtube(link):
 @register.filter
 def to_utf8(word):
     return word.encode('utf-8')
+
+@register.filter
+@stringfilter
+def capitalize(value):
+    return value.capitalize()
index 191e15fcaf28d5fe8093abfe0a5941305a2b6983..460e2bde7372a9b503b19771364ed33f3b938263 100644 (file)
 
 from django.conf.urls.defaults import *
 from django.views.generic.simple import redirect_to
-from telemeta.models import MediaItem, MediaCollection, MediaItemMarker, MediaCorpus, MediaFund
+from telemeta.models import MediaItem, MediaCollection, MediaItemMarker, MediaCorpus, MediaFonds
 from telemeta.views.base import GeneralView, AdminView, CollectionView, ItemView, \
                                 InstrumentView, PlaylistView, ProfileView, GeoView, \
-                                LastestRevisionsFeed
+                                LastestRevisionsFeed, ResourceView
 from jsonrpc import jsonrpc_site
 import os.path
 import telemeta.config
@@ -55,6 +55,7 @@ instrument_view = InstrumentView()
 playlist_view = PlaylistView()
 profile_view = ProfileView()
 geo_view = GeoView()
+resource_view = ResourceView()
 
 # query sets for Django generic views
 all_items = { 'queryset': MediaItem.objects.enriched().order_by('code', 'old_code') }
@@ -64,7 +65,7 @@ all_collections_unpublished = { 'queryset': MediaCollection.objects.filter(code_
 all_collections_published = { 'queryset': MediaCollection.objects.filter(code__contains='_E_'), }
 all_collections_sound = { 'queryset': MediaCollection.objects.sound().order_by('code', 'old_code') }
 all_corpus = { 'queryset': MediaCorpus.objects.all().order_by('title') }
-all_funds = { 'queryset': MediaFund.objects.all().order_by('title') }
+all_fonds = { 'queryset': MediaFonds.objects.all().order_by('title') }
 
 # ID's regular expressions
 export_extensions = "|".join(item_view.list_export_extensions())
@@ -78,33 +79,33 @@ urlpatterns = patterns('',
     # TODO: make a real archives tree view
     url(r'^archives/$', redirect_to, {'url': '/archives/collections/'},
         name="telemeta-archives"),
-        
+
     # items
-    url(r'^archives/items/$', 'django.views.generic.list_detail.object_list', 
+    url(r'^archives/items/$', 'django.views.generic.list_detail.object_list',
         dict(all_items, paginate_by=20, template_name="telemeta/mediaitem_list.html"),
         name="telemeta-items"),
     url(r'^archives/items_sound/$', 'django.views.generic.list_detail.object_list',
         dict(all_items_sound, paginate_by=20, template_name="telemeta/mediaitem_list.html"), name="telemeta-items-sound"),
-    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/$', item_view.item_detail, 
+    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/$', item_view.item_detail,
         name="telemeta-item-detail"),
-    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/dc/$', item_view.item_detail, 
+    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/dc/$', item_view.item_detail,
         {'template': 'telemeta/mediaitem_detail_dc.html'},
         name="telemeta-item-dublincore"),
-    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/dc/xml/$', item_view.item_detail, 
+    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/dc/xml/$', item_view.item_detail,
         {'format': 'dublin_core_xml'},
         name="telemeta-item-dublincore-xml"),
-    url(r'^archives/items/download/(?P<public_id>[A-Za-z0-9._-]+)\.(?P<extension>' 
-            + export_extensions + ')$', 
+    url(r'^archives/items/download/(?P<public_id>[A-Za-z0-9._-]+)\.(?P<extension>'
+            + export_extensions + ')$',
         item_view.item_export,
         name="telemeta-item-export"),
-    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/visualize/(?P<visualizer_id>[0-9a-z_]+)/(?P<width>[0-9A-Z]+)x(?P<height>[0-9A-Z]+)/$', 
+    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/visualize/(?P<visualizer_id>[0-9a-z_]+)/(?P<width>[0-9A-Z]+)x(?P<height>[0-9A-Z]+)/$',
         item_view.item_visualize,
         name="telemeta-item-visualize"),
-    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/analyze/xml/$', 
+    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/analyze/xml/$',
         item_view.item_analyze_xml,
         name="telemeta-item-analyze-xml"),
-    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/item_xspf.xml$', 
-        item_view.item_playlist, 
+    url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/item_xspf.xml$',
+        item_view.item_playlist,
         dict(template="telemeta/mediaitem_xspf.xml", mimetype="application/xspf+xml"),
         name="telemeta-item-xspf"),
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/edit/$', item_view.item_edit,
@@ -126,7 +127,7 @@ urlpatterns = patterns('',
     url(r'^markers/(?P<marker_id>[A-Za-z0-9]+)/$', item_view.item_detail, name="telemeta-item-detail-marker"),
     # FIXME: need all paths
     url(r'^items/(?P<path>[A-Za-z0-9._-s/]+)/$', redirect_to, {'url': '/archives/items/%(path)s/', 'permanent': False}, name="telemeta-item-redir"),
-        
+
     # collections
     url(r'^archives/collections/$', 'django.views.generic.list_detail.object_list',
         dict(all_collections, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections"),
@@ -134,19 +135,19 @@ urlpatterns = patterns('',
         dict(all_collections_unpublished, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections-unpublished"),
     url(r'^archives/collections_published/$', 'django.views.generic.list_detail.object_list',
         dict(all_collections_published, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections-published"),
-    url(r'^archives/collections/?page=(?P<page>[0-9]+)$', 
+    url(r'^archives/collections/?page=(?P<page>[0-9]+)$',
         'django.views.generic.list_detail.object_list',
         dict(all_collections, paginate_by=20)),
     url(r'^archives/collections/(?P<public_id>[A-Za-z0-9._-]+)/$', collection_view.collection_detail,
         dict(template="telemeta/collection_detail.html"), name="telemeta-collection-detail"),
     url(r'^archives/collections/(?P<public_id>[A-Za-z0-9._-]+)/dc/$', collection_view.collection_detail,
         dict(template="telemeta/collection_detail_dc.html"), name="telemeta-collection-dublincore"),
-    url(r'^archives/collections/(?P<public_id>[A-Za-z0-9._-]+)/collection_xspf.xml$', 
-        collection_view.collection_playlist, 
+    url(r'^archives/collections/(?P<public_id>[A-Za-z0-9._-]+)/collection_xspf.xml$',
+        collection_view.collection_playlist,
         dict(template="telemeta/collection_xspf.xml", mimetype="application/xspf+xml"),
         name="telemeta-collection-xspf"),
     url(r'^archives/collections/(?P<public_id>[A-Za-z0-9._-]+)/collection.m3u$',
-        collection_view.collection_playlist, 
+        collection_view.collection_playlist,
         dict(template="telemeta/collection.m3u", mimetype="audio/mpegurl"),
         name="telemeta-collection-m3u"),
     url(r'^archives/collections/(?P<public_id>[A-Za-z0-9._-]+)/edit/$', collection_view.collection_edit,
@@ -164,115 +165,110 @@ urlpatterns = patterns('',
         dict(all_collections_sound, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections-sound"),
     # FIXME: need all paths
     url(r'^collections/(?P<path>[A-Za-z0-9._-s/]+)/$', redirect_to, {'url': '/archives/collections/%(path)s/', 'permanent': False}, name="telemeta-collection-redir"),
-    
-    # Corpus
+
+    # RESOURCES
+    # Corpus list
     url(r'^archives/corpus/$', 'django.views.generic.list_detail.object_list',
-        dict(all_corpus, paginate_by=20, template_name="telemeta/corpus_list.html"), name="telemeta-corpus"),
-    url(r'^archives/corpus/(?P<public_id>[A-Za-z0-9._-]+)/$', corpus_view.corpus_detail,
-        dict(template="telemeta/corpus_detail.html"), name="telemeta-corpus-detail"),
-    url(r'^archives/corpus/(?P<public_id>[A-Za-z0-9._-]+)/dc/$', corpus_view.corpus_detail,
-        dict(template="telemeta/corpus_detail_dc.html"), name="telemeta-corpus-dublincore"),
-    url(r'^archives/corpus/(?P<public_id>[A-Za-z0-9._-]+)/edit/$', corpus_view.corpus_edit,
-        dict(template='telemeta/corpus_edit.html'), name="telemeta-corpus-edit"),
-    url(r'^archives/corpus/(?P<public_id>[A-Za-z0-9._-]+)/copy/$', corpus_view.corpus_copy,
-        dict(template='telemeta/corpus_edit.html'), name="telemeta-corpus-copy"),
-    url(r'^archives/corpus_new/add/$', corpus_view.corpus_add,
-        dict(template='telemeta/corpus_add.html'), name="telemeta-corpus-add"),
-        
-    # Funds
-    url(r'^archives/funds/$', 'django.views.generic.list_detail.object_list',
-        dict(all_funds, paginate_by=20, template_name="telemeta/fund_list.html"), name="telemeta-funds"),
-    url(r'^archives/funds/(?P<public_id>[A-Za-z0-9._-]+)/$', fund_view.fund_detail,
-        dict(template="telemeta/fund_detail.html"), name="telemeta-fund-detail"),
-    url(r'^archives/funds/(?P<public_id>[A-Za-z0-9._-]+)/dc/$', fund_view.fund_detail,
-        dict(template="telemeta/fund_detail_dc.html"), name="telemeta-fund-dublincore"),
-    url(r'^archives/funds/(?P<public_id>[A-Za-z0-9._-]+)/edit/$', fund_view.fund_edit,
-        dict(template='telemeta/fund_edit.html'), name="telemeta-fund-edit"),
-    url(r'^archives/funds/(?P<public_id>[A-Za-z0-9._-]+)/copy/$', fund_view.fund_copy,
-        dict(template='telemeta/fund_edit.html'), name="telemeta-fund-copy"),
-    url(r'^archives/fund/add/$', fund_view.fund_add,
-        dict(template='telemeta/fund_add.html'), name="telemeta-fund-add"),
-        
+        dict(all_corpus, paginate_by=20, template_name="telemeta/resource_list.html", extra_context={'type':'corpus'}), name="telemeta-corpus"),
+    # Fonds list
+    url(r'^archives/fonds/$', 'django.views.generic.list_detail.object_list',
+        dict(all_fonds, paginate_by=20, template_name="telemeta/resource_list.html", extra_context={'type':'fonds'}), name="telemeta-fonds"),
+
+    # Generic resource
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)/(?P<public_id>[A-Za-z0-9._-]+)/$', resource_view.detail,
+        dict(template="telemeta/resource_detail.html"), name="telemeta-resource-detail"),
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)/(?P<public_id>[A-Za-z0-9._-]+)/dc/$', resource_view.detail,
+        dict(template="telemeta/resource_detail_dc.html"), name="telemeta-resource-dublincore"),
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)/(?P<public_id>[A-Za-z0-9._-]+)/edit/$', resource_view.edit,
+        dict(template='telemeta/resource_edit.html'), name="telemeta-resource-edit"),
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)/(?P<public_id>[A-Za-z0-9._-]+)/copy/$', resource_view.copy,
+        dict(template='telemeta/resource_edit.html'), name="telemeta-resource-copy"),
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)_add$', resource_view.add,
+        dict(template='telemeta/resource_add.html'), name="telemeta-resource-add"),
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)/(?P<public_id>[A-Za-z0-9._-]+)/delete/$', resource_view.delete, name="telemeta-resource-delete"),
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)/(?P<public_id>[A-Za-z0-9._-]+)/related/(?P<media_id>[A-Za-z0-9._-]+)$', resource_view.related_stream, name="telemeta-resource-related"),
+    url(r'^archives/(?P<type>[A-Za-z0-9._-]+)/(?P<public_id>[A-Za-z0-9._-]+)/related_edit/$', resource_view.related_edit,  dict(template='telemeta/resource_related_edit.html'), name="telemeta-resource-related_edit"),
+
     # search
     url(r'^search/$', general_view.search, name="telemeta-search"),
-    url(r'^search/collections/$', general_view.search, {'type': 'collections'}, 
+    url(r'^search/collections/$', general_view.search, {'type': 'collections'},
         name="telemeta-search-collections"),
-    url(r'^search/items/$', general_view.search, {'type': 'items'}, 
+    url(r'^search/items/$', general_view.search, {'type': 'items'},
         name="telemeta-search-items"),
     url(r'^search/criteria/$', general_view.edit_search, name="telemeta-search-criteria"),
     url(r'^complete_location/$', general_view.complete_location, name="telemeta-complete-location"),
 
-    # administration        
-    url(r'^admin/$', admin_view.admin_index, name="telemeta-admin"),        
-    url(r'^admin/general/$', admin_view.admin_general, name="telemeta-admin-general"),        
-    url(r'^admin/enumerations/$', admin_view.admin_enumerations, name="telemeta-admin-enumerations"),       
-    url(r'^admin/users/$', admin_view.admin_users, name="telemeta-admin-users"),       
-    
+    # administration
+    url(r'^admin/$', admin_view.admin_index, name="telemeta-admin"),
+    url(r'^admin/general/$', admin_view.admin_general, name="telemeta-admin-general"),
+    url(r'^admin/enumerations/$', admin_view.admin_enumerations, name="telemeta-admin-enumerations"),
+    url(r'^admin/users/$', admin_view.admin_users, name="telemeta-admin-users"),
+
     # instruments administration
-    url(r'^admin/instruments/$', 
+    url(r'^admin/instruments/$',
         instrument_view.edit_instrument ,
-        name="telemeta-instrument-edit"),        
-    url(r'^admin/instruments/add/$', 
+        name="telemeta-instrument-edit"),
+    url(r'^admin/instruments/add/$',
         instrument_view.add_to_instrument,
-        name="telemeta-instrument-add"),        
-    url(r'^admin/instruments/update/$', 
+        name="telemeta-instrument-add"),
+    url(r'^admin/instruments/update/$',
         instrument_view.update_instrument,
-        name="telemeta-instrument-update"),        
+        name="telemeta-instrument-update"),
     url(r'^admin/instruments/'
         + r'(?P<value_id>[0-9]+)/$',
         instrument_view.edit_instrument_value,
-        name="telemeta-instrument-record-edit"),   
+        name="telemeta-instrument-record-edit"),
     url(r'^admin/instruments/'
         + r'(?P<value_id>[0-9]+)/update/$',
-        instrument_view.update_instrument_value, 
-        name="telemeta-instrument-record-update"),   
-        
+        instrument_view.update_instrument_value,
+        name="telemeta-instrument-record-update"),
+
     # enumerations administration
-    url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/$', 
+    url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/$',
         admin_view.edit_enumeration ,
-        name="telemeta-enumeration-edit"),        
-    url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/add/$', 
+        name="telemeta-enumeration-edit"),
+    url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/add/$',
         admin_view.add_to_enumeration,
-        name="telemeta-enumeration-add"),        
-    url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/update/$', 
+        name="telemeta-enumeration-add"),
+    url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/update/$',
         admin_view.update_enumeration,
-        name="telemeta-enumeration-update"),        
+        name="telemeta-enumeration-update"),
     url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/'
         + r'(?P<value_id>[0-9]+)/$',
         admin_view.edit_enumeration_value,
-        name="telemeta-enumeration-record-edit"),   
+        name="telemeta-enumeration-record-edit"),
     url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/'
         + r'(?P<value_id>[0-9]+)/update/$',
-        admin_view.update_enumeration_value, 
-        name="telemeta-enumeration-record-update"),   
+        admin_view.update_enumeration_value,
+        name="telemeta-enumeration-record-update"),
 
     # Geographic browsing
     url(r'^geo/$', geo_view.list_continents, name="telemeta-geo-continents"),
-    url(r'^geo/(?P<continent>[a-z_]+)/$', geo_view.list_countries, 
+    url(r'^geo/(?P<continent>[a-z_]+)/$', geo_view.list_countries,
         name="telemeta-geo-countries"),
-    url(r'^geo/collections/(?P<continent>[a-z_]+)/(?P<country>[a-z_]+)/$', 
-        geo_view.list_country_collections, 
+    url(r'^geo/collections/(?P<continent>[a-z_]+)/(?P<country>[a-z_]+)/$',
+        geo_view.list_country_collections,
         name="telemeta-geo-country-collections"),
-    url(r'^geo/items/(?P<continent>[a-z_]+)/(?P<country>[a-z_]+)/$', 
-        geo_view.list_country_items, 
+    url(r'^geo/items/(?P<continent>[a-z_]+)/(?P<country>[a-z_]+)/$',
+        geo_view.list_country_items,
         name="telemeta-geo-country-items"),
-    url(r'^geo/country_info/(?P<id>[0-9a-z]+)/$', 
+    url(r'^geo/country_info/(?P<id>[0-9a-z]+)/$',
         geo_view.country_info, name="telemeta-country-info"),
 
     # CSS+Images (FIXME: for developement only)
-    url(r'^css/(?P<path>.*)$', 'django.views.static.serve', 
+    url(r'^css/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': htdocs+'/css'},
         name="telemeta-css"),
-    url(r'images/(?P<path>.*)$', 'django.views.static.serve', 
+    url(r'images/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': htdocs+'/images'},
         name="telemeta-images"),
-    url(r'^js/(?P<path>.*)$', 'django.views.static.serve', 
+    url(r'^js/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': htdocs+'/js'},
         name="telemeta-js"),
-    url(r'^swf/(?P<path>.*)$', 'django.views.static.serve', 
+    url(r'^swf/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': htdocs+'/swf'},
         name="telemeta-swf"),
-    url(r'^timeside/(?P<path>.*)$', 'django.views.static.serve', 
+    url(r'^timeside/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': htdocs+'/timeside'},
         name="telemeta-timeside"),
 
@@ -291,29 +287,29 @@ urlpatterns = patterns('',
 
     # Users
     url(r'^users/$', general_view.users, name="telemeta-users"),
-    
+
     # Profiles
     url(r'^users/(?P<username>[A-Za-z0-9._-]+)/profile/$', profile_view.profile_detail, name="telemeta-profile-detail"),
     url(r'^users/(?P<username>[A-Za-z0-9._-]+)/profile/edit/$', profile_view.profile_edit, name="telemeta-profile-edit"),
-    
+
     # Registration
     url(r'^accounts/password_change/$', 'django.contrib.auth.views.password_change', {'template_name': 'telemeta/registration/password_change_form.html'}, name="telemeta-password-change"),
     url(r'^accounts/password_change_done/$', 'django.contrib.auth.views.password_change_done', {'template_name': 'telemeta/registration/password_change_done.html'}, name="telemeta-password-change-done"),
-    
+
     url(r'^accounts/password_reset/$', 'django.contrib.auth.views.password_reset', {'template_name': 'telemeta/registration/password_reset_form.html', 'email_template_name': 'telemeta/registration/password_reset_email.html'}, name="telemeta-password-reset"),
     url(r'^accounts/password_reset_done/$', 'django.contrib.auth.views.password_reset_done', {'template_name': 'telemeta/registration/password_reset_done.html'}, name="telemeta-password-reset-done"),
     url(r'^accounts/password_reset_confirm/(?P<uidb36>[A-Za-z0-9._-]+)/(?P<token>[A-Za-z0-9._-]+)/$', 'django.contrib.auth.views.password_reset_confirm', {'template_name': 'telemeta/registration/password_reset_confirm.html'}, name="telemeta-password-reset-confirm"),
     url(r'^accounts/password_reset_complete/$', 'django.contrib.auth.views.password_reset_complete', {'template_name': 'telemeta/registration/password_reset_complete.html'}, name="telemeta-password-reset-complete"),
     url(r'^accounts/password_reset_complete/$', 'django.contrib.auth.views.password_reset_complete', {'template_name': 'telemeta/registration/password_reset_complete.html'}, name="telemeta-password-reset-complete"),
-       
+
     # JSON RPC
     url(r'json/$', jsonrpc_site.dispatch, name='jsonrpc_mountpoint'),
     # for the graphical browser/web console only, omissible
-    # url(r'json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"), 
-    
+    # url(r'json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"),
+
     # Playlists
     url(r'^playlists/(?P<public_id>[a-zA-Z0-9]+)/(?P<resource_type>[a-zA-Z0-9]+)/csv/$', playlist_view.playlist_csv_export, name="telemeta-playlist-csv-export"),
-    
+
     # RSS feeds
     url(r'^rss/$', LastestRevisionsFeed(), name="telemeta-rss"),
 
index 1bed4a0901f8ec0c2d12b27cf5ba18193a632352..f0135261856b0d9a0b9b20d5423bac30250e62b2 100644 (file)
@@ -144,6 +144,17 @@ def get_revisions(nb):
                 element = MediaItemMarker.objects.get(pk=revision.element_id)
             except:
                 element = None
+        if revision.element_type == 'corpus':
+            try:
+                element = MediaCorpus.objects.get(pk=revision.element_id)
+            except:
+                element = None
+        if revision.element_type == 'fonds':
+            try:
+                element = MediaFonds.objects.get(pk=revision.element_id)
+            except:
+                element = None
+
         if not element == None:
             revisions.append({'revision': revision, 'element': element})
     return revisions
@@ -177,17 +188,14 @@ def check_related_media(medias):
             media.set_mime_type()
             media.save()
         if not media.title and media.url:
-            try:
-                from lxml import etree
-                parser = etree.HTMLParser()
-                tree = etree.parse(media.url, parser)
-                title = tree.find(".//title").text
-                title = title.replace('\n', '').strip()
-                media.title = title
-            except:
-                media.title = media.url
+            import lxml.etree
+            parser = lxml.etree.HTMLParser()
+            parser = lxml.etree.HTMLParser()
+            tree = lxml.etree.parse(media.url, parser)
+            title = tree.find(".//title").text
+            media.title = title.replace('\n', '').strip()
             media.save()
-        
+
 
 class GeneralView(object):
     """Provide general web UI methods"""
@@ -383,7 +391,7 @@ class CollectionView(object):
 
         related_media = MediaCollectionRelated.objects.filter(collection=collection)
         check_related_media(related_media)
-        
+
         return render(request, template, {'collection': collection, 'playlists': playlists, 'public_access': public_access, 'items': items, 'related_media': related_media})
 
     @method_decorator(permission_required('telemeta.change_mediacollection'))
@@ -560,7 +568,7 @@ class ItemView(object):
 
         related_media = MediaItemRelated.objects.filter(item=item)
         check_related_media(related_media)
-        
+
         return render(request, template,
                     {'item': item, 'export_formats': formats,
                     'visualizers': graphers, 'visualizer_id': grapher_id,
@@ -1367,219 +1375,127 @@ class LastestRevisionsFeed(Feed):
 
 
 
-class CorpusView(object):
-    """Provide Corpus web UI methods"""
-
-    def corpus_detail(self, request, public_id, template='telemeta/corpus_detail.html'):
-        corpus = MediaCorpus.objects.get(public_id=public_id)
-        items = corpus.items.enriched()
-        items = items.order_by('code', 'old_code')
-
-        if corpus.public_access == 'none' and not (request.user.is_staff or request.user.is_superuser):
-            mess = ugettext('Access not allowed')
-            title = ugettext('Corpus') + ' : ' + public_id + ' : ' + mess
-            description = ugettext('Please login or contact the website administator to get a private access.')
-            messages.error(request, title)
-            return render(request, 'telemeta/messages.html', {'description' : description})
-
-        public_access = get_public_access(corpus.public_access, corpus.recorded_from_year,
-                                                corpus.recorded_to_year)
-        playlists = get_playlists(request)
-
-        related_media = MediaCorpusRelated.objects.filter(corpus=corpus)
+class ResourceView(object):
+    """Provide Resource web UI methods"""
+
+    types = {'corpus':
+                {'model': MediaCorpus,
+                'form' : MediaCorpusForm,
+                'related': MediaCorpusRelated,
+                'related_form': MediaCorpusRelatedForm
+                },
+            'fonds':
+                {'model': MediaFonds,
+                'form' : MediaFondsForm,
+                'related': MediaFondsRelated,
+                'related_form': MediaFondsRelatedForm
+                }
+            }
+
+    def setup(self, type):
+        self.model = self.types[type]['model']
+        self.form = self.types[type]['form']
+        self.related = self.types[type]['related']
+        self.related_form = self.types[type]['related_form']
+        self.type = type
+
+    def detail(self, request, type, public_id, template='telemeta/resource_detail.html'):
+        self.setup(type)
+        resource = self.model.objects.get(code=public_id)
+        children = resource.children.all()
+        children = children.order_by('code')
+
+        related_media = self.related.objects.filter(resource=resource)
         check_related_media(related_media)
 
-        return render(request, template, {'corpus': corpus, 'playlists': playlists, 'public_access': public_access, 'items': items, 'related_media': related_media})
+        return render(request, template, {'resource': resource, 'type': type, 'children': children, 'related_media': related_media})
 
-    @method_decorator(permission_required('telemeta.change_mediacorpus'))
-    def corpus_edit(self, request, public_id, template='telemeta/corpus_edit.html'):
-        corpus = MediaCorpus.objects.get(public_id=public_id)
+    def edit(self, request, type, public_id, template='telemeta/resource_edit.html'):
+        self.setup(type)
+        resource = self.model.objects.get(code=public_id)
         if request.method == 'POST':
-            form = MediaCorpusForm(data=request.POST, files=request.FILES, instance=corpus)
+            form = self.form(data=request.POST, files=request.FILES, instance=resource)
             if form.is_valid():
                 code = form.cleaned_data['code']
                 if not code:
                     code = public_id
                 form.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/corpus/'+code)
+                resource.set_revision(request.user)
+                return HttpResponseRedirect('/archives/'+self.type+'/'+code)
         else:
-            form = MediaCorpusForm(instance=corpus)
+            form = self.form(instance=resource)
+        return render(request, template, {'resource': resource, 'type': type, 'form': form,})
 
-        return render(request, template, {'corpus': corpus, "form": form,})
-
-    @method_decorator(permission_required('telemeta.add_mediacorpus'))
-    def corpus_add(self, request, template='telemeta/corpus_add.html'):
-        corpus = MediaCorpus()
+    def add(self, request, type, template='telemeta/resource_add.html'):
+        self.setup(type)
+        resource = self.model()
         if request.method == 'POST':
-            form = MediaCorpusForm(data=request.POST, files=request.FILES, instance=corpus)
+            form = self.form(data=request.POST, files=request.FILES, instance=resource)
             if form.is_valid():
                 code = form.cleaned_data['code']
                 if not code:
                     code = public_id
                 form.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/corpus/'+code)
+                resource.set_revision(request.user)
+                return HttpResponseRedirect('/archives/'+self.type +'/'+code)
         else:
-            form = MediaCorpusForm(instance=corpus)
-
-        return render(request, template, {'corpus': corpus, "form": form,})
+            form = self.form(instance=resource)
+        return render(request, template, {'resource': resource, 'type': type, 'form': form,})
 
-    @method_decorator(permission_required('telemeta.add_mediacorpus'))
-    def corpus_copy(self, request, public_id, template='telemeta/corpus_edit.html'):
+    def copy(self, request, type, public_id, template='telemeta/resource_edit.html'):
+        self.setup(type)
         if request.method == 'POST':
-            corpus = MediaCorpus()
-            form = MediaCorpusForm(data=request.POST, files=request.FILES, instance=corpus)
+            resource = self.model()
+            form = self.form(data=request.POST, files=request.FILES, instance=resource)
             if form.is_valid():
                 code = form.cleaned_data['code']
                 if not code:
                     code = public_id
-                form.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/corpus/'+code)
+                resource.save()
+                resource.set_revision(request.user)
+                return HttpResponseRedirect('/archives/'+self.type +'/'+code)
         else:
-            corpus = MediaCorpus.objects.get(public_id=public_id)
-            form = MediaCorpusForm(instance=corpus)
-
-        return render(request, template, {'corpus': corpus, "form": form,})
-
-    @method_decorator(permission_required('telemeta.delete_mediacorpus'))
-    def corpus_delete(self, request, public_id):
-        """Delete a given corpus"""
-        corpus = MediaCorpus.objects.get(public_id=public_id)
-        corpus.delete()
-        return HttpResponseRedirect('/corpus/')
-
-    def related_media_corpus_stream(self, request, corpus_public_id, media_id):
-        corpus = MediaCorpus.objects.get(public_id=corpus_public_id)
-        media = MediaCorpusRelated.objects.get(corpus=corpus, id=media_id)
-        response = HttpResponse(stream_from_file(media.file.path), mimetype=media.mime_type)
-#        response['Content-Disposition'] = 'attachment'
-        return response
-
-    @method_decorator(permission_required('telemeta.change_mediacorpus'))
-    def related_media_edit(self, request, public_id, template):
-        corpus = MediaCorpus.objects.get(public_id=public_id)
-        MediaCorpusRelatedFormSet = inlineformset_factory(MediaCorpus, MediaCorpusRelated, form=MediaCorpusRelatedForm)
-        if request.method == 'POST':
-            formset = MediaCorpusRelatedFormSet(data=request.POST, files=request.FILES, instance=corpus)
-            if formset.is_valid():
-                formset.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/corpus/'+public_id)
-        else:
-            formset = MediaCorpusRelatedFormSet(instance=corpus)
-
-        return render(request, template, {'corpus': corpus, 'formset': formset,})
+            resource = self.model.objects.get(code=public_id)
+            form = self.form(instance=resource)
+        return render(request, template, {'resource': resource, 'type': type, "form": form,})
 
-class CorpusView(object):
-    """Provide Corpuss web UI methods"""
-
-    def corpus_detail(self, request, public_id, template='telemeta/corpus_detail.html'):
-        corpus = MediaCorpus.objects.get(public_id=public_id)
-        collections = corpus.collections.enriched()
-        collections = collections.order_by('code')
-
-        if corpus.public_access == 'none' and not (request.user.is_staff or request.user.is_superuser):
-            mess = ugettext('Access not allowed')
-            title = ugettext('Corpus') + ' : ' + public_id + ' : ' + mess
-            description = ugettext('Please login or contact the website administator to get a private access.')
-            messages.error(request, title)
-            return render(request, 'telemeta/messages.html', {'description' : description})
-
-        related_media = MediaCorpusRelated.objects.filter(corpus=corpus)
-        check_related_media(related_media)
-        
-        return render(request, template, {'corpus': corpus, 'collections': collections, 'related_media': related_media})
-
-    @method_decorator(permission_required('telemeta.change_mediacorpus'))
-    def corpus_edit(self, request, public_id, template='telemeta/corpus_edit.html'):
-        corpus = MediaCorpus.objects.get(public_id=public_id)
-        if request.method == 'POST':
-            form = MediaCorpusForm(data=request.POST, files=request.FILES, instance=corpus)
-            if form.is_valid():
-                code = form.cleaned_data['code']
-                if not code:
-                    code = public_id
-                form.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/archives/corpus/'+code)
-        else:
-            form = MediaCorpusForm(instance=corpus)
-
-        return render(request, template, {'corpus': corpus, "form": form,})
-
-    @method_decorator(permission_required('telemeta.add_mediacorpus'))
-    def corpus_add(self, request, template='telemeta/corpus_add.html'):
-        corpus = MediaCorpus()
-        if request.method == 'POST':
-            form = MediaCorpusForm(data=request.POST, files=request.FILES, instance=corpus)
-            if form.is_valid():
-                code = form.cleaned_data['code']
-                if not code:
-                    code = public_id
-                form.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/archives/corps/'+code)
-        else:
-            form = MediaCorpusForm(instance=corpus)
-
-        return render(request, template, {'corpus': corpus, "form": form,})
-
-    @method_decorator(permission_required('telemeta.add_mediacorpus'))
-    def corpus_copy(self, request, public_id, template='telemeta/corpus_edit.html'):
-        if request.method == 'POST':
-            corpus = MediaCorpus()
-            form = MediaCorpusForm(data=request.POST, files=request.FILES, instance=corpus)
-            if form.is_valid():
-                code = form.cleaned_data['code']
-                if not code:
-                    code = public_id
-                form.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/archives/corpus/'+code)
-        else:
-            corpus = MediaCorpus.objects.get(public_id=public_id)
-            form = MediaCorpusForm(instance=corpus)
-
-        return render(request, template, {'corpus': corpus, "form": form,})
-
-    def corpus_playlist(self, request, public_id, template, mimetype):
+    def playlist(self, request, type, public_id, template, mimetype):
+        self.setup(type)
         try:
-            corpus = MediaCorpus.objects.get(public_id=public_id)
+            resource = self.model.objects.get(code=public_id)
         except ObjectDoesNotExist:
             raise Http404
 
         template = loader.get_template(template)
-        context = RequestContext(request, {'corpus': corpus, 'host': request.META['HTTP_HOST']})
+        context = RequestContext(request, {'resource': resource, 'host': request.META['HTTP_HOST']})
         return HttpResponse(template.render(context), mimetype=mimetype)
 
-    @method_decorator(permission_required('telemeta.delete_mediacorpus'))
-    def corpus_delete(self, request, public_id):
-        """Delete a given corpus"""
-        corpus = MediaCorpus.objects.get(public_id=public_id)
-        corpus.delete()
-        return HttpResponseRedirect('/archives/corpus/')
+    def delete(self, request, type, public_id):
+        self.setup(type)
+        resource = self.model.objects.get(code=public_id)
+        resource.delete()
+        return HttpResponseRedirect('/archives/'+self.type+'/')
 
-    def related_media_corpus_stream(self, request, corpus_public_id, media_id):
-        corpus = MediaCorpus.objects.get(public_id=corpus_public_id)
-        media = MediaCorpusRelated.objects.get(corpus=corpus, id=media_id)
+    def related_stream(self, request, type, public_id, media_id):
+        self.setup(type)
+        resource = self.model.objects.get(code=public_id)
+        media = self.related.objects.get(resource=resource, id=media_id)
         response = HttpResponse(stream_from_file(media.file.path), mimetype=media.mime_type)
 #        response['Content-Disposition'] = 'attachment'
         return response
 
-    @method_decorator(permission_required('telemeta.change_mediacorpus'))
-    def related_media_edit(self, request, public_id, template):
-        corpus = MediaCorpus.objects.get(public_id=public_id)
-        MediaCorpusRelatedFormSet = inlineformset_factory(MediaCorpus, MediaCorpusRelated, form=MediaCorpusRelatedForm)
+    def related_edit(self, request, type, public_id, template):
+        self.setup(type)
+        resource = self.model.objects.get(code=public_id)
+        ResourceRelatedFormSet = inlineformset_factory(self.model, self.related, form=self.related_form)
         if request.method == 'POST':
-            formset = MediaCorpusRelatedFormSet(data=request.POST, files=request.FILES, instance=corpus)
+            formset = ResourceRelatedFormSet(data=request.POST, files=request.FILES, instance=resource)
             if formset.is_valid():
                 formset.save()
-                corpus.set_revision(request.user)
-                return HttpResponseRedirect('/archives/corpus/'+public_id)
+                resource.set_revision(request.user)
+                return HttpResponseRedirect('/archives/'+self.type+'/'+public_id)
         else:
-            formset = MediaCorpusRelatedFormSet(instance=corpus)
+            formset = ResourceRelatedFormSet(instance=resource)
+        return render(request, template, {'resource': resource, 'type': type, 'formset': formset,})
 
-        return render(request, template, {'corpus': corpus, 'formset': formset,})