]> git.parisson.com Git - teleforma.git/commitdiff
WIP notelemeta
authorYoan Le Clanche <yoanl@pilotsystems.net>
Fri, 26 Jun 2020 07:30:58 +0000 (09:30 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 17 Nov 2021 14:00:00 +0000 (15:00 +0100)
93 files changed:
.gitignore
teleforma/admin.py
teleforma/exam/templates/exam/script_detail2.html [new file with mode: 0644]
teleforma/fields.py
teleforma/forms.py
teleforma/management/commands/teleforma-reset-all-passwords-with-mail-ae.py
teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py
teleforma/models/ae.py
teleforma/models/core.py
teleforma/models/crfpa.py
teleforma/models/pro.py
teleforma/models/profile.py [new file with mode: 0644]
teleforma/static/teleforma/css/base.css [new file with mode: 0644]
teleforma/static/teleforma/css/jquery.autocomplete.css [new file with mode: 0644]
teleforma/static/teleforma/css/player.css [new file with mode: 0644]
teleforma/static/teleforma/css/search_bg.png [new file with mode: 0644]
teleforma/static/teleforma/css/teleforma.css
teleforma/static/teleforma/css/teleforma_ie.css [new file with mode: 0644]
teleforma/static/teleforma/css/teleforma_ie6.css [new file with mode: 0644]
teleforma/static/teleforma/images/add.png [new file with mode: 0644]
teleforma/static/teleforma/images/add_playlist_marker.png [new file with mode: 0644]
teleforma/static/teleforma/images/add_to_playlist.png [new file with mode: 0644]
teleforma/static/teleforma/images/asc.png [new file with mode: 0644]
teleforma/static/teleforma/images/cancel.png [new file with mode: 0644]
teleforma/static/teleforma/images/copy_page.png [new file with mode: 0644]
teleforma/static/teleforma/images/csv.png [new file with mode: 0644]
teleforma/static/teleforma/images/del_marker.png [new file with mode: 0644]
teleforma/static/teleforma/images/delete copy.png [new file with mode: 0644]
teleforma/static/teleforma/images/delete.png [new file with mode: 0644]
teleforma/static/teleforma/images/desc.png [new file with mode: 0644]
teleforma/static/teleforma/images/dublin_core.png [new file with mode: 0644]
teleforma/static/teleforma/images/edit_marker.png [new file with mode: 0644]
teleforma/static/teleforma/images/edit_page.png [new file with mode: 0644]
teleforma/static/teleforma/images/filter.png [new file with mode: 0644]
teleforma/static/teleforma/images/find.png [new file with mode: 0644]
teleforma/static/teleforma/images/grid_bg.png [new file with mode: 0644]
teleforma/static/teleforma/images/item_title.png [new file with mode: 0644]
teleforma/static/teleforma/images/marker_tiny.png [new file with mode: 0644]
teleforma/static/teleforma/images/media-record.png [new file with mode: 0644]
teleforma/static/teleforma/images/module_playlist.png [new file with mode: 0644]
teleforma/static/teleforma/images/module_world.png [new file with mode: 0644]
teleforma/static/teleforma/images/more.png [new file with mode: 0644]
teleforma/static/teleforma/images/next.png [new file with mode: 0644]
teleforma/static/teleforma/images/ok.png [new file with mode: 0644]
teleforma/static/teleforma/images/password.png [new file with mode: 0644]
teleforma/static/teleforma/images/playlist.png [new file with mode: 0644]
teleforma/static/teleforma/images/previous.png [new file with mode: 0644]
teleforma/static/teleforma/images/save.png [new file with mode: 0644]
teleforma/static/teleforma/images/search_wh2.png [new file with mode: 0644]
teleforma/static/teleforma/images/tw_hd.png [new file with mode: 0644]
teleforma/static/teleforma/images/vox.png [new file with mode: 0644]
teleforma/static/teleforma/images/vox_wh.png [new file with mode: 0644]
teleforma/static/teleforma/js/application.js
teleforma/templates/404.html
teleforma/templates/500.html
teleforma/templates/postman/base.html
teleforma/templates/postman/email_user.txt
teleforma/templates/postman/email_user_init.txt
teleforma/templates/teleforma/base.html
teleforma/templates/teleforma/course_conference.html
teleforma/templates/teleforma/course_conference_audio.html
teleforma/templates/teleforma/course_conference_record.html
teleforma/templates/teleforma/course_document.html
teleforma/templates/teleforma/course_media.html
teleforma/templates/teleforma/courses.html
teleforma/templates/teleforma/help.html
teleforma/templates/teleforma/home.html [new file with mode: 0644]
teleforma/templates/teleforma/inc/chat_room.html
teleforma/templates/teleforma/inc/conference_list.html
teleforma/templates/teleforma/inc/document_list.html
teleforma/templates/teleforma/inc/media_list.html
teleforma/templates/teleforma/inc/module_searches.html [new file with mode: 0644]
teleforma/templates/teleforma/inc/user_list.html [new file with mode: 0644]
teleforma/templates/teleforma/lists.html [new file with mode: 0644]
teleforma/templates/teleforma/login.html [new file with mode: 0644]
teleforma/templates/teleforma/profile_detail.html [new file with mode: 0644]
teleforma/templates/teleforma/search_criteria.html [new file with mode: 0644]
teleforma/templates/teleforma/users.html [new file with mode: 0644]
teleforma/templates/telemeta/base.html [deleted file]
teleforma/templates/telemeta/home.html [deleted file]
teleforma/templates/telemeta/inc/module_revisions.html [deleted file]
teleforma/templates/telemeta/inc/module_searches.html [deleted file]
teleforma/templates/telemeta/inc/module_user_revisions.html [deleted file]
teleforma/templates/telemeta/inc/user_list.html [deleted file]
teleforma/templates/telemeta/lists.html [deleted file]
teleforma/templates/telemeta/login.html [deleted file]
teleforma/templates/telemeta/profile_detail.html [deleted file]
teleforma/templates/telemeta/search_criteria.html [deleted file]
teleforma/templates/telemeta/users.html [deleted file]
teleforma/templatetags/teleforma_tags.py
teleforma/urls.py
teleforma/views/__init__.py
teleforma/views/profile.py [new file with mode: 0644]

index 067a5a4bc5f77e579c25bf5487398bd5f9646217..c03fbb27115de539dea05c327b9e2e7fc6d45f02 100644 (file)
@@ -15,6 +15,7 @@ develop-eggs
 .installed.cfg
 .directory
 *.e4p
+select2-4.0.5
 
 # Installer logs
 pip-log.txt
index acbc97c8583b0ac32cedb5e9bab3cbde106024c8..f230f4836aefb2e4f48c5de170a067898a723a9c 100644 (file)
@@ -141,10 +141,14 @@ class DocumentAdmin(admin.ModelAdmin):
     search_fields = ['title', 'course__title', 'course__code']
     list_filter = ('period', 'date_added')
 
+class MediaTranscodedInline(admin.TabularInline):
+    model = MediaTranscoded
+
 class MediaAdmin(admin.ModelAdmin):
     exclude = ['readers']
     search_fields = ['id', 'title', 'course__title', 'course__code']
     list_filter = ('period', 'date_added')
+    inlines = [MediaTranscodedInline]
 
 class ConferenceAdmin(admin.ModelAdmin):
     exclude = ['readers', 'keywords']
diff --git a/teleforma/exam/templates/exam/script_detail2.html b/teleforma/exam/templates/exam/script_detail2.html
new file mode 100644 (file)
index 0000000..2adc193
--- /dev/null
@@ -0,0 +1,149 @@
+{% extends "teleforma/course_detail.html" %}
+{% load teleforma_tags %}
+{% load i18n %}
+{% load static %}
+{% load webviewer %}
+{% load thumbnail %}
+
+{% block extra_javascript %}
+  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
+  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
+  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
+  <script src="/static/exam/js/exam.js"></script>
+  <!--<script src='{% static "WebViewer/lib/html5/external/jquery-3.2.1.min.js" %}'></script>-->
+  <script src='{% static "WebViewer/lib/WebViewer.min.js" %}'></script>
+  <script>
+    // increase the default animation speed to exaggerate the effect
+  {% if script.comments %}
+    $(window).ready(function(){
+      $( "#dialog_comments" ).dialog( "open");
+    });
+  {% endif %}
+    </script>
+
+
+{% endblock extra_javascript %}
+
+{% block content %}
+
+{% block course %}
+<div class="course">
+
+<div class="course_title">
+
+    <a href="{% url teleforma-desk-period-course period.id script.course.id %}">{{ script.title }}</a>
+
+    <div style="float: right; font-size: 0.9em;">
+        {% if topic.file %}
+        <a id="topic" href="{% url teleforma-document-download topic.id %}" class="component_icon button icon_download">&nbsp;{% trans "Topic" %}</a>
+        {% endif %}
+        {% if script.score %}
+        <a id="score" href="#" class="component_icon button icon_ok"> {% trans "Score" %} : {{ script.score|floatformat }}/20</a>
+        <a id="opener_comments" href="#" class="component_icon button icon_ok"> {% trans "Comments" %}</a>
+        <a id="opener_print" href="#" class="component_icon button icon_download"> {% trans "Imprimer" %}</a>
+        {% elif script.status == 0 %}
+        <a href="#" class="component_icon button icon_delete">{% trans "Rejected" %}</a>
+        {% else %}
+         {% if user.quotas.all %}
+                <a id="opener_mark" href="#" class="component_icon button icon_edit"> {% trans "Scoring" %}</a>
+                <a id="opener_reject" href="#" class="component_icon button icon_delete"> {% trans "Reject" %}</a>
+         {% else %}
+                <a href="#" class="component_icon button icon_ok"> {% trans "Submitted" %}</a>
+         {% endif %}
+        {% endif %}
+
+    </div>
+
+</div>
+
+<div id="dialog_comments" title="{% trans "Comments" %}" style="width: 400px;">
+ {{ script.comments }}
+</div>
+
+<div id="dialog_mark" title="{% trans "Mark" %}" style="width: 400px;">
+    <form method="post" id="_MarkForm" 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 not field.html_name in mark_fields %}
+            <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
+        {% else %}
+                {% if field.html_name == 'score' %}
+             <td>{{ field.label_tag }}:</td><td> {{ field }}/20 <br />(utilisez la virgule pour les décimales)</td>
+            {% else %}
+             <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+                {% endif %}
+
+        {% endif %}
+        </tr>
+       {% endfor %}
+       </table>
+    </form>
+    <br />
+    <center>
+    <a href="#" id="validate_button" class="component_icon button icon_ok">{% trans "Send" %}</a>
+    </center>
+    <br /><br />
+</div>
+
+<div id="dialog_reject" title="{% trans "Reject" %}">
+<form method="post" id="_RejectForm" 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 not field.html_name in reject_fields %}
+            <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>
+    </form>
+    <br />
+    <center>
+     <a href="#" id="reject_button" class="component_icon button icon_delete">{% trans "Reject" %}</a>
+    </center>
+    <br /><br />
+</div>
+
+<div id="dialog_print" title="{% trans "Help" %}" style="width: 800px;">
+ <h2>Impression de la copie corrigée</h2>
+   Pour imprimer votre copie corrigée avec les annotations, veuillez :
+   <ul>
+       <li>Téléchager votre copie à l'aide du boutton "flêche vers le bas" du menu au dessus de la copie (Download annotated PDF)</li>
+       <li>Ouvir le fichier PDF obtenu avec <a href="https://get.adobe.com/fr/reader/">Acrobat Reader</a></li>
+       <li>Imprimer le document avec l'option "Document et annotations" comme expliqué <a href="https://helpx.adobe.com/fr/acrobat/kb/print-comments-acrobat-reader.html">ici</a></li>
+   </ul>
+</div>
+
+{% if access_error %}
+  <p>{{ access_error }}</p>
+  <p>{{ message }}</p>
+
+{% else %}
+<br /><br />
+<div class="media">
+ <div class="script">
+  {% if script.has_annotations_file %}
+    <iframe id="box-iframe" style="position:fixed; top:12%; left:0px; bottom:0px; right:0px; width:100%; height:85%; border:none; margin:0; padding:0; z-index:0;" src="{% if user.quotas.all or user.is_superuser %}{{ script_service_url }}$
+    </iframe>
+  {% else %}
+    {% webviewer url=script.unquoted_url uuid=script.uuid %}
+  {% endif %}
+ </div>
+</div>
+
+{% block general_info %}
+{% endblock general_info %}
+
+{% endif %}
+
+</div>
+{% endblock course %}
+{% endblock content %}
+
+
index 24a94eb83fd898f91adcaba2816aa7c145c0adf9..0c662d85b8bc3971a6ed3dc3e0ffb2a4b27b3528 100644 (file)
@@ -2,6 +2,17 @@
 import django.db.models as models
 from django.forms import ModelForm, TextInput, Textarea
 from south.modelsinspector import add_introspection_rules
+from django.core.exceptions import ValidationError
+from django.core import exceptions
+from django import forms
+import datetime
+from django.utils.translation import ugettext_lazy as _
+import re
+
+try:
+    from django.contrib.auth import get_user_model  # Django 1.5
+except ImportError:
+    from postman.future_1_5 import get_user_model
 
 
 class ShortTextField(models.TextField):
@@ -12,4 +23,156 @@ class ShortTextField(models.TextField):
          )
          return super(ShortTextField, self).formfield(**kwargs)
 
-add_introspection_rules([], ["^teleforma\.fields\.ShortTextField"])
\ No newline at end of file
+add_introspection_rules([], ["^teleforma\.fields\.ShortTextField"])
+
+
+
+
+
+class Duration(object):
+    """Represent a time duration"""
+    def __init__(self, *args, **kwargs):
+        if len(args) and isinstance(args[0], datetime.timedelta):
+            self._delta = datetime.timedelta(days=args[0].days, seconds=args[0].seconds)
+        else:
+            self._delta = datetime.timedelta(*args, **kwargs)
+
+    def __decorate(self, method, other):
+        if isinstance(other, Duration):
+            res = method(other._delta)
+        else:
+            res = method(other)
+        if type(res) == datetime.timedelta:
+            return Duration(res)
+
+        return res
+
+    def __add__(self, other):
+        return self.__decorate(self._delta.__add__, other)
+
+    def __nonzero__(self):
+        return self._delta.__nonzero__()
+
+    def __str__(self):
+        hours   = self._delta.days * 24 + self._delta.seconds / 3600
+        minutes = (self._delta.seconds % 3600) / 60
+        seconds = self._delta.seconds % 60
+
+        return "%.2d:%.2d:%.2d" % (hours, minutes, seconds)
+
+    @staticmethod
+    def fromstr(str):
+        if not str:
+            return Duration()
+
+        test = re.match('^([0-9]+)(?::([0-9]+)(?::([0-9]+))?)?$', str)
+        if test:
+            groups = test.groups()
+            try:
+                hours = minutes = seconds = 0
+                if groups[0]:
+                    hours = int(groups[0])
+                    if groups[1]:
+                        minutes = int(groups[1])
+                        if groups[2]:
+                            seconds = int(groups[2])
+
+                return Duration(hours=hours, minutes=minutes, seconds=seconds)
+            except TypeError:
+                print groups
+                raise
+        else:
+            raise ValueError("Malformed duration string: " + str)
+
+    def as_seconds(self):
+        return self._delta.days * 24 * 3600 + self._delta.seconds
+
+
+def normalize_field(args, default_value=None):
+    """Normalize field constructor arguments, so that the field is marked blank=True
+       and has a default value by default.
+
+       This behaviour can be disabled by passing the special argument required=True.
+
+       The default value can also be overriden with the default=value argument.
+       """
+    required = False
+    if args.has_key('required'):
+        required = args['required']
+        args.pop('required')
+
+    args['blank'] = not required
+
+    if not required:
+        if not args.has_key('default'):
+            if args.get('null'):
+                args['default'] = None
+            elif default_value is not None:
+                args['default'] = default_value
+
+    return args
+
+
+# The following is based on Django TimeField
+class DurationField(models.Field):
+    """Duration Django model field. Essentially the same as a TimeField, but
+    with values over 24h allowed.
+
+    The constructor arguments are also normalized with normalize_field().
+    """
+
+    description = _("Duration")
+
+    __metaclass__ = models.SubfieldBase
+
+    default_error_messages = {
+        'invalid': _('Enter a valid duration in HH:MM[:ss] format.'),
+    }
+
+    def __init__(self, *args, **kwargs):
+        super(DurationField, self).__init__(*args, **normalize_field(kwargs, '0'))
+
+    def db_type(self):
+        return 'int'
+
+    def to_python(self, value):
+        if value is None:
+            return None
+        if isinstance(value, int) or isinstance(value, long):
+            return Duration(seconds=value)
+        if isinstance(value, datetime.time):
+            return Duration(hours=value.hour, minutes=value.minute, seconds=value.second)
+        if isinstance(value, datetime.datetime):
+            # Not usually a good idea to pass in a datetime here (it loses
+            # information), but this can be a side-effect of interacting with a
+            # database backend (e.g. Oracle), so we'll be accommodating.
+            return self.to_python(value.time())
+        else:
+            value = str(value)
+        try:
+            return Duration.fromstr(value)
+        except ValueError:
+            raise exceptions.ValidationError(self.error_messages['invalid'])
+
+    def get_prep_value(self, value):
+        return self.to_python(value)
+
+    def get_db_prep_value(self, value, connection=None, prepared=False):
+        # Casts times into the format expected by the backend
+        try:
+            return value.as_seconds()
+        except:
+            return value
+
+    def value_to_string(self, obj):
+        val = self._get_val_from_obj(obj)
+        if val is None:
+            data = ''
+        else:
+            data = unicode(val)
+        return data
+
+    def formfield(self, **kwargs):
+        defaults = {'form_class': forms.CharField}
+        defaults.update(kwargs)
+        return super(DurationField, self).formfield(**defaults)
index 5333366aba5c690525862ceecda7955287dd7951..cf53b531030d8dd4defa75d20ec23006997dfe6c 100644 (file)
@@ -1,21 +1,23 @@
 
 from django.forms import ModelForm, HiddenInput
 from teleforma.models import *
-from django.forms.models import inlineformset_factory
+from django.forms import ModelForm
+from django.utils.translation import ugettext_lazy as _
 
+from teleforma.models.profile import UserProfile
 
 class ConferenceForm(ModelForm):
-
     class Meta:
         model = Conference
 
-
 class QuestionForm(ModelForm):
-
     class Meta:
         model = Question
         # exclude = ['user', 'question', 'status', 'validated', 'date_submitted']
 
+class UserProfileForm(ModelForm):
+    class Meta:
+        model = UserProfile
 
 class AnswerForm(ModelForm):
 
index b7930fd7f62d21dc0f56b253638f3d597130ef4c..5eaca1144552f14cb19cbbe5b08f4b903ae038a8 100644 (file)
@@ -23,7 +23,7 @@ class Command(BaseCommand):
 
     def init_password_email(self, user):
         site = Site.objects.get_current()
-        ctx_dict = {'site': site, 'organization': settings.TELEMETA_ORGANIZATION, 'usr': user}
+        ctx_dict = {'site': site, 'organization': settings.TELEFORMA_ORGANIZATION, 'usr': user}
         subject = render_to_string(self.subject_template, ctx_dict)
         subject = ''.join(subject.splitlines())
         message = render_to_string(self.message_template, ctx_dict)
index d0437343cec47fa866a763f025b4c92e5328fdb4..73773adbbcd1bda6a1fe34db58b1d31d97970670 100644 (file)
@@ -23,7 +23,7 @@ class Command(BaseCommand):
 
     def init_password_email(self, user):
         site = Site.objects.get_current()
-        ctx_dict = {'site': site, 'organization': settings.TELEMETA_ORGANIZATION, 'usr': user}
+        ctx_dict = {'site': site, 'organization': settings.TELEFORMA_ORGANIZATION, 'usr': user}
         subject = render_to_string(self.subject_template, ctx_dict)
         subject = ''.join(subject.splitlines())
         message = render_to_string(self.message_template, ctx_dict)
index 48b92baade77d6ab3f7300b164932cc206338d6c..024056789eb1914a2fb28dfb8aafe8f08acf7ffe 100644 (file)
@@ -36,7 +36,6 @@
 
 import django.db.models as models
 from django.utils.translation import ugettext_lazy as _
-from telemeta.models.core import *
 from teleforma.models.core import *
 
 
index f90aadd42c1badcb55741e087c78c6c5ea61ff00..921e53edc82c8dcf5c8993fc7179ebb0d61d01ff 100755 (executable)
@@ -47,7 +47,6 @@ from unidecode import unidecode
 
 from django.conf import settings
 from django.db.models import *
-from telemeta.models import *
 from teleforma.fields import *
 import django.db.models as models
 from django.utils.translation import ugettext_lazy as _
@@ -72,6 +71,9 @@ from jxmlease import XMLListNode, XMLDictNode
 
 from teleforma.bbb_utils import bbb, register_web_hook
 
+# TODO notelemeta : delete after data migration
+# from telemeta.models.media import MediaItem
+
 app_label = 'teleforma'
 
 
@@ -86,6 +88,9 @@ server_choices = [('icecast', 'icecast'), ('stream-m', 'stream-m')]
 streaming_choices = [('mp3', 'mp3'), ('ogg', 'ogg'), ('webm', 'webm'), ('mp4', 'mp4')]
 mimetypes.add_type('video/webm','.webm')
 
+ITEM_TRANSODING_STATUS = ((0, _('broken')), (1, _('pending')), (2, _('processing')),
+                         (3, _('done')), (5, _('ready')))
+
 STATUS_CHOICES = (
         (1, _('Private')),
         (2, _('Draft')),
@@ -475,8 +480,45 @@ class Document(MediaBase):
 
 
 
+
+class MediaTranscoded(Model):
+    "Item file transcoded"
+
+    element_type = 'transcoded item'
+
+    item            = models.ForeignKey('Media', related_name="transcoded", verbose_name=_('item'))
+    mimetype        = models.CharField(_('mime_type'), max_length=255, blank=True)
+    date_added      = DateTimeField(_('date'), auto_now_add=True)
+    status          = models.IntegerField(_('status'), choices=ITEM_TRANSODING_STATUS, default=1)
+    file            = models.FileField(_('file'), upload_to='items/%Y/%m/%d', max_length=1024, blank=True)
+
+    @property
+    def mime_type(self):
+        if not self.mimetype:
+            if self.file:
+                if os.path.exists(self.file.path):
+                    self.mimetype = mimetypes.guess_type(self.file.path)[0]
+                    self.save()
+                    return self.mimetype
+                else:
+                    return 'none'
+            else:
+                return 'none'
+        else:
+            return self.mimetype
+
+    def __unicode__(self):
+        if self.item.title:
+            return self.item.title + ' - ' + self.mime_type
+        else:
+            return self.item.public_id + ' - ' + self.mime_type
+
+    class Meta(MetaCore):
+        db_table = app_label + '_media_transcoded'
+
+
 class Media(MediaBase):
-    "Describe a media resource linked to a conference and a telemeta item"
+    "Describe a media resource linked to a conference"
 
     element_type = 'media'
 
@@ -488,12 +530,12 @@ class Media(MediaBase):
                                  blank=True, null=True)
     period          = ForeignKey('Period', related_name='media', verbose_name=_('period'),
                                  null=True, blank=True, on_delete=models.SET_NULL)
-    item            = ForeignKey(MediaItem, related_name='media',
-                                 verbose_name='item', blank=True, null=True)
     type            = CharField(_('type'), choices=streaming_choices, max_length=32)
     rank            = IntegerField(_('rank'), blank=True, null=True)
     readers         = ManyToManyField(User, related_name="media", verbose_name=_('readers'),
                                         blank=True, null=True)
+    file            = models.FileField(_('file'), upload_to='items/%Y/%m/%d', max_length=1024, null=True, blank=False)
+    poster_file     = models.FileField(_('poster file'), upload_to='items/%Y/%m/%d', max_length=255, null=True, blank=False)
 
     def set_mime_type(self):
         if self.item.file:
index 0b6eeb2bdb5465267212d221c9f05ad76a5d8049..1c9f1175cc041774b04e1c86c3896800d4666860 100644 (file)
@@ -36,7 +36,6 @@
 
 import django.db.models as models
 from django.utils.translation import ugettext_lazy as _
-from telemeta.models.core import *
 from teleforma.models.core import *
 
 
index a10b403e6b5233bdab06dc422cf8e1da8f552ea1..c1860252e5c68590d4a12e094eabcd5881248aa5 100644 (file)
@@ -38,7 +38,6 @@ import os
 from django.conf import settings
 import django.db.models as models
 from django.utils.translation import ugettext_lazy as _
-from telemeta.models.core import *
 from teleforma.models.core import *
 from forms_builder.forms.models import Form
 from mezzanine.core.managers import DisplayableManager
diff --git a/teleforma/models/profile.py b/teleforma/models/profile.py
new file mode 100644 (file)
index 0000000..501e4d0
--- /dev/null
@@ -0,0 +1,20 @@
+from django.db import models
+from django.contrib.auth.models import User
+from teleforma.models.core import MetaCore
+from django.utils.translation import ugettext_lazy as _
+
+class UserProfile(models.Model):
+    "User profile extension"
+
+    user            = models.ForeignKey(User, unique=True, related_name="profile")
+    institution     = models.CharField(_('Institution'))
+    department      = models.CharField(_('Department'))
+    attachment      = models.CharField(_('Attachment'))
+    function        = models.CharField(_('Function'))
+    address         = models.TextField(_('Address'))
+    telephone       = models.CharField(_('Telephone'))
+    expiration_date = models.DateField(_('Expiration_date'))
+
+    class Meta(MetaCore):
+        db_table = 'profiles'
+        permissions = (("can_not_view_users_and_profiles", "Cannot view other users and any profile"),)
diff --git a/teleforma/static/teleforma/css/base.css b/teleforma/static/teleforma/css/base.css
new file mode 100644 (file)
index 0000000..b2b5181
--- /dev/null
@@ -0,0 +1,1263 @@
+body {margin: 0; padding: 0;}
+a {text-decoration: none; color: #969696;}
+a img {border: none;}
+html, input, select, textarea, h1, h2, h3, h4, h5, h6 {
+    font-size: 100%;
+}
+body {
+    font: 0.8125em/1em Verdana, sans-serif;
+    line-height: 1.3em;
+    color: #333;
+    background: #FFF;
+    margin: 0em;
+}
+
+/*a:link, a:visited {
+    color: #BB0000;
+    text-decoration:none;
+}
+a:link:hover, a:visited:hover {
+    background-color: transparent;
+    color: #BB0000;
+    text-decoration: underline;
+}*/
+a, a:visited {
+    color: #BB0000;
+    text-decoration:none;
+}
+a:hover {
+    background-color: transparent;
+    color: #BB0000;
+    text-decoration: underline;
+}
+
+a img { border: none; }
+
+.rst-content h1 {
+    font-size: 1.2em;
+    font-weight: bold;
+    color: #353535;
+}
+.nett {
+    clear: both;
+    height: 5px;
+}
+
+.wazing {
+    clear: both;
+    position: relative;
+}
+
+/* Min-width */
+#layout {
+    min-width: 740px;
+}
+
+#content {
+    /*margin-top: 1em;*/
+    margin-bottom: 0em;
+}
+
+#content {
+    position: relative;
+    margin-left: 2em;
+    margin-right: 2em;
+}
+
+
+#content ul, #content ul ul, #content ol {
+    list-style: square;
+    padding: .7em;
+    padding-left: 2em;
+    font-size: 0.8em;
+    clear: both;
+}
+#content ul ul {
+    font-size: 1.1em;
+    padding-left: 0;
+}
+#content li {
+    padding: .2em;
+    padding-left: 0;
+}
+#content li a {
+    padding: .1em 0;
+}
+#content h1 {
+    color: #6a0307;
+    font-weight: bold;
+    display:  inline;
+    font-size: 120%;
+}
+#content h3 {
+    color: #6a0307;
+    font-weight: bold;
+    display:  inline;
+}
+
+#content h2 {
+    color: #6a0307;
+}
+
+#logo a, #logo a:hover { border: none; background: transparent; }
+
+#header {
+    padding: 0em;
+/*     background: url("../images/waves.png") 100% 0% no-repeat; */
+}
+
+#content_header, #header{
+    margin-bottom: .8em;
+}
+
+#content_header{
+    width:100%;
+    border-collapse:collapse;
+}
+
+#content_header td{
+    vertical-align: top;
+}
+
+#content_header td.rightcol{
+    text-align:right;
+    white-space:nowrap; /**this implies to stretach righcol to accomodate all the width,
+                        UNLESS there is a div.fixedWidthAsPlayer inside td.rightcol (see blow)*/
+}
+
+#content_header td.rightcol div.fixedWidthAsPlayer{
+    width:374px; /*must be width+2*padding, see #rightcol below*/
+    float:right;
+    white-space:normal; /*to override no-wrap defined in #content_header td.rightcol*/
+}
+
+#content_header td.rightcol div.fixedWidthAsPlayer a{
+    display:inline-block;
+    margin-top:0.5ex;
+}
+
+#rightcol {
+    width: 362px; /**if u change this, change also width #content_header td.rightcol, see above*/
+    padding: 6px; /**if u change this, change also width #content_header td.rightcol, see above*/
+    position: relative;
+    z-index: 1;
+    float: right;
+    border: 1px solid #999;
+    background-color: #eee;
+    -moz-border-radius: 8px 8px 8px 8px;
+    -webkit-border-radius: 8px 8px 8px 8px;
+    border-radius: 8px 8px 8px 8px;
+}
+
+#rightcol .analyzer, #rightcol .exporter, .markers {
+    text-align: left;
+    position: relative;
+}
+
+#rightcol form {
+    width: 360px;
+    margin-top: 5px;
+    background-color: #fff;
+    border: 1px solid #adadad;
+}
+
+#rightcol p {
+    margin: 0;
+    padding: 0;
+}
+
+#collection_player {
+    background: transparent;
+    /*     background-image: url(../images/grid_bg.png); */
+}
+
+#collection_player .title {
+    padding: 2px 5px 7px 5px;
+}
+
+
+.exporter {
+    background-color: #fff;
+    border: 1px solid #adadad;
+    padding: 2px;
+    height: 26px;
+    margin: 5px 0 0;
+    font-size: 0.9em;
+    color: #000;
+    font-weight: bold;
+}
+
+.analyzer, .markers {
+    background-color: #fff;
+    color: #000;
+    border: 1px solid #adadad;
+    width: 356px;
+    padding: 2px;
+    /* margin: 5px 0 0; */
+    font-size: 1em;
+}
+
+.markers {
+    max-height: 500px;
+    overflow-y: scroll;
+}
+
+.vscroll {
+    max-height: 300px;
+    overflow-y: scroll;
+    width: 100%;
+}
+
+
+.analyzer-title {
+    background-color: #f2f2f2;
+    color: #000;
+    padding: 2px;
+}
+
+.analyzer-line {
+    background-color: #fdfdfd;
+    color: #000;
+    padding: 4px;
+}
+
+/* Geographic navigator */
+ul.continents, ul.continents ul { list-style: none; margin: 0; padding: 0;}
+ul.continents { margin: 1em 0; }
+ul.continents ul {margin-left: 0; margin-bottom: 0.9em; padding: 0 1em 1em 0;}
+ul.continents li.name { width: 460px; float: left; clear: left; margin-right: 30px;}
+ul.continents li.odd { clear: none;}
+ul.continents li.name b { font-size: 120%; font-weight: bold; }
+ul.continents ul li { display: inline; padding-right: 2em;}
+ul.continents ul li a { line-height: 1.8em; }
+
+/* Collection */
+#content .intro {
+    font-size: 1em;
+    font-weight: bold;
+    color: #444;
+    margin: 5px 0;
+    font-size: 0.8em;
+}
+#content .intro span {
+    padding: 3px;
+
+}
+
+/* Forms */
+input, textarea, select { margin: 2px }
+input, select { vertical-align: middle }
+input[type=button], input[type=submit], input[type=reset] {
+    background: #f2f2f2;
+    color: #444;
+    border: 3px double #ccc;
+    padding: .1em .5em;
+    font-weight: bold;
+    cursor: pointer;
+}
+input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
+    background: #8D8C94;
+    color: #fff;
+}
+input[type=button][disabled], input[type=submit][disabled],
+input[type=reset][disabled] {
+    background: #f6f6f6;
+    border-style: solid;
+    color: #999;
+}
+input[type=text], input[type=password], input.textwidget, textarea { border: 1px solid #ccc; }
+input[type=text], input[type=password], input.textwidget { padding: .25em .1em }
+input[type=text]:focus, input[type=password]:focus, input.textwidget:focus, textarea:focus {
+    border-color: #aaa;
+}
+option { border-bottom: 1px dotted #d7d7d7; }
+fieldset { border: 1px solid #d7d7d7; padding: .5em; margin: 0 }
+fieldset.iefix { background: transparent; border: none; padding: 0; margin: 0 }
+* html fieldset.iefix { width: 98% }
+fieldset.iefix p { margin: 0 }
+legend { color: #999; padding: 0 .25em; font-size: 90%; font-weight: bold }
+label.disabled { color: #d7d7d7 }
+.buttons { margin: .5em .5em .5em 0 }
+.buttons form, .buttons form div { display: inline }
+.buttons input { margin: 1em .5em .1em 0 }
+.inlinebuttons input {
+    font-size: 70%;
+    border-width: 1px;
+    border-style: dotted;
+    margin: 0;
+    padding: 0.1em;
+    background: none;
+}
+
+/* Quick search */
+#quick_search {
+    position: absolute;
+    top: 1.7em;
+    left: 35%;
+    background-color: #6a0307;
+    padding: 0.3em 0em 0.3em 0.3em;
+    -moz-border-radius: 8px 8px 8px 8px;
+    -webkit-border-radius: 8px 8px 8px 8px;
+    border-radius: 8px 8px 8px 8px;
+}
+#quick_search form {
+    float: left;
+    margin-right: 12px;
+}
+#quick_search p {
+    margin-top: .3em;
+    clear: left;
+}
+
+#quick_search a {
+    font-size: .8em;
+    font-weight: bold;
+    vertical-align: middle;
+}
+
+#quick_search input {
+    vertical-align: middle;
+    font-size: .8em;
+    margin-right: 0;
+    -moz-border-radius: 5px 5px 5px 5px;
+    -webkit-border-radius: 5px 5px 5px 5px;
+    border-radius: 5px 5px 5px 5px;
+}
+#quick_search_pattern {
+    background: #FFF url(search_bg.png) no-repeat;
+    padding: .4em .1em;
+    padding-left: 25px;
+    width: 180px;
+    color: #555;
+    font-weight: bold;
+}
+
+/* Authentication */
+#auth_info {
+    color: #FFF;
+    font-weight: bold;
+    position: absolute;
+    top: 1.5em;
+    right: 1.1em;
+    margin-right: 1em;
+    font-size: 0.9em;
+    background-color: #6a0307;
+    padding: 1em;
+    -moz-border-radius: 8px 8px 8px 8px;
+    -webkit-border-radius: 8px 8px 8px 8px;
+    border-radius: 8px 8px 8px 8px;
+}
+
+#auth_info a {
+    color: #FFF;
+    font-size: 1em;
+    font-weight: bold;
+}
+
+form.login {
+    font-size: 0.8em;
+    float: left;
+    margin-top: 2em;
+    margin-bottom: 4em;
+    padding: .5em;
+    border: 1px dotted #888;
+}
+
+.login-error {
+    color: #BB0000;
+}
+
+form.login label {
+    display: block;
+    width: 11em;
+    float: left;
+    clear: left;
+    font-weight: bold;
+    padding-top: 0.3em;
+}
+
+form.login .submit {
+    float: right;
+    margin-top: 1em;
+}
+
+/* Search form */
+#searchform {
+    margin: 15px 0;
+}
+#searchform fieldset {
+    padding: 0;
+    padding: .5em;
+    width: 650px;
+    border: none;
+    border: 1px solid #6a0307;
+    margin-bottom: 1em;
+    -moz-border-radius: 8px 8px 8px 8px;
+    -webkit-border-radius: 8px 8px 8px 8px;
+    border-radius: 8px 8px 8px 8px;
+}
+#searchform p {
+    background-color: #fff;
+    padding: .5em 0;
+}
+#searchform label {
+    font-size: 0.8em;
+    display: block;
+    float: left;
+    width: 30%;
+    margin-left: 15px;
+    margin-top: .2em;
+    line-height: 1.8em;
+    font-weight: bold;
+    color: #333;
+    text-transform: uppercase;
+}
+#searchform select {
+    width: 59%;
+}
+#searchform fieldset input {
+    width: 56%;
+}
+#searchform select, #searchform fieldset input {
+    font-size: 0.8em;
+}
+#searchform .submit {
+    padding: 0;
+    clear: both;
+    width: 450px;
+}
+
+#searchform select.tiny {
+    width: 12%;
+}
+
+/* Main navigation bar  (borrowed from Trac) */
+#menu {
+    background-color: #6a0307 ;
+    font: normal verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
+    border-top: .25em solid #6a0307;
+    padding-left:26px;
+}
+
+#menu a, #menu a:visited{
+    display:inline-block;
+    color: #fff;
+    text-decoration:none;
+    border-bottom-width:.5em;
+    border-bottom-style: solid;
+    background-color: #6a0307;
+    -webkit-border-top-left-radius:5px 5px;
+    moz-border-radius-topleft: 5px 5px;
+    border-top-left-radius: 5px 5px;
+    -webkit-border-top-right-radius:5px 5px;
+    moz-border-radius-topright: 5px 5px;
+    border-top-right-radius: 5px 5px;
+    font-weight: bold;
+    font-size: 14px;
+    padding: .5em 1em;
+}
+#menu a:hover, #menu a.active{
+    background-color: #FFF;
+    color: #6a0307;
+}
+
+#menu .darkblue { border-bottom-color: #0f3179; }
+#menu .blue { border-bottom-color:  #4f628a; }
+#menu .green { border-bottom-color:  #92b220; }
+#menu .yellow { border-bottom-color:  #f3ad17; }
+#menu .orange { border-bottom-color:  #e65911; }
+#menu .darkgreen { border-bottom-color:  #006a12; }
+#menu .black { border-bottom-color:  #000000; }
+#menu .red { border-bottom-color:  #DD0000; }
+#menu .violet { border-bottom-color:  #A00020; }
+#menu .origin { border-bottom-color: #6a0307; }
+
+* html #menu :link, * html #menu :visited { background-position: 1px 0 }
+
+
+/* Drop Down Menus */
+.clear {clear:both}
+
+#nav {
+    margin:0;
+    padding:0;
+    list-style:none;
+}
+
+/* make the LI display inline */
+/* it's position relative so that position absolute */
+/* can be used in submenu */
+
+#nav li {
+display:inline-block;
+position:relative;
+z-index:500;
+}
+
+/* this is the parent menu */
+#nav li a {
+display:block;
+text-align:center;
+}
+
+/* you can make a different style for default selected value */
+#nav a.selected {
+color:#FFF;
+}
+
+/* submenu, it's hidden by default */
+#nav ul {
+    position:absolute;
+    left:0;
+    display:none;
+    margin:0 0 0 -2px;
+    padding:0;
+    list-style: none outside none;
+    border-left:2px solid #6a0307;
+    border-right:2px solid #6a0307;
+    border-bottom:2px solid #6a0307;
+    background-color: #6a0307;
+    color: #FFF;
+}
+
+#nav ul li {
+    width:100px;
+    float:left;
+    border-bottom:0px solid #fff;
+}
+
+/* display block will make the link fill the whole area of LI */
+#nav ul a {
+    display:block;
+    height:15px;
+    padding: 5px 5px;
+    font-size: 11px;
+    text-align:left;
+    -webkit-border-top-left-radius:0px 0px;
+    moz-border-radius-topleft: 0px 0px;
+    border-top-left-radius: 0px 0px;
+    -webkit-border-top-right-radius:0px 0px;
+    moz-border-radius-topright: 0px 0px;
+    border-top-right-radius: 0px 0px;
+    border-bottom-width: 0px;
+}
+
+#nav ul a:hover {
+    background-color: #FFF ;
+    color: #6a0307 ;
+}
+
+#nav ul a:active {
+    background-color: #FFF;
+    color: #6a0307 ;
+}
+
+
+
+/* Footer (borrowed from Trac) */
+#footer {
+    background: #6a0307;
+    clear: both;
+    color: #FFF;
+    font-size: 10px;
+    border-top: 1px solid;
+    height: 31px;
+    padding: 0.5em 0.5em 1.1em 0.5em;
+    margin-top: 2.5em;
+}
+#footer :link, #footer :visited { color: #FFF; }
+#footer hr { display: none }
+#footer #telemeta_powered { border: 0; float: left }
+#footer #telemeta_powered:hover { background: transparent }
+#footer p { margin: 0; }
+#footer p.left {
+    float: left;
+    margin-left: 1em;
+    padding: 0 1em;
+    border-left: 1px solid #d7d7d7;
+    border-right: 1px solid #d7d7d7;
+}
+#footer p.right {
+    float: right;
+    text-align: right;
+}
+#footer p.center {
+    text-align: center;
+}
+
+/* Homepage */
+.homelinks a { font-size: 120%;}
+
+
+/* Definition list */
+dl {
+    position: relative;
+    margin: .5em 0;
+}
+dl dt, dl dd {
+    position: relative;
+    margin: 0;
+    margin-bottom: .5em;
+    padding: 0;
+    font-size: 0.8em;
+    line-height: 1.4em;
+    min-height: 1.4em;
+}
+dl dd {
+    border: 1px solid transparent;
+}
+dl dt {
+    float: left;
+    clear: left;
+}
+
+dl.listing dt {
+    width: 18em;
+    background-color: #f9f9f9;
+    border: .1em solid #eee;
+    border-right: .3em solid #ddd;
+    padding-left: .3em;
+    margin-right: .8em;
+    color: #444;
+}
+dl.listing dt.group {
+    float: none;
+    margin-top: .9em;
+    background-color: #DDDDDD;
+    border-color: #ccc;
+    border-right: .1em solid #ccc;
+    width: 18.2em;
+}
+dl.listing dd {
+    margin-left: 19.4em;
+    font-weight: bold;
+}
+
+/* dublin core display */
+h4.dublincore {
+    text-align: left;
+    padding: 5px 0 10px;
+    font-weight: bold;
+    color: #666;
+}
+dl.dublincore dt {
+    margin-right: .8em;
+    width: 23em !important;
+    font-style: italic;
+}
+dl.dublincore dd {
+    margin-left: 23.4em;
+    font-weight: bold;
+}
+dl.dublincore dt span {
+    width: 13em;
+    display: block;
+    float: left;
+    font-style: normal;
+    background-color: #f9f9f9;
+    border: 1px solid #eee;
+    border-right: 3px solid #ddd;
+    padding-left: .3em;
+    margin-right: 1.2em;
+    color: #444;
+}
+dl.dublincore .caption {
+    background-color: #B8B7C1;
+    margin: .5em 0;
+    margin-top: 0;
+    border-bottom: 1px dotted #666;
+    padding-top: .4em;
+    padding-bottom: .4em;
+    padding-left: .3em;
+    color: #fff;
+    font-weight: bold;
+    border-right: 1px solid #fff;
+}
+dl.dublincore dt.caption span {
+    background-color: #B8B7C1;
+    border: none;
+    border-right: 1px solid #fff;
+    color: #fff;
+}
+dl.dublincore dd.caption {
+    padding-top: .3em;
+    padding-left: .4em;
+    margin-left: 23.4em;
+}
+
+/* infos item/collection */
+.infos, .extraInfos {
+    margin-bottom: 15px;
+}
+
+.infos dl, .infos table {
+    position: relative;
+    font-size: 105%;
+}
+
+.extraInfos dl, .extraInfos table {
+    position: relative;
+    font-size: 105%;
+}
+
+.extraInfos div {
+    padding: 0;
+    margin-bottom: 5px;
+}
+.extraInfos .nett {
+    position: relative;
+    height: 0;
+    margin-bottom: -5px;
+}
+.extraInfos h4 {
+    /* clear: both; */
+    font-size: 1em;
+    line-height: 1.4em;
+    border-bottom: 1px dotted #aaa;
+    color: #6a0307;
+}
+.with-rightcol .extraInfos h4 {
+    margin-right: 395px;
+}
+
+.extraInfos h4 a {
+    position: relative;
+    display: block;
+    color: #6a0307 !important;
+    text-decoration: none;
+    margin: 0;
+    background: #fff url(../images/more.png) no-repeat left top;
+    background-position: 0 -16px;
+    padding-bottom: 2px;
+    padding-left: 16px;
+    border-bottom: none !important;
+    outline: none;
+}
+.extraInfos h4 a:hover {
+    background-color: transparent;
+    border-bottom: none;
+    color: #6a0307 !important;
+    text-decoration:none;
+}
+.extraInfos .folded h4 {
+    border-bottom: none;
+}
+.extraInfos .folded h4 a {
+    background-position: 0 1px;
+}
+
+/* Pagination */
+.pagination {
+    margin-top: .7em;
+    margin-bottom: .3em;
+    padding: .3em 0;
+    font-size: 1em;
+    background-color: #fff;
+    border-bottom: 1px solid #aaa;
+    color: #333;
+    font-weight: bold;
+}
+.pagination a {
+    background-color: #fff;
+    border-bottom: none;
+    font-size: 1em;
+    padding: .3em;
+}
+
+/* Item instruments */
+div.instruments {
+    position: relative;
+    margin-left: -.7em;
+    margin-right: .5em;
+}
+table.instruments {
+    border: none;
+    border-collapse: separate;
+    /* width: 100%; */
+    border-spacing: .7em;
+}
+table.instruments td {
+    font-size: .8em;
+    padding: 0 .2em;
+}
+table.instruments thead td {
+    background-color: #F9F9F9;
+    border: .1em solid #E1E1E1;
+    border-bottom: .3em solid #E1E1E1;
+}
+table.instruments tbody td {
+    border-bottom: .1em solid #E1E1E1;
+}
+
+/* Styles for tabular listings (stolen from trac) */
+table.listing {
+
+    border-spacing: 0;
+}
+
+.fullpage table.listing {
+    width: 100%;
+    font-size: 105%;
+}
+
+table.listing th {
+    text-align: left;
+    padding: 0 14em .1em 0;
+    font-size: 1em;
+}
+table.listing th, table.listing td {
+    font-size: 0.8em;
+    border-bottom: 1px solid #dfdfdf;
+}
+table.listing thead { background: #e8eaf0 }
+table.listing thead th {
+    font-size: 0.9em;
+    padding: 3px .5em 3px;
+}
+table.listing thead th :link:hover, table.listing thead th :visited:hover {
+    background-color: transparent;
+}
+/*conflicts with buttons inside table*/
+/*table.listing a {
+    border: none;
+}*/
+table.listing thead th a {
+    padding-right: 12px;
+}
+table.listing th.asc a, table.listing th.desc a { font-weight: bold }
+table.listing th.asc a, table.listing th.desc a {
+    background-position: 100% 50%;
+    background-repeat: no-repeat;
+}
+table.listing th.asc a { background-image: url(../images/asc.png) }
+table.listing th.desc a { background-image: url(../images/desc.png) }
+table.listing tbody td, table.listing tbody th {
+    padding: .33em .5em;
+    vertical-align: top;
+    font-weight: normal;
+}
+table.listing tbody td {
+    font-weight: bold;
+}
+table.listing tbody td.tmp {
+    width: 100%;
+}
+table.listing tbody td a:hover, table.listing tbody th a:hover {
+    background-color: transparent;
+}
+table.listing tbody tr { border-top: 1px solid #ddd }
+table.listing tbody tr.even { background-color: #fcfcfc }
+table.listing tbody tr.odd { background-color: #f7f7f7 }
+table.listing tbody tr:hover { background: #f7f8fa !important }
+
+table td.error {
+    color: red;
+    font-weight: bold;
+}
+
+.infos li.error{
+    color: red;
+    font-weight: bold;
+    font-size: 110%;
+}
+
+.gmap {
+    border: solid 1px #888;
+    margin-top: 0.8em;
+}
+
+.rst-content {
+    padding-top: 5px;
+}
+
+.rst-content h1 {
+    color: #6a0307;
+}
+
+.rst-content img.align-left {
+    float: left;
+    margin-right: 2ex;
+    margin-top: 0.6ex;
+    margin-bottom: 0.5ex;
+}
+
+.rst-content img.align-right {
+    float: left;
+    margin-left: 2ex;
+    margin-top: 0.6ex;
+    margin-bottom: 0.5ex;
+}
+
+img.align-left {
+    float: left;
+    padding-bottom: 1ex;
+    padding-right: 1ex;
+}
+
+#content .rst-content ul,  #content .rst-content ol {
+    clear: none;
+    font-size: 1em;
+    margin-left: 0.4em;
+}
+
+#module-set {
+    float: right;
+    clear: right;
+}
+
+#module-set .module {
+    border: 1px solid #000;
+    background-image: url(../images/grid_bg.png);
+    padding: 0.2em;
+    margin: 0 0 1.5em 1.5em;
+    -moz-border-radius: 8px 0px 11px 11px;
+    -webkit-border-radius: 8px 0px 11px 11px;
+    border-radius: 11px 0px 11px 11px;
+}
+
+#module-set .module h3 {
+    color: #FFF;
+    font-size: 1.1em;
+    font-weight: bold;
+}
+
+#module-set .module a:hover {
+    text-decoration: none;
+}
+
+#module-set .module div {
+        -moz-border-radius: 8px 0px 8px 8px;
+        -webkit-border-radius: 8px 0px 8px 8px;
+        border-radius: 8px 0px 8px 8px;
+       }
+
+#module-set .module img {
+        -moz-border-radius: 8px 0px 8px 8px;
+        -webkit-border-radius: 8px 0px 8px 8px;
+        border-radius: 8px 0px 8px 8px;
+       }
+
+#module-set .module ul, li {
+        -moz-border-radius: 8px 0px 8px 8px;
+        -webkit-border-radius: 8px 0px 8px 8px;
+        border-radius: 8px 0px 8px 8px;
+       }
+
+a.image-link {
+    border: none;
+}
+
+.map-thumbnail {
+    border: solid 1px #999;
+}
+
+.home-content .module {
+    width: 400px;
+}
+
+.home-description {
+    padding-right: 33%;
+    display: block;
+}
+
+#content ul.playlist {
+    list-style-type: none;
+    border-top: solid 1px #e1e1e1;
+    margin: 0;
+    padding: 0;
+}
+
+#content ul.playlist li {
+    display: block;
+    border: solid 1px #e1e1e1;
+    border-top: 0;
+    background: white;
+    margin: 0;
+    padding: 1em;
+}
+
+
+.tab_unselected, .tab_unselected:hover, .tab_unselected:visited {
+    background-color: #cccccc;
+    font-weight: normal;
+    color: #333333;
+    border: 1px solid #cccccc;
+
+}
+.tab_selected, .tab_selected:hover, .tab_selected:visited {
+    background-color: #ffffff;
+    color: #000000;
+    font-weight: bold;
+    border-top: 1px solid #999999;
+    border-right: 1px solid #999999;
+    border-left: 1px solid #999999;
+    border-bottom: 1px solid #ffffff;
+
+}
+
+.tab, .tab:hover, .tab:visited{
+    margin-top: 1ex;
+    display: inline-block;
+    margin-left: 0px;
+    padding: 1ex;
+    -moz-border-radius: 1ex 1ex 0ex 0ex;  -webkit-border-radius: 1ex 1ex 0ex 0ex;  border-radius: 1ex 1ex 0ex 0ex;
+}
+
+.roundBorder4{
+    /*padding: 0.3em 0.8em 0.8em 0.8em;
+    margin: 0 0 1.5em 1.5em;*/
+
+    -moz-border-radius: 4px 4px 4px 4px;
+    -webkit-border-radius: 4px 4px 4px 4px;
+    border-radius: 4px 4px 4px 4px;
+}
+.roundBorder6{
+    /*padding: 0.3em 0.8em 0.8em 0.8em;
+    margin: 0 0 1.5em 1.5em;*/
+
+    -moz-border-radius: 6px 6px 6px 6px;
+    -webkit-border-radius: 6px 6px 6px 6px;
+    border-radius: 6px 6px 6px 6px;
+}
+.roundBorder8{
+    /*padding: 0.3em 0.8em 0.8em 0.8em;
+    margin: 0 0 1.5em 1.5em;*/
+
+    -moz-border-radius: 8px 8px 8px 8px;
+    -webkit-border-radius: 8px 8px 8px 8px;
+    border-radius: 8px 8px 8px 8px;
+}
+.roundBorder10{
+    /*padding: 0.3em 0.8em 0.8em 0.8em;
+    margin: 0 0 1.5em 1.5em;*/
+
+    -moz-border-radius: 10px 10px 10px 10px;
+    -webkit-border-radius:  10px 10px 10px 10px;
+    border-radius:  10px 10px 10px 10px;
+}
+
+.markersdivUneditable{
+    border: 0px !important;
+}
+
+.markerdiv div{
+    padding:0.7ex 1ex;
+}
+.markerdiv div[zero_top_padding]{ /*mathces any div with the attribute zero_top_padding set (whatever the value)*/
+                                  padding-top:0px;
+}
+.markerdiv div *{
+    vertical-align:middle;
+    font-family: sans-serif;
+}
+.markerdiv div input, .markerdiv div textarea{
+    margin:0px;
+    padding:2px;
+}
+.markerdiv .ts-marker{
+    background-image: url('../images/marker_tiny.png'); text-align: center; min-width:3ex;
+}
+.markerdiv .ts-marker, .markerdiv .markersdivOffset, .markerdiv .markersdivTitle, .markerdiv .markersdivAddPlaylist, .markerdiv .markersdivEdit{margin-right:.8ex;}
+.markerdiv div a, .markerdiv div a:visited, .markerdiv div a:hover{
+    display: inline-block; /*otherwise width and height do not work*/
+    background-repeat: no-repeat;
+    text-decoration: none;
+
+}
+.markerdiv .markersdivOffset, .markerdiv .markersdivOffset:hover, .markerdiv .markersdivOffset:visited{
+    color: #000;
+}
+.markerdiv .ts-marker, .markerdiv .ts-marker:hover, .markerdiv .ts-marker:visited{
+    font-family: monospace; background: #e65911;color: #FFF;padding-left: .3ex; padding-right:.3ex;
+}
+.markersdivDelete{    background-image: url('../images/del_marker.png');width:15px;height:2ex;background-repeat: no-repeat;}
+/*backfround-repeat is redundant with .markerDiv a,.. defined above but this way .markersDivDelete is re-usable in other context (eg popupdiv*/
+.markersdivAddPlaylist{    background-image: url('../images/add_playlist_marker.png');width:13px;height:2ex; }
+.markersdivTitle{    font-weight:bold;}
+.markersdivEdit, .markersdivEdit:hover, .markersdivEdit:visited{
+    line-height: normal;
+    color:#000;
+    background-position: -2px center;
+    padding-left: 13px; padding-right: 2px;
+    font-size: 65%;
+    border:2px solid #666;
+    background-color: #fff;
+    background-image: url('../images/edit_marker.png');
+    -moz-border-radius: 1ex; -webkit-border-radius: 1ex; border-radius: 1ex;
+}
+.markersdivSave, .markersdivSave:hover, .markersdivSave:visited{
+    background-color: #087714;
+    color: #fff;
+    font-weight: bold;
+    padding:.7ex; padding-left: 20px;
+    background-position: 5px center;
+    -moz-border-radius: 1ex;-webkit-border-radius: 1ex;border-radius: 1ex;
+    background-image: url('../images/ok.png');
+}
+.markerdiv{
+    border: 1px solid #aaaaaa;
+    margin-bottom: 1ex;
+    -moz-border-radius: 1e;
+    -webkit-border-radius: 1ex;
+    border-radius: 1ex;
+}
+
+/*----------------------------------*/
+.component, .component_icon, .component:hover, .component_icon:hover, .component:visited, .component_icon:visited{
+    background-position: 1ex .5ex;
+    -moz-border-radius: 1ex 1ex 1ex 1ex;
+    -webkit-border-radius: 1ex 1ex 1ex 1ex;
+    border-radius: 1ex 1ex 1ex 1ex;
+    padding:.7ex .7ex .7ex .7ex;
+    background-color:  #f9f9f9; /*#626262;*/
+    color:#444;
+    text-decoration: none;
+    margin:0;
+}
+.component + .component, .component + .component_icon, .component_icon + .component ,
+.component_icon + .component_icon{
+    margin-left: .1ex;
+}
+
+.component_icon, .component_icon:hover, .component_icon:visited{
+    background-repeat: no-repeat;
+    background-position: 1ex .5ex;
+    padding:4px 8px 4px 26px; /*top right bottom left - last value depends on the icon size (default=16)*/
+}
+
+.button,  .button:visited, .button:hover{
+    font-weight: bold;
+    border:  1px solid #e1e1e1;
+    white-space:nowrap;
+    /*    border-top:  1px solid #e1e1e1 !important;
+        border-left:  1px solid #e1e1e1 !important;
+        border-right:  1px solid #e1e1e1 !important;
+        border-bottom:  1px solid #e1e1e1 !important;*/
+}
+
+.button:hover{
+    border-top:  1px solid #f9f9f9 !important;
+    border-left:  1px solid #f9f9f9 !important;
+    border-bottom:  1px solid #999 !important;
+    border-right:  1px solid #999 !important;
+    background-color:  #f4f4f4; /*#e9e9d9;*/
+    color: #000; /*#6A0307;*/
+}
+
+
+.list_item, .list_item:visited, .list_item:hover{
+    display:block;
+    color:#6A0307;
+}
+
+.list_item:hover{
+    font-weight: bold;
+}
+
+.icon_edit{
+    background-image: url('../images/edit_page.png');
+}
+.icon_copy{
+    background-image: url('../images/copy_page.png');
+}
+.icon_previous{
+    background-image: url('../images/previous.png');
+}
+.icon_next{
+    background-image: url('../images/next.png');
+}
+.icon_dublin_core{
+    background-image: url('../images/dublin_core.png');
+}
+.icon_cancel{
+    background-image: url('../images/cancel.png');
+}
+.icon_save{
+    background-image: url('../images/save.png');
+}
+.icon_add{
+    background-image: url('../images/add.png');
+}
+.icon_add_to_playlist{
+    background-image: url('../images/add_to_playlist.png');
+}
+.icon_login{
+    background-image: url('../images/password.png');
+}
+.icon_search{
+    background-image: url('../images/find.png');
+}
+.icon_ok{
+    background-image: url('../images/ok.png');
+}
+.icon_csv{
+    background-image: url('../images/csv.png');
+}
+.icon_playlist{
+    background-image: url('../images/playlist.png');
+}
+.icon_filter{
+    background-image: url('../images/filter.png');
+}
+.icon_delete{
+    background-image: url('../images/delete.png');
+}
+.icon_rss,.icon_rss:hover{
+    background: url('../images/feed-icon-14x14.png') no-repeat;
+    background-position: 0ex .8ex;
+    padding:.0ex 0ex .8ex .7ex;
+    text-decoration: none;
+}
+
+.addToPlaylist {
+    margin:0.5ex;
+    position: absolute;
+    display:none;
+    left: 0;
+    top: 0;
+}
+
+
+/*focus on elements*/
+a:focus,div:focus{
+    -moz-outline: 1px dotted #999  !important;
+    outline: #999 dotted 1px;  /*!important;*/
+}
+
+.infos input, .infos textarea{
+    outline: none !important;
+    width: 600px;
+}
+
+.related_media {
+    border-top: 1px dotted #6a0307;
+}
+
+
+#chatwindow {
+    min-height: 10em;
+    max-height: 42em;
+    border-bottom: 1px solid;
+    padding: 0.8em;
+    overflow: auto;
+    background-color: white;
+    font-size: 0.8125em;
+    -moz-border-radius: 8px 0px 8px 8px;
+     -webkit-border-radius: 8px 0px 8px 8px;
+     border-radius: 8px 0px 8px 8px;
+}
+
+.msg {
+    font-size: 0.9em;
+    }
+
+.msg input {
+    -moz-border-radius: 8px 8px 8px 8px;
+     -webkit-border-radius: 8px 8px 8px 8px;
+     border-radius: 8px 8px 8px 8px;
+    }
+
+.mod {
+    width: 66%;
+    float: left;
+}
\ No newline at end of file
diff --git a/teleforma/static/teleforma/css/jquery.autocomplete.css b/teleforma/static/teleforma/css/jquery.autocomplete.css
new file mode 100644 (file)
index 0000000..91b6228
--- /dev/null
@@ -0,0 +1,48 @@
+.ac_results {
+       padding: 0px;
+       border: 1px solid black;
+       background-color: white;
+       overflow: hidden;
+       z-index: 99999;
+}
+
+.ac_results ul {
+       width: 100%;
+       list-style-position: outside;
+       list-style: none;
+       padding: 0;
+       margin: 0;
+}
+
+.ac_results li {
+       margin: 0px;
+       padding: 2px 5px;
+       cursor: default;
+       display: block;
+       /* 
+       if width will be 100% horizontal scrollbar will apear 
+       when scroll mode will be used
+       */
+       /*width: 100%;*/
+       font: menu;
+       font-size: 12px;
+       /* 
+       it is very important, if line-height not setted or setted 
+       in relative units scroll will be broken in firefox
+       */
+       line-height: 16px;
+       overflow: hidden;
+}
+
+.ac_loading {
+       background: white url('indicator.gif') right center no-repeat;
+}
+
+.ac_odd {
+       background-color: #eee;
+}
+
+.ac_over {
+       background-color: #0A246A;
+       color: white;
+}
diff --git a/teleforma/static/teleforma/css/player.css b/teleforma/static/teleforma/css/player.css
new file mode 100644 (file)
index 0000000..009155a
--- /dev/null
@@ -0,0 +1,53 @@
+
+#player_maximized .ts-player .ts-wave,  #player_maximized .ts-player .ts-image {
+    height: 170px;
+}
+
+.ts-skin-lab .ts-player .ts-control {
+    background: url('../images/player_controlbg.png');
+}
+
+#player_maximized, #player_minimized {
+    position: relative;
+}
+
+
+#player_maximized .toggle, #player_minimized .toggle {
+    position: relative;
+    display: block;
+    overflow: hidden;
+    float: left;
+    width: 18px;
+    padding: 10px 0 0 0;
+    height: 0px !important;
+    height /**/:10px; /* for IE5/Win only */
+    background-image: url('../images/maximize.png');
+    text-decoration: none;
+    border: none;
+}
+
+#player_maximized .toggle:hover, #player_minimized .toggle:hover {
+    background-position: 0px -10px;
+}
+
+#player_maximized .embed_player_frame, #player_minimized .embed_player_frame {
+    float: right;
+    font-weight: bold;
+    color: #6A0307;
+    text-decoration: none;
+    font-size: 50%;
+    padding-left: 2ex;
+    padding-right: 2ex;
+     position: relative;
+    top: -1px;
+    line-height: 1.5em;
+}
+
+#player_maximized .embed_player_frame:hover, #player_minimized .embed_player_frame:hover {
+    text-decoration: none;
+}
+
+#player_maximized {
+    margin: 10px 0 15px 0;
+    display: none;
+}
\ No newline at end of file
diff --git a/teleforma/static/teleforma/css/search_bg.png b/teleforma/static/teleforma/css/search_bg.png
new file mode 100644 (file)
index 0000000..923ed4c
Binary files /dev/null and b/teleforma/static/teleforma/css/search_bg.png differ
index 7a8053efda813d8d229394f0d5d79547440c93e6..c79c66a6a4e3dafec851956a8490299d143895b6 100644 (file)
@@ -10,7 +10,7 @@ body {
     color: #333;
     background: #FFF;
     margin: 0em;
-    background:no-repeat url(/static/telemeta/images/bg_yt.png) 0 0;
+    background:no-repeat url(/static/teleforma/images/bg_yt.png) 0 0;
     background-color:#ebebeb;
     background-repeat:repeat
 }
@@ -177,6 +177,11 @@ textarea {
 
 #header {
     padding: 0em;
+       background-color: #000000 ;
+    background:no-repeat url(/static/teleforma/images/tw_hd.png) 0 0;
+    background-color:#ebebeb;
+    background-repeat:repeat; 
+       border-top: .25em solid #6a0307;
 /*     background: url("/static/telemeta/images/waves.png") 100% 0% no-repeat; */
 }
 
@@ -331,8 +336,6 @@ input[type=button], input[type=submit], input[type=reset] {
     -moz-border-radius: 8px 0px 8px 8px;
      -webkit-border-radius: 8px 0px 8px 8px;
      border-radius: 8px 0px 8px 8px;
-    }
-
 }
 input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
     background: #8D8C94;
@@ -650,7 +653,7 @@ color:#FFF;
 /* Footer (borrowed from Trac) */
 #footer {
     background: #000000;
-    background:no-repeat url(/static/telemeta/images/tw_hd.png) 0 0;
+    background:no-repeat url(/static/teleforma/images/tw_hd.png) 0 0;
     background-color:#ebebeb;
     background-repeat:repeat;
     clear: both;
@@ -826,7 +829,7 @@ dl.dublincore dd.caption {
     color: #000000 !important;
     text-decoration: none;
     margin: 0;
-    background: transparent url(/static/telemeta/css/more.png) no-repeat left top;
+    background: transparent url(/static/teleforma/images/more.png) no-repeat left top;
     background-position: 0 -16px;
     padding-bottom: 2px;
     padding-left: 16px;
@@ -938,8 +941,8 @@ table.listing th.asc a, table.listing th.desc a {
     background-position: 100% 50%;
     background-repeat: no-repeat;
 }
-table.listing th.asc a { background-image: url(/static/telemeta/images/asc.png) }
-table.listing th.desc a { background-image: url(/static/telemeta/images/desc.png) }
+table.listing th.asc a { background-image: url(/static/teleforma/images/asc.png) }
+table.listing th.desc a { background-image: url(/static/teleforma/images/desc.png) }
 table.listing tbody td, table.listing tbody th {
     padding: .33em .5em;
     vertical-align: top;
@@ -1123,7 +1126,7 @@ a.image-link {
     padding:2px;
 }
 .markerdiv .ts-marker{
-    background-image: url('/static/telemeta/images/marker_tiny.png'); text-align: center; min-width:3ex;
+    background-image: url('/static/teleforma/images/marker_tiny.png'); text-align: center; min-width:3ex;
 }
 .markerdiv .ts-marker, .markerdiv .markersdivOffset, .markerdiv .markersdivTitle, .markerdiv .markersdivAddPlaylist, .markerdiv .markersdivEdit{margin-right:.8ex;}
 .markerdiv div a, .markerdiv div a:visited, .markerdiv div a:hover{
@@ -1138,9 +1141,9 @@ a.image-link {
 .markerdiv .ts-marker, .markerdiv .ts-marker:hover, .markerdiv .ts-marker:visited{
     font-family: monospace; background: #e65911;color: #FFF;padding-left: .3ex; padding-right:.3ex;
 }
-.markersdivDelete{    background-image: url('/static/telemeta/images/del_marker.png');width:15px;height:2ex;background-repeat: no-repeat;}
+.markersdivDelete{    background-image: url('/static/teleforma/images/del_marker.png');width:15px;height:2ex;background-repeat: no-repeat;}
 /*backfround-repeat is redundant with .markerDiv a,.. defined above but this way .markersDivDelete is re-usable in other context (eg popupdiv*/
-.markersdivAddPlaylist{    background-image: url('/static/telemeta/images/add_playlist_marker.png');width:13px;height:2ex; }
+.markersdivAddPlaylist{    background-image: url('/static/teleforma/images/add_playlist_marker.png');width:13px;height:2ex; }
 .markersdivTitle{    font-weight:bold;}
 .markersdivEdit, .markersdivEdit:hover, .markersdivEdit:visited{
     line-height: normal;
@@ -1150,7 +1153,7 @@ a.image-link {
     font-size: 65%;
     border:2px solid #666;
     background-color: #fff;
-    background-image: url('/static/telemeta/images/edit_marker.png');
+    background-image: url('/static/teleforma/images/edit_marker.png');
     -moz-border-radius: 1ex; -webkit-border-radius: 1ex; border-radius: 1ex;
 }
 .markersdivSave, .markersdivSave:hover, .markersdivSave:visited{
@@ -1160,7 +1163,7 @@ a.image-link {
     padding:.7ex; padding-left: 20px;
     background-position: 5px center;
     -moz-border-radius: 1ex;-webkit-border-radius: 1ex;border-radius: 1ex;
-    background-image: url('/static/telemeta/images/ok.png');
+    background-image: url('/static/teleforma/images/ok.png');
 }
 .markerdiv{
     border: 1px solid #aaaaaa;
@@ -1260,52 +1263,52 @@ a.image-link {
 }
 
 .icon_edit{
-    background-image: url('/static/telemeta/images/edit_page.png');
+    background-image: url('/static/teleforma/images/edit_page.png');
 }
 .icon_copy{
-    background-image: url('/static/telemeta/images/copy_page.png');
+    background-image: url('/static/teleforma/images/copy_page.png');
 }
 .icon_previous{
-    background-image: url('/static/telemeta/images/previous.png');
+    background-image: url('/static/teleforma/images/previous.png');
 }
 .icon_next{
-    background-image: url('/static/telemeta/images/next.png');
+    background-image: url('/static/teleforma/images/next.png');
 }
 .icon_dublin_core{
-    background-image: url('/static/telemeta/images/dublin_core.png');
+    background-image: url('/static/teleforma/images/dublin_core.png');
 }
 .icon_cancel{
-    background-image: url('/static/telemeta/images/cancel.png');
+    background-image: url('/static/teleforma/images/cancel.png');
 }
 .icon_save{
-    background-image: url('/static/telemeta/images/save.png');
+    background-image: url('/static/teleforma/images/save.png');
 }
 .icon_add{
-    background-image: url('/static/telemeta/images/add.png');
+    background-image: url('/static/teleforma/images/add.png');
 }
 .icon_add_to_playlist{
-    background-image: url('/static/telemeta/images/add_to_playlist.png');
+    background-image: url('/static/teleforma/images/add_to_playlist.png');
 }
 .icon_login{
-    background-image: url('/static/telemeta/images/password.png');
+    background-image: url('/static/teleforma/images/password.png');
 }
 .icon_search{
-    background-image: url('/static/telemeta/images/find.png');
+    background-image: url('/static/teleforma/images/find.png');
 }
 .icon_ok{
-    background-image: url('/static/telemeta/images/ok.png');
+    background-image: url('/static/teleforma/images/ok.png');
 }
 .icon_csv{
-    background-image: url('/static/telemeta/images/csv.png');
+    background-image: url('/static/teleforma/images/csv.png');
 }
 .icon_playlist{
-    background-image: url('/static/telemeta/images/playlist.png');
+    background-image: url('/static/teleforma/images/playlist.png');
 }
 .icon_filter{
-    background-image: url('/static/telemeta/images/filter.png');
+    background-image: url('/static/teleforma/images/filter.png');
 }
 .icon_delete{
-    background-image: url('/static/telemeta/images/delete.png');
+    background-image: url('/static/teleforma/images/delete.png');
 }
 .icon_download{
     background-image: url('/static/teleforma/images/download_media.png');
@@ -1314,10 +1317,10 @@ a.image-link {
     background-image: url('/static/teleforma/images/tool-animator.png');
 }
 .icon_speaker{
-    background-image: url('/static/telemeta/images/text-speak.png');
+    background-image: url('/static/teleforma/images/text-speak.png');
 }
 .icon_rss,.icon_rss:hover{
-    background: url('/static/telemeta/images/feed-icon-14x14.png') no-repeat;
+    background: url('/static/teleforma/images/feed-icon-14x14.png') no-repeat;
     background-position: 0ex .8ex;
     padding:.0ex 0ex .8ex .7ex;
     text-decoration: none;
@@ -1406,7 +1409,7 @@ input,textarea{
 
 #module-set .module {
     border: 1px solid #000;
-    background: repeat url(/static/telemeta/images/tw_hd.png) 0 0;
+    background: repeat url(/static/teleforma/images/tw_hd.png) 0 0;
     padding: 0.2em;
     margin: 2em 1em 0em 0em;
     -moz-border-radius: 8px 0px 11px 11px;
@@ -1440,7 +1443,7 @@ input,textarea{
 
 #module-set-left .module {
         border: 1px solid #000;
-        background: repeat url(/static/telemeta/images/tw_hd.png) 0 0;
+        background: repeat url(/static/teleforma/images/tw_hd.png) 0 0;
         padding: 0.2em;
         margin: 0em 0em 1.5em 0em;
         -moz-border-radius: 8px 0px 11px 11px;
@@ -1489,7 +1492,183 @@ input,textarea{
 
 #module-set-left .module a {
     display:inline-block;
-    }
+}
+
+#module-set .ui-tabs.ui-widget-content{
+       margin-top: 15px;
+}
+#module-set .ui-tabs.ui-widget-content h3{
+       vertical-align: middle;
+       display: inline-block;
+}
+#module-set .ui-tabs.ui-widget-content h3 img{
+       vertical-align: middle;
+}
+
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav{
+       padding: 0;
+       margin: 0;
+}
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav:after {
+       content: ""; 
+       display: table;
+       clear: both;
+}
+
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav li{
+       display: inline-block;
+       width: 50%;
+       text-align: center;
+       padding: 0;
+       box-sizing: border-box;
+       margin-top: 3px;
+       float:left;
+}
+
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav li a{
+       font-size:1.1em;
+       color: #333;
+       padding: 1em 0;
+       display: block;
+       box-sizing: border-box;
+       float:left;
+       width: 80%;
+       background-color: rgba(255, 255, 255, .2);
+       border-left: 1px solid #000;
+       border-right: 1px solid #666;
+       opacity: 0.5;
+}
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav li a:hover{
+       background-color: rgba(255, 255, 255, .1);
+       opacity: 1;
+}
+
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav li.ui-tabs-active a{
+       background-color: rgba(255, 255, 255, 0);
+       opacity: 1;
+       color: #fff;
+}
+
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav li.ui-tabs-active a+a:hover{
+       background-color: rgba(255, 255, 255, 0.2);
+}
+
+#module-set .ui-tabs.ui-widget-content ul.ui-tabs-nav li a+a{
+       width: 20%;
+}
+#module-set .ui-tabs.ui-widget-content .ui-widget-content{
+       background-color: #FFF;
+       color: #000;
+}
+
+
+
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem{
+       padding: 10px 5px;
+       border-bottom: 1px solid #CCC;
+       margin-bottom: 10px;
+       border-radius: 0;
+}
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem:first-child{
+       padding-top: 20px;
+}
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem:last-child{
+       border-bottom: 0;
+       margin-bottom: 0;
+       padding-bottom: 20px;
+}
+
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem header p{
+       font-size: 0.8125em;
+       margin: 5px 0;
+       line-height: 1.3em;
+}
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem header h3{
+       color: #355ea2;
+       display: block;
+       font-size: 1.05em;
+       display: inline-block;
+       width: 85%;
+       margin: 0;
+}
+
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem header ul.actions{
+       padding: 0;
+       text-align: right;
+       display: inline-block;
+       width: 15%;
+       margin: 0;
+       float: right;
+       position: relative;
+       top: 2px;
+}
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem header ul.actions li{
+       list-style-type: none;
+       display: inline-block;
+       padding: 0;
+       font-size: 1.3em;
+       margin-right: 5px;
+}
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem header ul.actions li+li{
+       margin-right: 0px;
+}
+
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem header ul.actions li img{
+       border-radius: 0;
+       width: 12px;
+       height: 12px;
+}
+
+#module-set .ui-tabs.ui-widget-content .ui-widget-content .newsitem section{
+       font-size: 1.1em;
+       font-size: 0.9em;
+       word-wrap: break-word;
+       -webkit-hyphens: auto;
+  -moz-hyphens: auto;
+  -ms-hyphens: auto;
+  -o-hyphens: auto;
+  hyphens: auto;
+}
+
+#module-set .ui-tabs.ui-widget-content footer{
+       text-align: center;
+       padding: 10px 0;
+       background: repeat url(/static/teleforma/images/tw_hd.png) 0 0;
+}
+
+#module-set .ui-tabs.ui-widget-content footer a{
+       display: inline-block;
+       width: 100%;
+       color: #FFF;
+}
+
+#module-set .ui-tabs.ui-widget-content footer a:hover{
+       text-decoration: underline;
+}
+
+form.add_actus p:after{
+       content: ""; 
+       display: table;
+       clear: both;
+}
+
+form.add_actus label{
+       display: inline-block;
+       font: 1em Verdana, sans-serif;
+    line-height: 1.3em;
+    color: #333;
+       font-weight: bold;
+       min-width: 105px;
+}
+
+form.add_actus label[for="id_text"]{
+       float: left;
+}
+form.add_actus #id_text_parent{
+       float: left;
+       margin-left: 7px;
+}
+
 
 
 .desk_center {
@@ -1538,7 +1717,7 @@ input,textarea{
     -moz-border-radius: 8px 0px 8px 8px;
     -webkit-border-radius: 8px 0px 8px 8px;
     border-radius: 8px 0px 8px 8px;
-    background:no-repeat url(/static/telemeta/images/bg_yt.png) 0 0;
+    background:no-repeat url(/static/teleforma/images/bg_yt.png) 0 0;
     background-color:#ebebeb;
     background-repeat:repeat;
    }
diff --git a/teleforma/static/teleforma/css/teleforma_ie.css b/teleforma/static/teleforma/css/teleforma_ie.css
new file mode 100644 (file)
index 0000000..f9c46d6
--- /dev/null
@@ -0,0 +1,17 @@
+dl.listing, #rightcol {\r
+    margin-top: .4em;\r
+}\r
+dl.listing dd {\r
+    margin-top: .2em;\r
+}\r
+dl dd {\r
+    border-color: #fff;\r
+}\r
+dl.dublincore dd.caption {\r
+    margin-top: -.1em;\r
+}\r
+div.instruments {\r
+    margin-left: -.1em;\r
+    margin-right: .9em;\r
+}\r
+\r
diff --git a/teleforma/static/teleforma/css/teleforma_ie6.css b/teleforma/static/teleforma/css/teleforma_ie6.css
new file mode 100644 (file)
index 0000000..4b3fb5f
--- /dev/null
@@ -0,0 +1,4 @@
+/* Min-width */\r
+/*#submenu h3, #submenu div {\r
+    height: 1.6em;\r
+}*/\r
diff --git a/teleforma/static/teleforma/images/add.png b/teleforma/static/teleforma/images/add.png
new file mode 100644 (file)
index 0000000..fe07994
Binary files /dev/null and b/teleforma/static/teleforma/images/add.png differ
diff --git a/teleforma/static/teleforma/images/add_playlist_marker.png b/teleforma/static/teleforma/images/add_playlist_marker.png
new file mode 100644 (file)
index 0000000..0915815
Binary files /dev/null and b/teleforma/static/teleforma/images/add_playlist_marker.png differ
diff --git a/teleforma/static/teleforma/images/add_to_playlist.png b/teleforma/static/teleforma/images/add_to_playlist.png
new file mode 100644 (file)
index 0000000..8431237
Binary files /dev/null and b/teleforma/static/teleforma/images/add_to_playlist.png differ
diff --git a/teleforma/static/teleforma/images/asc.png b/teleforma/static/teleforma/images/asc.png
new file mode 100644 (file)
index 0000000..486b731
Binary files /dev/null and b/teleforma/static/teleforma/images/asc.png differ
diff --git a/teleforma/static/teleforma/images/cancel.png b/teleforma/static/teleforma/images/cancel.png
new file mode 100644 (file)
index 0000000..0ad2eb2
Binary files /dev/null and b/teleforma/static/teleforma/images/cancel.png differ
diff --git a/teleforma/static/teleforma/images/copy_page.png b/teleforma/static/teleforma/images/copy_page.png
new file mode 100644 (file)
index 0000000..c600e99
Binary files /dev/null and b/teleforma/static/teleforma/images/copy_page.png differ
diff --git a/teleforma/static/teleforma/images/csv.png b/teleforma/static/teleforma/images/csv.png
new file mode 100644 (file)
index 0000000..c901266
Binary files /dev/null and b/teleforma/static/teleforma/images/csv.png differ
diff --git a/teleforma/static/teleforma/images/del_marker.png b/teleforma/static/teleforma/images/del_marker.png
new file mode 100644 (file)
index 0000000..5055a0f
Binary files /dev/null and b/teleforma/static/teleforma/images/del_marker.png differ
diff --git a/teleforma/static/teleforma/images/delete copy.png b/teleforma/static/teleforma/images/delete copy.png
new file mode 100644 (file)
index 0000000..5a3c05d
Binary files /dev/null and b/teleforma/static/teleforma/images/delete copy.png differ
diff --git a/teleforma/static/teleforma/images/delete.png b/teleforma/static/teleforma/images/delete.png
new file mode 100644 (file)
index 0000000..5a3c05d
Binary files /dev/null and b/teleforma/static/teleforma/images/delete.png differ
diff --git a/teleforma/static/teleforma/images/desc.png b/teleforma/static/teleforma/images/desc.png
new file mode 100644 (file)
index 0000000..2070185
Binary files /dev/null and b/teleforma/static/teleforma/images/desc.png differ
diff --git a/teleforma/static/teleforma/images/dublin_core.png b/teleforma/static/teleforma/images/dublin_core.png
new file mode 100644 (file)
index 0000000..d53e56e
Binary files /dev/null and b/teleforma/static/teleforma/images/dublin_core.png differ
diff --git a/teleforma/static/teleforma/images/edit_marker.png b/teleforma/static/teleforma/images/edit_marker.png
new file mode 100644 (file)
index 0000000..277a900
Binary files /dev/null and b/teleforma/static/teleforma/images/edit_marker.png differ
diff --git a/teleforma/static/teleforma/images/edit_page.png b/teleforma/static/teleforma/images/edit_page.png
new file mode 100644 (file)
index 0000000..98713ac
Binary files /dev/null and b/teleforma/static/teleforma/images/edit_page.png differ
diff --git a/teleforma/static/teleforma/images/filter.png b/teleforma/static/teleforma/images/filter.png
new file mode 100644 (file)
index 0000000..9cabc5a
Binary files /dev/null and b/teleforma/static/teleforma/images/filter.png differ
diff --git a/teleforma/static/teleforma/images/find.png b/teleforma/static/teleforma/images/find.png
new file mode 100644 (file)
index 0000000..943e00b
Binary files /dev/null and b/teleforma/static/teleforma/images/find.png differ
diff --git a/teleforma/static/teleforma/images/grid_bg.png b/teleforma/static/teleforma/images/grid_bg.png
new file mode 100644 (file)
index 0000000..c7760f5
Binary files /dev/null and b/teleforma/static/teleforma/images/grid_bg.png differ
diff --git a/teleforma/static/teleforma/images/item_title.png b/teleforma/static/teleforma/images/item_title.png
new file mode 100644 (file)
index 0000000..6afd789
Binary files /dev/null and b/teleforma/static/teleforma/images/item_title.png differ
diff --git a/teleforma/static/teleforma/images/marker_tiny.png b/teleforma/static/teleforma/images/marker_tiny.png
new file mode 100644 (file)
index 0000000..925ec14
Binary files /dev/null and b/teleforma/static/teleforma/images/marker_tiny.png differ
diff --git a/teleforma/static/teleforma/images/media-record.png b/teleforma/static/teleforma/images/media-record.png
new file mode 100644 (file)
index 0000000..1dc4efd
Binary files /dev/null and b/teleforma/static/teleforma/images/media-record.png differ
diff --git a/teleforma/static/teleforma/images/module_playlist.png b/teleforma/static/teleforma/images/module_playlist.png
new file mode 100644 (file)
index 0000000..e92f614
Binary files /dev/null and b/teleforma/static/teleforma/images/module_playlist.png differ
diff --git a/teleforma/static/teleforma/images/module_world.png b/teleforma/static/teleforma/images/module_world.png
new file mode 100644 (file)
index 0000000..c1c699d
Binary files /dev/null and b/teleforma/static/teleforma/images/module_world.png differ
diff --git a/teleforma/static/teleforma/images/more.png b/teleforma/static/teleforma/images/more.png
new file mode 100644 (file)
index 0000000..3954eea
Binary files /dev/null and b/teleforma/static/teleforma/images/more.png differ
diff --git a/teleforma/static/teleforma/images/next.png b/teleforma/static/teleforma/images/next.png
new file mode 100644 (file)
index 0000000..e9cbecd
Binary files /dev/null and b/teleforma/static/teleforma/images/next.png differ
diff --git a/teleforma/static/teleforma/images/ok.png b/teleforma/static/teleforma/images/ok.png
new file mode 100644 (file)
index 0000000..543710f
Binary files /dev/null and b/teleforma/static/teleforma/images/ok.png differ
diff --git a/teleforma/static/teleforma/images/password.png b/teleforma/static/teleforma/images/password.png
new file mode 100644 (file)
index 0000000..192b6f7
Binary files /dev/null and b/teleforma/static/teleforma/images/password.png differ
diff --git a/teleforma/static/teleforma/images/playlist.png b/teleforma/static/teleforma/images/playlist.png
new file mode 100644 (file)
index 0000000..7330bc5
Binary files /dev/null and b/teleforma/static/teleforma/images/playlist.png differ
diff --git a/teleforma/static/teleforma/images/previous.png b/teleforma/static/teleforma/images/previous.png
new file mode 100644 (file)
index 0000000..52fa887
Binary files /dev/null and b/teleforma/static/teleforma/images/previous.png differ
diff --git a/teleforma/static/teleforma/images/save.png b/teleforma/static/teleforma/images/save.png
new file mode 100644 (file)
index 0000000..afc8725
Binary files /dev/null and b/teleforma/static/teleforma/images/save.png differ
diff --git a/teleforma/static/teleforma/images/search_wh2.png b/teleforma/static/teleforma/images/search_wh2.png
new file mode 100644 (file)
index 0000000..054af8d
Binary files /dev/null and b/teleforma/static/teleforma/images/search_wh2.png differ
diff --git a/teleforma/static/teleforma/images/tw_hd.png b/teleforma/static/teleforma/images/tw_hd.png
new file mode 100644 (file)
index 0000000..788068a
Binary files /dev/null and b/teleforma/static/teleforma/images/tw_hd.png differ
diff --git a/teleforma/static/teleforma/images/vox.png b/teleforma/static/teleforma/images/vox.png
new file mode 100644 (file)
index 0000000..604e4ce
Binary files /dev/null and b/teleforma/static/teleforma/images/vox.png differ
diff --git a/teleforma/static/teleforma/images/vox_wh.png b/teleforma/static/teleforma/images/vox_wh.png
new file mode 100644 (file)
index 0000000..e8de2da
Binary files /dev/null and b/teleforma/static/teleforma/images/vox_wh.png differ
index 1764c307eb2593689dcea6735f54f81a6c6a0d94..81668290cc334beb310a529b04429553236a1e7a 100644 (file)
@@ -96,4 +96,251 @@ function getCookie(name) {
                 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
         }
         return null;
-}
\ No newline at end of file
+}
+
+/*
+ * Copyright (C) 2007-2012 Guillaume Pellerin, Parisson
+ * Copyright (c) 2011 Riccardo Zaccarelli <riccardo.zaccarelli@gmail.com>
+ * Copyright (c) 2010 Olivier Guilyardi <olivier@samalyse.com>
+ *
+ * This file is part of TimeSide.
+ *
+ * TimeSide is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * TimeSide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with TimeSide.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors: Riccardo Zaccarelli <riccardo.zaccarelli@gmail.com>
+ *          Olivier Guilyardi <olivier@samalyse.com>
+ */
+
+/**
+ * Class for telemeta global functions.
+ * Note that the dollar sign is a reserved keyword in some browsers
+ * (see http://davidwalsh.name/dollar-functions)
+ * which might be in conflict with jQuery dollar sign.
+ */
+
+//returns the full path of the current url location removing the last slash '/' followed by one or more '#', if any
+function urlNormalized(){
+    var sPath = window.location.href;
+    sPath = sPath.replace(/\/#*$/,"");
+    return sPath;
+}
+/**
+ *sets up few stuff when the page is ready (see functions below it)
+ */
+jQuery(document).ready(function() {
+    foldInfoBlocks();
+    setSelectedMenu();
+});
+
+/**
+ *function inherited from old code, never touched. Guess fixes the click on the left data table, if any
+ */
+function foldInfoBlocks() {
+    var $J = jQuery;
+    var extra = $J('.extraInfos');
+    extra.find('.folded dl, .folded table').css('display', 'none');
+    extra.find('h4').click(function() {
+        $J(this).parents('.extraInfos').children().toggleClass('folded').find('dl, table').toggle(100);
+        //toggle toggles the visibility of elements
+        return false;
+    });
+}
+
+/**
+ * Global telemeta function which sets the current selected menu according to the current url
+ */
+function setSelectedMenu(){
+    var $J = jQuery;
+    var menus = $J('#menu a');
+    //build collections/items from http:/site/collections/items,
+    //being http:/site/ = window.location.origin
+    
+    //function for normalizing paths (removes last n occurrences of the slash)
+    var normalize = function(str){
+        return str.replace(/\/+#*$/,"");
+    }
+    
+    var host = window.location.host;
+    var protocol = window.location.protocol
+    var href = normalize(window.location.href);
+     
+    if(!(host) || !(protocol) || !(href)){
+        return;
+    }
+
+    //var pageOrigin = normalize(window.location.origin); //does not exist in FF, so:
+    var pageOrigin = normalize(protocol+"//"+host);
+    var pageHref = normalize(href);
+
+    menus.each(function(){
+        ///if we are at home, the window location href corresponds to window location origin,
+        //so we select only links whose link points EXACTLY to the origin (home link)
+        var linkHref = normalize(this.href);
+        var elm = $J(this);
+
+        if(linkHref.indexOf("#") != -1){
+            var reg = new RegExp("[#]+", "g");
+            var baseHref = linkHref.split(reg);
+            linkHref = pageOrigin + "/" + baseHref[1]
+        }
+
+        if(pageOrigin===pageHref){
+            if(pageHref == linkHref){
+                elm.addClass('active');
+            }else{
+                elm.removeClass('active');
+            }
+        }else{
+            //here, on the other hand, we select if a link points to a page or super page
+            //of the current page
+            if(linkHref!=pageOrigin && pageHref.match("^"+linkHref+".*")){
+                elm.addClass('active');
+            }else{
+                elm.removeClass('active');
+            }
+        }
+        
+    })
+}
+
+
+
+
+/*****************************************************************************
+ * json(param, method, onSuccesFcn(data, textStatus, jqXHR), onErrorFcn(jqXHR, textStatus, errorThrown))
+ * global function to senbd/retrieve data with the server
+ *
+ * param: the data to be sent or retrieved.
+ *   param will be converted to string, escaping quotes newlines and backslashes if necessary.
+ *   param can be a javascript string, boolean, number, dictionary and array.
+ *       If dictionary or array, it must contain only the above mentioned recognized types.
+ *       So, eg, {[" a string"]} is fine, {[/asd/]} not
+ *
+ * method: the json method, eg "telemeta.update_marker". See base.py
+ *
+ * onSuccesFcn(data, textStatus, jqXHR) OPTIONAL --IF MISSING, NOTHING HAPPENS --
+ *    A function to be called if the request succeeds with the same syntax of jQuery's ajax onSuccess function.
+ *    The function gets passed three arguments
+ *       The data returned from the server, formatted according to the dataType parameter;
+ *       a string describing the status;
+ *       and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object
+ *
+ * onErrorFcn(jqXHR, textStatus, errorThrown) OPTIONAL. --IF MISSING, THE DEFAULT ERROR DIALOG IS SHOWN--
+ *     A function to be called if the request fails with the same syntax of jQuery ajax onError function..
+ *     The function receives three arguments:
+ *       The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object,
+ *       a string describing the type of error that occurred and
+ *       an optional exception object, if one occurred.
+ *       Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror".
+ * ****************************************************************************/
+
+var json = function(param,method,onSuccessFcn,onErrorFcn){
+    //this function converts a javascript object to a string
+    var toString_ = function(string){
+        if(typeof string == "string"){
+            //escapes newlines quotes and backslashes
+            string = string.replace(/\\/g,"\\\\")
+            .replace(/\n/g,"\\n")
+            .replace(/"/g,"\\\"");
+        }
+        var array; //used for arrays and objects (see below)
+        if(typeof string == "boolean" || typeof string== "number" || typeof string == "string"){
+            string = '"'+string+'"';
+        }else if(string instanceof Array){
+            array = [];
+            for(var i = 0;i <string.length ; i++){
+                array.push(toString_(string[i])); //recursive invocation
+            }
+            string='[';
+            string+=array.join(",");
+            string+=']';
+        }else{
+            array = [];
+            for(var k in string){
+                array.push(toString_(k)+":"+toString_(string[k])); //recursive invocation
+            }
+            string='{';
+            string+=array.join(",");
+            string+='}';
+        }
+        return string;
+    };
+    
+    //creating the string to send. 
+    var param2string = toString_(param);
+    var data2send = '{"id":"jsonrpc", "params":';
+    data2send+=param2string;
+    data2send+=', "method":"'
+    data2send+=method;
+    data2send+='","jsonrpc":"1.0"}';
+    
+    var $J = jQuery;
+    $J.ajax({
+        type: "POST",
+        url: 'json/',
+        contentType: "application/json",
+        data: data2send,
+        dataType: "json",
+        success: function(data, textStatus, jqXHR){
+            if(onSuccessFcn){
+                onSuccessFcn(data, textStatus, jqXHR);
+            }
+        },
+        error: function(jqXHR, textStatus, errorThrown){
+            if(onErrorFcn){
+                onErrorFcn(jqXHR, textStatus, errorThrown);
+                return;
+            }
+            //default:
+            var details = "\n(no further info available)";
+            if(jqXHR) {
+                details="\nThe server responded witha status of "+jqXHR.status+" ("+
+                jqXHR.statusText+")\n\nDetails (request responseText):\n"+jqXHR.responseText;
+            }
+            alert("ERROR: Failed to save"+details);
+            
+        }
+    });
+
+};
+
+/**
+ * function for writing to the console. Catches errors, if any (eg, console == undefined) and does nothing in case
+ */
+function consolelog(text){
+    if(typeof console != 'undefined'){
+        var c = console;
+        if (c.log) {
+            c.log(text);
+        }
+    }
+}
+
+// Drop down menus
+
+$(document).ready(function () {
+     
+    $('#nav li').hover(
+        function () {
+            //show its submenu
+            $('ul', this).slideDown(200);
+        },
+        function () {
+            //hide its submenu
+            $('ul', this).slideUp(100);        
+        }
+    );
+     
+});
index 1ee335d6107f1cba3f36fab875d45077013cda2e..484e021b56e17f273aae499d0c9c8e7d9d48f717 100644 (file)
@@ -1,13 +1,12 @@
-{% extends "telemeta/base.html" %}
+{% extends "teleforma/base.html" %}
 {% load teleforma_tags %}
-{% load telemeta_utils %}
 {% load i18n %}
 
 
 {% block content %}
 
 <div style="margin-top: 4em; margin-bottom: 4em;">
-{% trans "Page not found" %}
+    {% trans "Page not found" %}
 </div>
 
-{% endblock content %}
+{% endblock content %}
\ No newline at end of file
index 1260c539652a24b305ce4d8570b6b252a8339040..c22ab591bb77fc03e4d71a307535b872fba93998 100644 (file)
@@ -1,13 +1,12 @@
-{% extends "telemeta/base.html" %}
+{% extends "teleforma/base.html" %}
 {% load teleforma_tags %}
-{% load telemeta_utils %}
 {% load i18n %}
 
 
 {% block content %}
 
 <div style="margin-top: 4em; margin-bottom: 4em;">
-{% trans "Server error" %}
+    {% trans "Server error" %}
 </div>
 
-{% endblock content %}
+{% endblock content %}
\ No newline at end of file
index a79f2a6d4f6b9c7cf707eab1facaf514afe42a14..7dadd869c203d6bce38297940005e1c698914c5f 100644 (file)
@@ -8,7 +8,7 @@
 
 
 <div class="module">
-<h3><img src="{{ STATIC_URL }}telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "Telephone" %}</h3>
+<h3><img src="{{ STATIC_URL }}teleforma/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "Telephone" %}</h3>
 
 <div style="background: white;">
 <ul>
@@ -18,7 +18,7 @@
 </div>
 
 <div class="module">
-<h3><img src="{{ STATIC_URL }}telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "Messaging" %}</h3>
+<h3><img src="{{ STATIC_URL }}teleforma/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "Messaging" %}</h3>
 
 <div style="background: white;">
 {% postman_unread as unread_count %}
index f6ef1a416ae55c08c38d8666c57a763bf949f4ed..b0509afec6088d9ef7ba38faabc922fd154409b4 100644 (file)
@@ -1,4 +1,4 @@
-{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}{% autoescape off %}{% trans "Hello" %} {{ usr.first_name }} {{ usr.last_name }},
+{% load i18n %}{% load teleforma_tags %}{% autoescape off %}{% trans "Hello" %} {{ usr.first_name }} {{ usr.last_name }},
 {% if action == 'rejection' %}
 {% blocktrans with object.sent_at|date:"DATETIME_FORMAT" as date and object.recipient.first_name as first_name and object.recipient.last_name as last_name %}On {{ date }}, you asked to send a message to {{ first_name }} {{ last_name }}.{% endblocktrans %}
 
index 4c9c661e25fab6e9d401dda35235de90254c4c74..92efa3cb50c39e288f0852d5a38be7ce683fa48a 100644 (file)
@@ -1,4 +1,4 @@
-{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}{% autoescape off %}{% trans "Hello" %} {{ usr.first_name }} {{ usr.last_name }},
+{% load i18n %}{% load teleforma_tags %}{% autoescape off %}{% trans "Hello" %} {{ usr.first_name }} {{ usr.last_name }},
 
 Suite à votre inscription à la formation Avocats Etrangers du Pré-Barreau, nous vous invitons à initialiser votre compte sur notre plateforme e-learning interactive et multi-média. Pour cela, merci de cliquer sur le lien suivant puis d'indiquez votre adresse e-mail :
 
index 79b471b4a6704f99b90ded169e69a1af89ec4595..f92d860b5b7a4f80de96d38f8208fc3a63c00a7e 100644 (file)
@@ -1,2 +1,268 @@
-{% extends "telemeta/base.html" %}
+<!DOCTYPE html>
 {% load i18n %}
+{% load teleforma_tags %}
+{% get_googletools as googletools %}
+{%  if googletools %}
+{% load googletools %}
+{% endif %}
+{% 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" />
+  <!--<meta name="Viewport" content="width=device-width" />
+<meta name="Viewport" content="initial-scale=1.0" />
+<meta name="Viewport" content="maximum-scale=1.5" />
+<meta name="Viewport" content="user-scalable=1" />-->
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+  <link rel="icon" href="/static/teleforma/images/favicon.ico" />
+
+  <title>{%block head_title %}{% description %} - TeleForma{% endblock %}</title>
+
+  {% block stylesheets %}
+
+
+  <link rel="stylesheet" type="text/css" href="/static/teleforma/css/base.css" />
+  <link rel="stylesheet" type="text/css" href="/static/teleforma/css/teleforma.css" />
+
+  <!--[if IE]>
+<link rel="stylesheet" type="text/css" href="/static/teleforma/css/teleforma_ie.css" />
+<![endif]-->
+  <!--[if lte IE 6]>
+<link rel="stylesheet"type="text/css" href="/static/teleforma/css/teleforma_ie6.css" />
+<![endif]-->
+  {% endblock %}
+
+  {% block extra_stylesheets %}{% endblock %}
+
+  {% block javascript %}
+  <script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
+  <script src="/static/teleforma/js/jquery-1.6.min.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/jquery-ui.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/jquery.expander.min.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/messi.min.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/rainbowvis.js" type="text/javascript"></script>
+  <script src="/static/jqchat/jqchat.js" type="text/javascript"></script>
+  <!-- <script src="/static/telemeta/js/locale.js" type="text/javascript"></script> -->
+  <script src="/static/teleforma/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 %}
+
+  {% block js-status %}
+  {% get_telecaster as telecaster %}
+  {%  if telecaster %}
+  <script src="/static/telecaster/js/application.js" type="text/javascript"></script>
+  {% endif %}
+  {% endblock js-status %}
+
+  {% endblock %}
+
+  {% block extra_javascript %}{% endblock %}
+</head>
+
+<body>
+  {% block layout %}
+  <div id="layout">
+
+    {% block header %}
+    <div id="header">
+
+
+
+      <div id="menu">
+        <div id="logo_wrapper">
+          <div id="logo">
+            <img src="/static/teleforma/images/logo_pb.png" style="vertical-align:middle" alt="logo" />
+          </div>
+        </div>
+        {% block menu %}
+        {# spaces between li and a elements breaks layout #}
+
+        <ul id="nav">
+
+          {% if user.is_authenticated %}
+
+          {% if periods|length > 1 %}
+          <li><a href="#desk#" class="red">&nbsp;{% trans "Desk" %}&nbsp;</a>
+            <ul>
+              {% for period in periods %}
+              <li><a href="{% url teleforma-desk-period-list period.id %}" class="red">{{ period.name }}</a></li>
+              {% endfor %}
+            </ul>
+          </li>
+          {% else %}
+          {% with periods.0 as period %}
+          <li><a href="{% url teleforma-desk-period-list period.id %}" class="red">{% trans "Desk" %}</a></li>
+          {% endwith %}
+          {% endif %}
+
+          {% else %}
+          <li><a href="#accounts#" class="red">{% trans "Home" %}</a></li>
+          {% endif %}
+
+          {% if user.is_authenticated %}
+
+          <li><a href="{% url postman_inbox %}" class="orange">{% trans "Messaging" %}{% if postman_unread_count %}
+              ({{ postman_unread_count }}){% endif %}</a></li>
+
+          <li><a href="{% url teleforma-annals %}" class="yellow">{% trans "Annals" %}</a></li>
+
+          {% if periods|length == 1 %}
+          <li><a href="{% url teleforma-exam-scripts-pending periods.0.id %}" class="green">&nbsp;{% trans "Scripts" %}
+              {% if user.is_staff or user.quotas.all %}{% untreated_scripts_count user periods.0.id %}
+              {% else %}{% treated_scripts_count user periods.0.id %}{% endif %}</a>
+          </li>
+          {% else %}
+          <li><a href="#scripts#" class="green">&nbsp;{% trans "Scripts" %}
+              {% if user.is_staff or user.quotas.all %}{% untreated_scripts_count user periods.0.id %}
+              {% else %}{% treated_scripts_count user periods.0.id %}{% endif %}</a>
+            <ul>
+              {% for period in periods %}
+              <li><a href="{% url teleforma-exam-scripts-pending period.id %}" class="green">{{ period.name }}</a></li>
+              {% endfor %}
+            </ul>
+          </li>
+          {% endif %}
+
+          {% if user.professor.count %}
+          <li><a href="{% url teleforma-webclass-professor %}" class="yellow">Webclass</a></li>
+          {% endif %}
+
+          {% if periods|length == 1 %}
+          <li><a href="{% url teleforma-exam-scripts-scores-all periods.0.id %}"
+              class="green">&nbsp;{% trans "Scores" %}</a></li>
+          {% else %}
+          <li><a href="#scores#" class="green">&nbsp;{% trans "Scores" %}</a>
+            <ul>
+              {% for period in periods %}
+              <li><a href="{% url teleforma-exam-scripts-scores-all period.id %}" class="green">{{ period.name }}</a>
+              </li>
+              {% endfor %}
+            </ul>
+          </li>
+          {% endif %}
+
+          {% if user.is_authenticated %}
+          {% if user.is_superuser %}
+          <li><a href="/admin/django/" target="_blank" class="blue">{% trans "Admin" %}</a></li>
+          {% else %}
+          <li><a href="{% url teleforma-help %}" class="blue">{% trans "Help" %}</a></li>
+          {% endif %}
+
+          {% if user.is_staff or user.is_superuser %}
+          <li
+            style="a.active{background-image:/static/teleforma/images/user_tr_bk.png; background-repeat: no-repeat; background-position: 1ex .5ex;}">
+            <a href="#accounts#" class="blue">{% if user.first_name and user.last_name %}{{ user.first_name }}
+              {{ user.last_name }}{% else %}{{ user.username }}{% endif %}</a>
+            <ul>
+              <li><a href="{% url teleforma-profile-detail user.username %}" class="yellow">{% trans "Profile" %}</a>
+              </li>
+              {% if user.is_staff %}
+              <li><a href="{% url teleforma-help %}">{% trans "Help" %}</a></li>
+              {% endif %}
+              <li><a href="{% url teleforma-logout %}">{% trans "Sign out" %}</a></li>
+            </ul>
+          </li>
+          {% else %}
+          <li><a href="{% url teleforma-profile-detail user.username %}" class="darkblue">{% trans "Profile" %}</a></li>
+          <li><a href="{% url teleforma-logout %}" class="black">{% trans "Sign out" %}</a></li>
+          {% endif %}
+
+          {% endif %}
+          {% endif %}
+
+        </ul>
+        {% endblock menu %}
+      </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 postman_menu %}
+      {% endblock postman_menu %}
+
+
+      {% if messages %}
+      <ul class="messages">
+        {% for message in messages %}
+        <li{% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</li>
+          {% endfor %}
+      </ul>
+      {% endif %}
+
+      {% block content %}
+      {% endblock %}
+
+      <div class="nett"></div>
+
+      {% block delete %}
+      {% endblock %}
+
+    </div>
+
+    {% block footer %}
+    <div id="footer">
+      <hr />
+      <table width="100%">
+        <tr>
+          <td>
+            <p class="left">
+              {% trans "Powered by" %} <a href="http://parisson.com" target="_blank"><br /><strong>TeleForma
+                  {% teleforma_version %}</strong></a><br />
+            </p>
+          </td>
+          <td>
+            <p class="center">
+            </p>
+          </td>
+          <td>
+            <p class="right">
+              Copyright &copy; {% current_year %} {% organization %} |
+              TODO : missing link <!-- <a href="{ url telemeta-flatpage "legal_notices" }">{% trans "Legal notices" %}</a> -->
+            </p>
+          </td>
+        </tr>
+      </table>
+    </div>
+    {% endblock %}
+
+  </div>
+  {% endblock layout %}
+
+  {% block analytics %}
+  {% analytics_code %}
+  {% endblock analytics %}
+
+  <script type='text/javascript'>
+    window.scrollTo(0, 1);
+
+    $(document).ready(function () {
+      $("*").dblclick(function (e) {
+        e.preventDefault();
+      });
+    });
+
+  </script>
+
+</body>
+
+</html>
\ No newline at end of file
index 318fb445ee350b89d9de6245517558b07a05b8e7..8b3cc386eac7af148446c01df29bfa20124caafb 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "teleforma/course_media.html" %}
-{% load telemeta_utils %}
 {% load teleforma_tags %}
 {% load i18n %}
 
@@ -64,7 +63,7 @@
 <dt>{% trans "Course" %}</dt><dd><a href="{% url teleforma-course-detail course.id %}">{{ conference.course.title }} - {{ conference.course_type }}</a></dd>
 <dt>{% trans "Session" %}</dt><dd>{{ conference.session }}</dd>
 <dt>{% trans "Professor" %}</dt>
-    <dd><a href="{% url telemeta-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
+    <dd><a href="{% url teleforma-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
 {% endif %}
 {% if conference.comment %}<dt>{% trans "Comment" %}</dt><dd>{{ conference.comment }}</dd>{% endif %}
 <dt>{% trans "Begin date" %}</dt><dd>{{ conference.date_begin }}</dd>
index a137aaf916269a5872006b45aba41fb4157ade04..f4c10a3cb8450b501c1fbf7ac0fadfde695035e5 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "teleforma/course_media.html" %}
-{% load telemeta_utils %}
 {% load teleforma_tags %}
 {% load i18n %}
 
@@ -64,7 +63,7 @@
 <div class="course_content" id="media_infos">
 <dl class="listing">
 <dt>{% trans "Title" %}</dt><dd>{{ conference.course.title }}</dd>
-<dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
+<dt>{% trans "Professor" %}</dt><dd><a href="{% url teleforma-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
 <dt>{% trans "Session" %}</dt><dd>{{ conference.session }}</dd>
 <dt>{% trans "Room" %}</dt><dd>{{ conference.room }}</dd>
 <dt>{% trans "Begin" %}</dt><dd>{{ conference.date_begin }}</dd>
index 3416738cd792c51c0b7ec5b061d89442b0d69dfa..6807cd3e0a7a55b64954c6dd45bf76737829542f 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "teleforma/course_media.html" %}
-{% load telemeta_utils %}
 {% load teleforma_tags %}
 {% load i18n %}
 
index 1335c24b6099c24e559683faf08d45fccb057d74..643abe98a1a2af160b2055c8c0592cc52b03b80c 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "teleforma/course_media.html" %}
-{% load telemeta_utils %}
 {% load teleforma_tags %}
 {% load i18n %}
 
@@ -14,7 +13,7 @@ $(document).ready(function(){
 <script type="text/javascript" src="{{ STATIC_URL }}teleforma/js/pdf-min.js"></script>
 
 <script type="text/javascript">
-    PDFJS.workerSrc = '{{ STATIC_URL }}telemeta/js/pdf-min.js';
+    PDFJS.workerSrc = '{{ STATIC_URL }}teleforma/js/pdf-min.js';
 </script>
 
 <script type="text/javascript">
index 170ed70c1575c1f61a74864ec1ea09f61299255b..8cca395633512718dadf31a55f62b4728eda6cba 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "teleforma/seminars.html" %}
-{% load telemeta_utils %}
 {% load teleforma_tags %}
 {% load i18n %}
 
@@ -131,7 +130,7 @@ $(document).ready(function(){
 <dt>{% trans "Session" %}</dt><dd>{{ media.conference.session }}</dd>
 {% if media.conference.professor %}
 <dt>{% trans "Professor" %}</dt>
-    <dd><a href="{% url telemeta-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
+    <dd><a href="{% url teleforma-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
 {% endif %}
 {% if media.conference.comment %}<dt>{% trans "Comment" %}</dt><dd>{{ media.conference.comment }}</dd>{% endif %}
 <dt>{% trans "Begin date" %}</dt><dd>{{ media.conference.date_begin }}</dd>
index 43fc4ea3dc7c17120587f381d39c43d6bd30522c..dfe40c6c8a72102d1d6c2ba2fd8c61f896b15ff9 100644 (file)
@@ -1,6 +1,5 @@
-{% extends "telemeta/base.html" %}
+{% extends "teleforma/base.html" %}
 {% load teleforma_tags %}
-{% load telemeta_utils %}
 {% load i18n %}
 
 
@@ -20,7 +19,7 @@ $(document).ready(function(){
 {% block modules %}
 <div class="module">
 
-<h3><a href="{% url teleforma-desk %}"><img src="{{ STATIC_URL }}telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</a></h3>
+<h3><a href="{% url teleforma-desk %}"><img src="{{ STATIC_URL }}teleforma/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</a></h3>
 <div style="background: white;">
 <ul>
 {% block courses %}
index ff2e99b91d8c86831568b14f3932ba6b02685873..49d8c51ca139c50c0e26252bfa2ed3986e99c32d 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "teleforma/base.html" %}
-{% load telemeta_utils %}
 {% load teleforma_tags %}
 {% load i18n %}
 
@@ -8,7 +7,7 @@
 {% block modules %}
 <div id="module-set-left" style="width: 20%">
 <div class="module">
-<h3><img src="{{ STATIC_URL }}telemeta/images/module_playlist.png" alt="index" style="vertical-align:middle" />{% trans "Help" %}</h3>
+<h3><img src="{{ STATIC_URL }}teleforma/images/module_playlist.png" alt="index" style="vertical-align:middle" />{% trans "Help" %}</h3>
 <div style="background: white;">
 <ul>
    <li><a href="#faq">FAQ</a></li>
diff --git a/teleforma/templates/teleforma/home.html b/teleforma/templates/teleforma/home.html
new file mode 100644 (file)
index 0000000..2306b9a
--- /dev/null
@@ -0,0 +1,28 @@
+{% extends "teleforma/base.html" %}
+{% load i18n %}
+
+{% block content %}
+<div class="home-content">
+<div id="module-set">
+
+{% block modules %}
+
+{% with "Last changes" as title %}
+{% include "teleforma/inc/module_revisions.html" %}
+{% endwith %}
+
+{{ block.super }}
+
+{% endblock %}
+
+</div>
+
+<div class="home-description">
+<img class="align-left" src="/static/teleforma/images/vox.png" alt="vox" style="vertical-align:middle;" />
+{{ page_content|render_flatpage }}
+</div>
+
+<a href="{% url teleforma-login %}" class="component_icon button" id="action_red">{% trans "Connexion" %}</a>
+
+</div>
+{% endblock %}
index 9c432dc48588b76931ff5b89f534102a3b558c9d..48d2a1c12e9bd2cdfa98920e6501f849b620b953 100644 (file)
@@ -1,9 +1,8 @@
 {% load i18n %}
-{% load telemeta_utils %}
 {% load teleforma_tags %}
 
 <div class="module">
-        <h3><img src="{{STATIC_URL}}telemeta/images/vox_wh.png" %}" alt="rss" style="vertical-align:middle" />{% trans title %}</h3>
+        <h3><img src="{{STATIC_URL}}teleforma/images/vox_wh.png" alt="rss" style="vertical-align:middle" />{% trans title %}</h3>
         <div style="background: transparent;">
         <div id="chatwindow"><span id="loading">Loading...</span></div>
         <form id="chatform">{% csrf_token %}
index cee064b9a19320486d00cf62b5d6210a9ce2e1d7..a779b72558df501dac8d71fecada2f941b2be15b 100644 (file)
@@ -5,7 +5,7 @@
 {% if conferences %}
 <div class="course_content">
 <div class="course_subtitle">
-    <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Live conferences"%}</h3>
+    <h3><img src="{{ STATIC_URL }}teleforma/images/item_title.png" width="10px" alt="" /> {% trans "Live conferences"%}</h3>
 </div>
     <table class="listing" width="100%">
     <tbody>
@@ -24,7 +24,7 @@
                     <dl class="listing" style="font-size: 1.2em;">
                     <dt>{% trans "Title" %}</dt><dd>{{ stream.conference.course.title }}</dd>
                     <dt>{% trans "Session" %}</dt><dd>{{ stream.conference.session }}</dd>
-                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail stream.conference.professor.user.username %}" target="_blank">{{ stream.conference.professor }}</a></dd>
+                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url teleforma-profile-detail stream.conference.professor.user.username %}" target="_blank">{{ stream.conference.professor }}</a></dd>
                     <dt>{% trans "Begin" %}</dt><dd>{{ stream.conference.date_begin }}</dd>
                     </dl>
                  </div>
@@ -32,7 +32,7 @@
             <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">
                 {% if stream.streaming %}
                 <img src="{{ STATIC_URL }}teleforma/images/network-wireless.png" style="vertical-align:middle" title="streaming" />
-                <img src="{{ STATIC_URL }}telemeta/images/media-record.png" style="vertical-align:middle" title="recording" />
+                <img src="{{ STATIC_URL }}teleforma/images/media-record.png" style="vertical-align:middle" title="recording" />
               {% endif %}
             </td>
             {% else %}
index 0982c352a0be5f5b75b0bda29bfb084e50197b02..e7dcee01c94b87b0e296d57e0abd605132de34e2 100644 (file)
@@ -4,7 +4,7 @@
 {% if course.document.all|from_course_type:type %}
 <div class="course_content">
 <div class="course_subtitle">
-<h3><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Documents"%}</h3>
+<h3><img src="{{ STATIC_URL }}/teleforma/images/item_title.png" width="10px" alt="" /> {% trans "Documents"%}</h3>
 </div>
 
 {% with course.document.all as docs %}
index c96bbd86b4f81530d33d5761e3a226831d9f2dd4..98f2a72714260a8c0b3c2b4ffa79ff17c31b024e 100644 (file)
@@ -5,7 +5,7 @@
 {% if course.media.all|from_course_type:type %}
 <div class="course_content">
 <div class="course_subtitle">
-    <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Passed conferences"%}</h3>
+    <h3><img src="{{ STATIC_URL }}teleforma/images/item_title.png" width="10px" alt="" /> {% trans "Passed conferences"%}</h3>
 </div>
     <table class="listing" width="100%">
     <tbody>
@@ -36,7 +36,7 @@
                     <dt>{% trans "Title" %}</dt><dd>{{ media.conference.course.title }}</dd>
                     <dt>{% trans "Session" %}</dt><dd>{{ media.conference.session }}</dd>
                     {% if media.conference.professor %}
-                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
+                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url teleforma-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
                     {% endif %}
                     <dt>{% trans "Begin" %}</dt><dd>{{ media.conference.date_begin }}</dd>
                     {% if media.conference.comment %}
@@ -47,9 +47,9 @@
             </td>
             <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">
             {% if media.is_published and user.is_staff %}
-             <img src="{{ STATIC_URL }}telemeta/images/ok.png" style="vertical-align:middle" alt="" title="{% trans ' published' %}" />
+             <img src="{{ STATIC_URL }}teleforma/images/ok.png" style="vertical-align:middle" alt="" title="{% trans ' published' %}" />
             {% elif not media.is_published and user.is_staff %}
-             <img src="{{ STATIC_URL }}telemeta/images/delete.png" style="vertical-align:middle" alt="" title="{% trans ' rejected' %}" />
+             <img src="{{ STATIC_URL }}teleforma/images/delete.png" style="vertical-align:middle" alt="" title="{% trans ' rejected' %}" />
             {% endif %}
             {% if media.item.file and user.is_staff %}
              <a href="{{ MEDIA_URL|set_host:HOST }}{{ media.item.file }}">
diff --git a/teleforma/templates/teleforma/inc/module_searches.html b/teleforma/templates/teleforma/inc/module_searches.html
new file mode 100644 (file)
index 0000000..8bcdbef
--- /dev/null
@@ -0,0 +1,26 @@
+{% load i18n %}
+
+   <div class="module">
+    <h3>
+      <img src="{{ STATIC_URL }}teleforma/images/search_wh2.png" alt="rss" style="vertical-align:middle" />
+      {% trans title %}</h3>
+
+    <div class="vscroll">
+    <table class="listing" bgcolor="#FFFFFF" style="width: 100%">
+      <tr>
+        <th>{% trans "Criteria" %}</th>
+      </tr>
+    {% for s in searches %}
+     <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td><a href="{% url teleforma-search-items %}?{{s.criteria.all|build_pattern_string|build_query_string}}">
+            {% for c in s.criteria.all %}
+                <li>{% trans c.key %} : {{ c.value}}</li>
+            {% endfor %}
+          </a>
+        </td>
+      </tr>
+    {% endfor %}
+    </table>
+    </div>
+   </div>
+
diff --git a/teleforma/templates/teleforma/inc/user_list.html b/teleforma/templates/teleforma/inc/user_list.html
new file mode 100644 (file)
index 0000000..d1ea28d
--- /dev/null
@@ -0,0 +1,36 @@
+{% load i18n %}
+{% load teleforma_tags %}
+{% load pagination_tags %}
+
+<div class="pagination">
+    {% for p in page.paginator.pages %}
+      {% if p == page %}
+       <span class="selected">{{ page }}</span>
+      {% else %}
+       <a href="?page={{ p.number }}">{{ p }}</a>
+      {% endif %}
+    {% endfor %}
+</div>
+
+<div id="users">
+  <table class="listing" width="100%">
+   <thead>
+   <tr><th>{% trans "Last Name"%}</th>
+    <th>{% trans "First Name"%}</th>
+    <th>{% trans "Email"%}</th>
+   
+    <th>{% trans "Write"%}</th>
+    </tr>
+    </thead>
+    <tbody id="spacing">
+    {% for user in page.object_list %}
+    <tr>
+     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.last_name }}</a></td>
+     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.first_name }}</a></td>
+     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.email }}</a></td>
+     <td><a href="{% url postman_write user.username %}" class="component_icon button" id="action_orange">{% trans "Message" %}</a></td>
+    </tr>
+    {% endfor %}
+    </tbody>
+  </table>
+</div>
diff --git a/teleforma/templates/teleforma/lists.html b/teleforma/templates/teleforma/lists.html
new file mode 100644 (file)
index 0000000..e99db61
--- /dev/null
@@ -0,0 +1,122 @@
+{% extends "teleforma/base.html" %}
+{% load teleforma_tags %}
+{% load i18n %}
+
+{% block extra_javascript %}
+<script src="{{ STATIC_URL }}teleforma/js/popupdiv-min.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}teleforma/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;});
+        });
+
+    {% for playlist in playlists %}
+        playlistUtils.addEditPlaylist('{{playlist.playlist.public_id}}','{{ playlist.playlist.title }}','{{playlist.playlist.description}}');
+    {% endfor %}
+
+
+</script>
+{% endblock %}
+
+{% block content %}
+<div id="module-set-left" style="width: 25%">
+
+    {% block module_searches %}
+    {% with searches as searches and "My searches" as title %}
+    {% include "teleforma/inc/module_searches.html" %}
+    {% endwith %}
+    {% endblock %}
+
+    {% block module_user_revisions %}
+    {% with user_revisions as revisions and "My last changes" as title %}
+    {% include "teleforma/inc/module_user_revisions.html" %}
+    {% endwith %}
+    {% endblock %}
+
+    {% block module_all_revisions %}
+    {% with revisions as revisions and "All last changes" as title %}
+    {% include "teleforma/inc/module_revisions.html" %}
+    {% endwith %}
+    {% endblock %}
+
+</div>
+
+<div class="desk_media">
+    <h1>{% trans "My 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:86ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
+            <a href="#" id="{{playlist.playlist.public_id}}" onclick="playlistUtils.showEdit(this, this.id); return false;" class="component_icon button icon_edit">{% trans "Edit" %}</a>
+                <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="if(confirm(gettrans('delete the playlist permanently?'))){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.type == "corpus" or resource.type == "fonds" %}
+                <a href="{% url telemeta-resource-detail resource.type resource.element.public_id %}">{{ resource.element.title }}</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="{{ STATIC_URL }}teleforma/images/ok.png" alt="yes" style="vertical-align:middle" /></a>
+                {% endif %}
+            </td>
+            <td style="vertical-align:middle">
+            <a href="#" onclick="if(confirm(gettrans('delete the resource from the playlist permanently?'))){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/teleforma/templates/teleforma/login.html b/teleforma/templates/teleforma/login.html
new file mode 100644 (file)
index 0000000..a6402f2
--- /dev/null
@@ -0,0 +1,34 @@
+{% extends "teleforma/base.html" %}
+{% load i18n %}
+
+{% block title %}
+{% endblock %}
+
+{% block content %}
+<script>
+$(document).ready(function() {
+    $(this).keydown(function(e) {
+        if (e.keyCode == '13') {
+            $("#_loginForm").submit();
+        }
+    });
+});
+</script>
+
+{% 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 teleforma-login %}">{% csrf_token %}
+<p>
+{{ form.username.label_tag }}
+{{ form.username }}<br />
+{{ form.password.label_tag }}
+{{ form.password }}
+</p>
+<div style="margin-top: 2em;">
+<span style="align: right; font-weight: bold; margin-right: 2em;"><a href="{% url teleforma-password-reset %}">{% trans "Password forgotten" %} ?</a></span>
+<a href="#" class="component_icon button" id="action_red" onclick="$('#_loginForm').submit();"><img src="{{STATIC_URL}}teleforma/images/password.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Sign in" %}</a>
+<input type="hidden" name="next" value="{{ next }}" />
+</div>
+</form>
+{% endblock %}
diff --git a/teleforma/templates/teleforma/profile_detail.html b/teleforma/templates/teleforma/profile_detail.html
new file mode 100644 (file)
index 0000000..6e9356f
--- /dev/null
@@ -0,0 +1,112 @@
+{% extends "teleforma/base.html" %}
+{% load i18n %}
+{% load teleforma_tags %}
+
+{% block head_title %}{% trans "User Profile" %} : {{ usr.username }}{% endblock %}
+
+{% block title %}
+{% endblock %}
+
+{% block content %}
+  <div id="module-set-left" style="width: 20%">
+  {% block modules %}
+
+    <div class="module">
+    <h3><a href="{% url teleforma-desk %}"><img src="{{ STATIC_URL }}teleforma/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% if user.username != usr.username%}{% trans "His seminars" %}{% else %}{% trans "My seminars" %}{% endif %}</a></h3>
+    <div style="background: white;">
+    {% block courses %}
+    {% with usr|user_seminars as seminars %}
+     <ul>
+      {% for seminar in seminars %} 
+      <li><a href="{% url teleforma-seminar-detail seminar.id %}">{{ seminar.title }}</a></li>
+      {% endfor %}
+    </ul>
+    {% endwith %}
+    {% endblock courses %}
+    </div>
+    </div>
+
+  {% endblock %}
+
+  {% if user.is_authenticated and user.username != usr.username %}
+   <div class="module_action">
+    <a href="{% url postman_write usr.username %}" class="component_icon button" id="action_orange">{% trans "Send a message" %}</a>
+   </div>
+  {%  endif %}
+ </div>
+
+<div class="desk_large">
+<div class="course">
+
+    <h1>{% trans "User profile" %} : {{ usr.username }}
+    </h1>
+
+    <div id="password" style="float: right;">
+    {% if user.is_authenticated and user.username == usr.username %}
+    <a href="{% url teleforma-password-change %}" class="component_icon button icon_login">{% trans "Change password" %}</a>
+    {% elif user.is_staff %}
+        <a href="{% url teleforma-user-login usr.id %}" class="component_icon button icon_login">{% trans "Login as" %}</a>
+    {%  endif %}
+    </div>
+
+   <div class="course_content">
+
+   <div class="infos" style="width: 55%">
+     <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 "Username" %}</dt><dd>{{ usr.username }}</dd>
+
+      {% if usr.student.get %}
+        {% if user.is_staff %}
+        <dt>{% trans "IEJ" %}</dt><dd><a href="{% url teleforma-iej-users usr.student.get.iej.id %}">{{ usr.student.get.iej }}</a></dd>
+        <dt>{% trans "Training" %}</dt><dd><a href="{% url teleforma-training-users usr.student.get.training.id %}">{{ usr.student.get.training }}</a></dd>
+        {% else %}
+        <dt>{% trans "IEJ" %}</dt><dd>{{ usr.student.get.iej }}</dd>
+        <dt>{% trans "Training" %}</dt><dd>{{ usr.student.get.training }}</dd>
+        {% endif %}
+        <dt>{% trans "Platform only" %}</dt><dd>{{ usr.student.get.platform_only|yes_no }}</dd>
+        <dt>{% trans "Procedure"%}</dt><dd>{{ usr.student.get.procedure}}</dd>
+        <dt>{% trans "Oral spe"%}</dt><dd>{{ usr.student.get.oral_speciality }}</dd>
+        <dt>{% trans "Written spe"%}</dt><dd>{{ usr.student.get.written_speciality }}</dd>
+        <dt>{% trans "Oral 1"%}</dt><dd>{{ usr.student.get.oral_1 }}</dd>
+        <dt>{% trans "Oral 2"%}</dt><dd>{{ usr.student.get.oral_2 }}</dd>
+        <dt>{% trans "Options"%}</dt><dd>{{ usr.student.get.options }}</dd>
+      {% endif %}
+
+      {% if user.is_staff or user.is_superuser %}
+      <dt>{% trans "Email" %}</dt><dd>{{ usr.email }}</dd>
+      <dt>{% trans "Address" %}</dt><dd>{{ usr.profile.get.address }} {{ usr.profile.get.postal_code }} {{ usr.profile.get.city }}</dd>
+      <dt>{% trans "Telephone" %}</dt><dd>{{ usr.profile.get.telephone }}</dd>
+      {% endif %}
+
+      <dt>{% trans "Date added" %}</dt><dd>{{ usr.date_joined }}</dd>
+      <dt>{% trans "Expiration date" %}</dt><dd>{{ usr.profile.get.expiration_date }}</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><br /><br />
+          <a href="#" class="component_icon button icon_ok"
+            onclick="document.getElementById('setlang').submit(); return false;">{% trans "Apply" %}</a>
+         </form>
+        </dd>
+      {%  endif %}
+     </dl>
+    </div>
+
+  </div>
+
+
+<div class="buttons">
+</div>
+
+</div>
+</div>
+{% endblock content %}
+
diff --git a/teleforma/templates/teleforma/search_criteria.html b/teleforma/templates/teleforma/search_criteria.html
new file mode 100644 (file)
index 0000000..cbdc0cf
--- /dev/null
@@ -0,0 +1,160 @@
+{% extends "teleforma/base.html" %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Advanced Search" %} - {{ block.super }}{% endblock %}
+
+{% block stylesheets %}
+{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery.autocomplete.css" />
+{% endblock %}
+
+{% block extra_javascript %}
+<script src="{{ STATIC_URL }}telemeta/js/jquery.bgiframe.js" type="text/javascript"></script>
+<script src="{{ STATIC_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 %}
+{% endblock %}
+
+{% block content %}
+
+<div id="module-set-left" style="width: 20%">
+
+    {% block module_searches %}
+    {% with searches as searches and "My searches" as title %}
+    {% include "telemeta/inc/module_searches.html" %}
+    {% endwith %}
+    {% endblock %}
+
+<div class="module_action">
+    <a href="#" class="component_icon button" id="action_yellow"
+      onclick="document.getElementById('searchform').submit(); return false;">{% trans 'Search' %}</a>
+</div>
+
+</div>
+
+<div class="desk_center">
+<div class="course">
+<h1>{% trans "Advanced Search" %}</h1>
+
+<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>
+
+</form>
+
+</div>
+</div>
+
+
+{% endblock %}
diff --git a/teleforma/templates/teleforma/users.html b/teleforma/templates/teleforma/users.html
new file mode 100644 (file)
index 0000000..7952d77
--- /dev/null
@@ -0,0 +1,44 @@
+{% extends "teleforma/base.html" %}
+{% load i18n %}
+{% load teleforma_tags %}
+
+{% block head_title %}{% trans "Users" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+{% endblock %}
+
+{% block content %}
+<div id="module-set-left" style="width: 20%">
+
+<div class="module">
+<h3><img src="{{ STATIC_URL }}teleforma/images/module_playlist.png" alt="Courses" style="vertical-align:middle" />{% trans "Seminars" %}</h3>
+<div style="background: white;">
+<ul>
+{% block courses %}
+{% for course in courses %}
+<li><a href="{% url teleforma-course-users course.id %}">{{ course }}</a></li>
+{% endfor %}
+{% endblock courses %}
+</ul>
+</div>
+</div>
+
+</div>
+
+<div class="desk_messages">
+
+{% if user.is_staff %}
+<div style="float:right;">
+<a href="{% if training %}{% url teleforma-training-users-export training.id %}{% elif iej %}{% url teleforma-iej-users-export iej.id %}{% elif course %}{% url teleforma-course-users-export course.id %}{% else %}{% url teleforma-users-xls-export %}{% endif %}" class="component_icon button icon_csv">XLS Export</a>
+</div>
+{% endif %}
+
+<div class="course_title">{% trans "Users" %}{% if training %} - {{ training }}{% elif iej %} - {{ iej }}{% elif course %} - {{ course }}{% endif %}</div>
+<br />
+ {% if users %}
+  {% include "teleforma/inc/user_list.html" %}
+ {% else %}
+    <p class="help">{% trans "No users" %}</p>
+ {% endif %}
+</div>
+{% endblock %}
diff --git a/teleforma/templates/telemeta/base.html b/teleforma/templates/telemeta/base.html
deleted file mode 100644 (file)
index cb444c6..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html>
-{% load i18n %}
-{% load telemeta_utils %}
-{% load teleforma_tags %}
-{% load postman_tags %}
-{% get_googletools as googletools %}
-{%  if googletools %}
-{% load googletools %}
-{% endif %}
-{% 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" />
-<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
-<meta name="Viewport" content="width=device-width" />
-<meta name="Viewport" content="initial-scale=1.0" />
-<meta name="Viewport" content="maximum-scale=1.5" />
-<meta name="Viewport" content="user-scalable=1" />
-<meta name="apple-mobile-web-app-capable" content="yes" />
-<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />
-
-<title>{%block head_title %}{% description %}{% endblock %}</title>
-
-{% block stylesheets %}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}teleforma/css/jquery-ui.css" />
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/telemeta.css" />
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}teleforma/css/teleforma.css" />
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}teleforma/css/messi.css" />
-
-<!--[if IE]>
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/telemeta_ie.css" />
-<![endif]-->
-<!--[if lte IE 6]>
-<link rel="stylesheet"type="text/css" href="{{ STATIC_URL }}telemeta/css/telemeta_ie6.css" />
-<![endif]-->
-
-{% endblock %}
-
-{% block extra_stylesheets %}{% endblock %}
-
-{% block javascript %}
-<script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}teleforma/js/jquery-1.6.min.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}teleforma/js/jquery-ui.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}teleforma/js/jquery.expander.min.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}teleforma/js/messi.min.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}teleforma/js/rainbowvis.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}jqchat/jqchat.js" type="text/javascript" ></script>
-<script src="{{ STATIC_URL }}teleforma/js/easytimer.js" type="text/javascript" ></script>
-<script src="{{ STATIC_URL }}telemeta/js/locale.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}telemeta/js/application.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}teleforma/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 %}
-
-{% block js-status %}
-{% get_telecaster as telecaster %}
-{%  if telecaster %}
-<script src="{{ STATIC_URL }}telecaster/js/application.js" type="text/javascript"></script>
-{% endif %}
-{% endblock js-status %}
-
-{% endblock %}
-
-{% block extra_javascript %}{% endblock %}
-{% block infra_javascript %}{% endblock %}
-
-</head>
-
-<body>
-{% block layout %}
-<div id="layout">
-
-{% block header %}
-<div id="header">
-
-<div id="logo_wrapper">
-<div id="logo">
-<img src="{{STATIC_URL}}teleforma/images/logo_pb.png" style="vertical-align:middle"
-alt="logo" />
-</div>
-</div>
-
-<div id="menu">
-{% block menu %}
-{# spaces between li and a elements breaks layout #}
-
-<ul id="nav">
-
- {% if user.is_authenticated %}
-    <li><a href="{% url teleforma-desk %}" class="red">{% trans "Desk" %}</a></li>
- {% else %}
-    <li><a href="{% url teleforma-login %}" class="red">{% trans "Home" %}</a></li>
- {% endif %}
-
- {% if user.is_authenticated %}
-
-    <li><a href="{% url postman_inbox %}" class="orange">{% trans "Contact us" %}{% if postman_unread_count %} ({{ postman_unread_count }}){% endif %}</a></li>
-
- {% if user.is_staff %}
-   <li><a href="{% url teleforma-users %}" class="yellow">{% trans "Users" %}</a></li>
-   <li><a href="{% url teleforma-answers-pending %}" class="green">{% trans "Answers" %}{% untreated_answer_count %}</a></li>
-   {% else %}
-   <li><a href="{% url teleforma-help %}" class="yellow">{% trans "Help" %}</a></li>
-   <li><a href="{% url teleforma-testimonials %}" class="green">{% trans "Testimonials" %}</a></li>
-   {% endif %}
-
- {% if user.is_authenticated %}
-  {% if user.is_staff %}
-   <li><a target="_blank" href="/admin/django/" class="blue">{% trans "Admin" %}</a></li>
-  {% endif %}
-
-  <li style="a.active{background-image:{{ STATIC_URL }}telemeta/images/user_tr_bk.png; background-repeat: no-repeat;
-    background-position: 1ex .5ex;}"><a href="#accounts#" class="blue">{% if user.first_name and user.last_name %}
- {{ user.first_name }} {{ user.last_name }}
- {% else %}
- {{ user.username }}
- {% endif %}</a>
-    <ul>
-    <li><a href="{% url teleforma-profile-detail user.username %}" class="yellow">{% trans "Profile" %}</a></li>
-    {% if user.is_staff %}
-    <li><a href="{% url teleforma-help %}">{% trans "Help" %}</a></li>
-    {% endif %}
-    <li><a href="{% url telemeta-logout %}">{% trans "Sign out" %}</a></li>
-    </ul>
- </li>
-
- {% endif %}
-{% endif %}
-
-</ul>
-{% endblock menu %}
-</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 postman_menu %}
-    {% endblock postman_menu %}
-
-    {% block content %}
-    {% endblock %}
-
-    <div class="nett"></div>
-
-    {% block delete %}
-    {% endblock %}
-
-</div>
-
-</div>
-
-<div id="push"></div>
-
-{% endblock layout %}
-
-{% block footer %}
-<div id="footer">
- <hr />
- <table width="100%">
-  <tr>
-   <td>
-    <a id="telemeta_powered" href="{% telemeta_url %}" target="_blank"><img src="{{ STATIC_URL }}telemeta/images/logo_mini_2.png" alt="Telemeta Powered"/></a>
-    <p class="left">
-    {% trans "Powered by" %} <a href="http://parisson.com" target="_blank"><br /><strong>TeleForma {% teleforma_version %}</strong></a><br />
-    </p>
-   </td>
-   <td>
-    <p class="center">
-    </p>
-   </td>
-   <td>
-    <p class="right">
-    Copyright &copy; {% current_year %} {% organization %} |
-    <a href="{% url telemeta-flatpage "legal_notices" %}">{% trans "Legal notices" %}</a>
-    </p>
-   </td>
-  </tr>
- </table>
-</div>
-{% endblock %}
-
-
-{% block analytics %}
-{% analytics_code %}
-{% endblock analytics %}
-
-<script type='text/javascript'>window.scrollTo(0, 1);</script>
-
-</body>
-</html>
diff --git a/teleforma/templates/telemeta/home.html b/teleforma/templates/telemeta/home.html
deleted file mode 100644 (file)
index c4186c3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block content %}
-<div class="home-content">
-<div id="module-set">
-
-{% block modules %}
-
-{% with "Last changes" as title %}
-{% include "telemeta/inc/module_revisions.html" %}
-{% endwith %}
-
-{{ block.super }}
-
-{% endblock %}
-
-</div>
-
-<div class="home-description">
-<img class="align-left" src="{{ STATIC_URL }}telemeta/images/vox.png" alt="vox" style="vertical-align:middle;" />
-{{ page_content|render_flatpage }}
-</div>
-
-<a href="{% url telemeta-login %}" class="component_icon button" id="action_red">{% trans "Connexion" %}</a>
-
-</div>
-{% endblock %}
diff --git a/teleforma/templates/telemeta/inc/module_revisions.html b/teleforma/templates/telemeta/inc/module_revisions.html
deleted file mode 100644 (file)
index a8d503a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-   <div class="module">
-
-    {% block rss_title %}
-      <a href="{% url telemeta-rss %}">
-      <img src="{{ STATIC_URL }}telemeta/images/rss.png" alt="rss" style="vertical-align:middle" />
-      <h3>{% trans title %}</h3></a>
-      <a href="{% url telemeta-rss %}" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
-    {% endblock rss_title %}
-
-    <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 == "corpus" or r.revision.element_type == "fonds"%}
-            <a href="{% url telemeta-resource-detail r.revision.element_type r.element.public_id %}">{{ r.element.title }}</a>
-            {% endif %}
-            {% 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/teleforma/templates/telemeta/inc/module_searches.html b/teleforma/templates/telemeta/inc/module_searches.html
deleted file mode 100644 (file)
index 2c6afb1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-   <div class="module">
-    <h3>
-      <img src="{{ STATIC_URL }}telemeta/images/search_wh2.png" alt="rss" style="vertical-align:middle" />
-      {% trans title %}</h3>
-
-    <div class="vscroll">
-    <table class="listing" bgcolor="#FFFFFF" style="width: 100%">
-      <tr>
-        <th>{% trans "Criteria" %}</th>
-      </tr>
-    {% for s in searches %}
-     <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td><a href="{% url telemeta-search-items %}?{{s.criteria.all|build_pattern_string|build_query_string}}">
-            {% for c in s.criteria.all %}
-                <li>{% trans c.key %} : {{ c.value}}</li>
-            {% endfor %}
-          </a>
-        </td>
-      </tr>
-    {% endfor %}
-    </table>
-    </div>
-   </div>
-
diff --git a/teleforma/templates/telemeta/inc/module_user_revisions.html b/teleforma/templates/telemeta/inc/module_user_revisions.html
deleted file mode 100644 (file)
index e066fcc..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends "telemeta/inc/module_revisions.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block rss_title %}
-<a href="{% url telemeta-user-rss user.username %}">
-<img src="{{ STATIC_URL }}telemeta/images/rss.png" alt="rss" style="vertical-align:middle" />
-<h3>{% trans title %}</h3></a>
-<a href="{% url telemeta-user-rss user.username %}" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
-{% endblock rss_title %}
-
diff --git a/teleforma/templates/telemeta/inc/user_list.html b/teleforma/templates/telemeta/inc/user_list.html
deleted file mode 100644 (file)
index bb106dd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-{% load i18n %}
-{% load telemeta_utils %}
-{% load teleforma_tags %}
-{% load pagination_tags %}
-
-<div class="pagination">
-    {% for p in page.paginator.pages %}
-      {% if p == page %}
-       <span class="selected">{{ page }}</span>
-      {% else %}
-       <a href="?page={{ p.number }}">{{ p }}</a>
-      {% endif %}
-    {% endfor %}
-</div>
-
-<div id="users">
-  <table class="listing" width="100%">
-   <thead>
-   <tr><th>{% trans "Last Name"%}</th>
-    <th>{% trans "First Name"%}</th>
-    <th>{% trans "Email"%}</th>
-   
-    <th>{% trans "Write"%}</th>
-    </tr>
-    </thead>
-    <tbody id="spacing">
-    {% for user in page.object_list %}
-    <tr>
-     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.last_name }}</a></td>
-     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.first_name }}</a></td>
-     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.email }}</a></td>
-     <td><a href="{% url postman_write user.username %}" class="component_icon button" id="action_orange">{% trans "Message" %}</a></td>
-    </tr>
-    {% endfor %}
-    </tbody>
-  </table>
-</div>
diff --git a/teleforma/templates/telemeta/lists.html b/teleforma/templates/telemeta/lists.html
deleted file mode 100644 (file)
index 47e28c2..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block extra_javascript %}
-<script src="{{ STATIC_URL }}telemeta/js/popupdiv-min.js" type="text/javascript"></script>
-<script src="{{ STATIC_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;});
-        });
-
-    {% for playlist in playlists %}
-        playlistUtils.addEditPlaylist('{{playlist.playlist.public_id}}','{{ playlist.playlist.title }}','{{playlist.playlist.description}}');
-    {% endfor %}
-
-
-</script>
-{% endblock %}
-
-{% block content %}
-<div id="module-set-left" style="width: 25%">
-
-    {% block module_searches %}
-    {% with searches as searches and "My searches" as title %}
-    {% include "telemeta/inc/module_searches.html" %}
-    {% endwith %}
-    {% endblock %}
-
-    {% block module_user_revisions %}
-    {% with user_revisions as revisions and "My last changes" as title %}
-    {% include "telemeta/inc/module_user_revisions.html" %}
-    {% endwith %}
-    {% endblock %}
-
-    {% block module_all_revisions %}
-    {% with revisions as revisions and "All last changes" as title %}
-    {% include "telemeta/inc/module_revisions.html" %}
-    {% endwith %}
-    {% endblock %}
-
-</div>
-
-<div class="desk_media">
-    <h1>{% trans "My 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:86ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
-            <a href="#" id="{{playlist.playlist.public_id}}" onclick="playlistUtils.showEdit(this, this.id); return false;" class="component_icon button icon_edit">{% trans "Edit" %}</a>
-                <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="if(confirm(gettrans('delete the playlist permanently?'))){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.type == "corpus" or resource.type == "fonds" %}
-                <a href="{% url telemeta-resource-detail resource.type resource.element.public_id %}">{{ resource.element.title }}</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="{{ STATIC_URL }}telemeta/images/ok.png" alt="yes" style="vertical-align:middle" /></a>
-                {% endif %}
-            </td>
-            <td style="vertical-align:middle">
-            <a href="#" onclick="if(confirm(gettrans('delete the resource from the playlist permanently?'))){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/teleforma/templates/telemeta/login.html b/teleforma/templates/telemeta/login.html
deleted file mode 100644 (file)
index e883f5c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-
-{% block title %}
-{% endblock %}
-
-{% block content %}
-<script>
-$(document).ready(function() {
-    $(this).keydown(function(e) {
-        if (e.keyCode == '13') {
-            $("#_loginForm").submit();
-        }
-    });
-});
-</script>
-
-{% 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>
-<div style="margin-top: 2em;">
-<span style="align: right; font-weight: bold; margin-right: 2em;"><a href="{% url telemeta-password-reset %}">{% trans "Password forgotten" %} ?</a></span>
-<a href="#" class="component_icon button" id="action_red" onclick="$('#_loginForm').submit();"><img src="{{STATIC_URL}}telemeta/images/password.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Sign in" %}</a>
-<input type="hidden" name="next" value="{{ next }}" />
-</div>
-</form>
-{% endblock %}
diff --git a/teleforma/templates/telemeta/profile_detail.html b/teleforma/templates/telemeta/profile_detail.html
deleted file mode 100644 (file)
index 2e77000..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-{% load teleforma_tags %}
-
-{% block head_title %}{% trans "User Profile" %} : {{ usr.username }}{% endblock %}
-
-{% block title %}
-{% endblock %}
-
-{% block content %}
-  <div id="module-set-left" style="width: 20%">
-  {% block modules %}
-
-    <div class="module">
-    <h3><a href="{% url teleforma-desk %}"><img src="{{ STATIC_URL }}telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% if user.username != usr.username%}{% trans "His seminars" %}{% else %}{% trans "My seminars" %}{% endif %}</a></h3>
-    <div style="background: white;">
-    {% block courses %}
-    {% with usr|user_seminars as seminars %}
-     <ul>
-      {% for seminar in seminars %} 
-      <li><a href="{% url teleforma-seminar-detail seminar.id %}">{{ seminar.title }}</a></li>
-      {% endfor %}
-    </ul>
-    {% endwith %}
-    {% endblock courses %}
-    </div>
-    </div>
-
-  {% endblock %}
-
-  {% if user.is_authenticated and user.username != usr.username %}
-   <div class="module_action">
-    <a href="{% url postman_write usr.username %}" class="component_icon button" id="action_orange">{% trans "Send a message" %}</a>
-   </div>
-  {%  endif %}
- </div>
-
-<div class="desk_large">
-<div class="course">
-
-    <h1>{% trans "User profile" %} : {{ usr.username }}
-    </h1>
-
-    <div id="password" style="float: right;">
-    {% 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>
-    {% elif user.is_staff %}
-        <a href="{% url teleforma-user-login usr.id %}" class="component_icon button icon_login">{% trans "Login as" %}</a>
-    {%  endif %}
-    </div>
-
-   <div class="course_content">
-
-   <div class="infos" style="width: 55%">
-     <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 "Username" %}</dt><dd>{{ usr.username }}</dd>
-
-      {% if usr.student.get %}
-        {% if user.is_staff %}
-        <dt>{% trans "IEJ" %}</dt><dd><a href="{% url teleforma-iej-users usr.student.get.iej.id %}">{{ usr.student.get.iej }}</a></dd>
-        <dt>{% trans "Training" %}</dt><dd><a href="{% url teleforma-training-users usr.student.get.training.id %}">{{ usr.student.get.training }}</a></dd>
-        {% else %}
-        <dt>{% trans "IEJ" %}</dt><dd>{{ usr.student.get.iej }}</dd>
-        <dt>{% trans "Training" %}</dt><dd>{{ usr.student.get.training }}</dd>
-        {% endif %}
-        <dt>{% trans "Platform only" %}</dt><dd>{{ usr.student.get.platform_only|yes_no }}</dd>
-        <dt>{% trans "Procedure"%}</dt><dd>{{ usr.student.get.procedure}}</dd>
-        <dt>{% trans "Oral spe"%}</dt><dd>{{ usr.student.get.oral_speciality }}</dd>
-        <dt>{% trans "Written spe"%}</dt><dd>{{ usr.student.get.written_speciality }}</dd>
-        <dt>{% trans "Oral 1"%}</dt><dd>{{ usr.student.get.oral_1 }}</dd>
-        <dt>{% trans "Oral 2"%}</dt><dd>{{ usr.student.get.oral_2 }}</dd>
-        <dt>{% trans "Options"%}</dt><dd>{{ usr.student.get.options }}</dd>
-      {% endif %}
-
-      {% if user.is_staff or user.is_superuser %}
-      <dt>{% trans "Email" %}</dt><dd>{{ usr.email }}</dd>
-      <dt>{% trans "Address" %}</dt><dd>{{ usr.profile.get.address }} {{ usr.profile.get.postal_code }} {{ usr.profile.get.city }}</dd>
-      <dt>{% trans "Telephone" %}</dt><dd>{{ usr.profile.get.telephone }}</dd>
-      {% endif %}
-
-      <dt>{% trans "Date added" %}</dt><dd>{{ usr.date_joined }}</dd>
-      <dt>{% trans "Expiration date" %}</dt><dd>{{ usr.profile.get.expiration_date }}</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><br /><br />
-          <a href="#" class="component_icon button icon_ok"
-            onclick="document.getElementById('setlang').submit(); return false;">{% trans "Apply" %}</a>
-         </form>
-        </dd>
-      {%  endif %}
-     </dl>
-    </div>
-
-  </div>
-
-
-<div class="buttons">
-<!--<a href="{% url telemeta-password-change %}" class="component_icon button icon_login">{% trans "Password reset" %}</a>-->
-</div>
-
-</div>
-</div>
-{% endblock content %}
-
diff --git a/teleforma/templates/telemeta/search_criteria.html b/teleforma/templates/telemeta/search_criteria.html
deleted file mode 100644 (file)
index bfee8ac..0000000
+++ /dev/null
@@ -1,161 +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="{{ STATIC_URL }}telemeta/css/jquery.autocomplete.css" />
-{% endblock %}
-
-{% block extra_javascript %}
-<script src="{{ STATIC_URL }}telemeta/js/jquery.bgiframe.js" type="text/javascript"></script>
-<script src="{{ STATIC_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 %}
-{% endblock %}
-
-{% block content %}
-
-<div id="module-set-left" style="width: 20%">
-
-    {% block module_searches %}
-    {% with searches as searches and "My searches" as title %}
-    {% include "telemeta/inc/module_searches.html" %}
-    {% endwith %}
-    {% endblock %}
-
-<div class="module_action">
-    <a href="#" class="component_icon button" id="action_yellow"
-      onclick="document.getElementById('searchform').submit(); return false;">{% trans 'Search' %}</a>
-</div>
-
-</div>
-
-<div class="desk_center">
-<div class="course">
-<h1>{% trans "Advanced Search" %}</h1>
-
-<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>
-
-</form>
-
-</div>
-</div>
-
-
-{% endblock %}
diff --git a/teleforma/templates/telemeta/users.html b/teleforma/templates/telemeta/users.html
deleted file mode 100644 (file)
index b5f20bf..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}
-{% load telemeta_utils %}
-{% load teleforma_tags %}
-
-{% block head_title %}{% trans "Users" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
-{% endblock %}
-
-{% block content %}
-<div id="module-set-left" style="width: 20%">
-
-<div class="module">
-<h3><img src="{{ STATIC_URL }}telemeta/images/module_playlist.png" alt="Courses" style="vertical-align:middle" />{% trans "Seminars" %}</h3>
-<div style="background: white;">
-<ul>
-{% block courses %}
-{% for course in courses %}
-<li><a href="{% url teleforma-course-users course.id %}">{{ course }}</a></li>
-{% endfor %}
-{% endblock courses %}
-</ul>
-</div>
-</div>
-
-</div>
-
-<div class="desk_messages">
-
-{% if user.is_staff %}
-<div style="float:right;">
-<a href="{% if training %}{% url teleforma-training-users-export training.id %}{% elif iej %}{% url teleforma-iej-users-export iej.id %}{% elif course %}{% url teleforma-course-users-export course.id %}{% else %}{% url teleforma-users-xls-export %}{% endif %}" class="component_icon button icon_csv">XLS Export</a>
-</div>
-{% endif %}
-
-<div class="course_title">{% trans "Users" %}{% if training %} - {{ training }}{% elif iej %} - {{ iej }}{% elif course %} - {{ course }}{% endif %}</div>
-<br />
- {% if users %}
-  {% include "telemeta/inc/user_list.html" %}
- {% else %}
-    <p class="help">{% trans "No users" %}</p>
- {% endif %}
-</div>
-{% endblock %}
index 4b866007bd1c0f2bfa2daf323fb5b39653630e13..0c02df4bb7925e93e12e9607326bb41d35280072 100644 (file)
@@ -376,3 +376,16 @@ def quiz_progress(progress):
         return int(progress[0]*100.0/progress[1])
     else:
         return 100
+
+### FROM TELEMETA
+@register.simple_tag
+def description():
+    return settings.TELEFORMA_DESCRIPTION
+
+@register.simple_tag
+def organization():
+    return settings.TELEFORMA_ORGANIZATION
+
+@register.simple_tag
+def current_year():
+    return datetime.datetime.now().strftime("%Y")
\ No newline at end of file
index eae170dc81b26d672e09b577887d1435a2ec386d..82ffca49c7cdf0132a1ec47183bdacf8d099eb26 100644 (file)
@@ -38,7 +38,8 @@ from django.views.generic import *
 from django.views.generic.base import *
 from teleforma.models import *
 from teleforma.views import *
-from telemeta.views import *
+from teleforma.forms import *
+from registration.views import *
 import forms_builder.forms.urls
 from jsonrpc import jsonrpc_site
 from longerusername.forms import AuthenticationForm
@@ -54,10 +55,8 @@ urlpatterns = patterns('',
     url(r'^$', SeminarsView.as_view(), name="home"),
     url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html', 'authentication_form': AuthenticationForm },
         name="teleforma-login"),
-    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html', 'authentication_form': AuthenticationForm },
-        name="telemeta-login"),
     url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html', 'authentication_form': AuthenticationForm },
-        name="telemeta-login"),
+        name="teleforma-login"),
 #    url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'authentication_form': AuthenticationForm}),
 
     # Telemeta
index 31a14b1ce91a482c93abe8d8f2f73aeb283823e7..4308dbaffe4a9e6fe1b02a36e8d96fcc328395e0 100644 (file)
@@ -1,4 +1,5 @@
 from core import *
 from crfpa import *
 from ae import *
-from pro import *
\ No newline at end of file
+from pro import *
+from profile import *
\ No newline at end of file
diff --git a/teleforma/views/profile.py b/teleforma/views/profile.py
new file mode 100644 (file)
index 0000000..3ef63a6
--- /dev/null
@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2010 Samalyse SARL
+# Copyright (C) 2010-2012 Parisson SARL
+
+# This software is a computer program whose purpose is to backup, analyse,
+# transcode and stream any audio content with its metadata over a web frontend.
+
+# This software is governed by the CeCILL  license under French law and
+# abiding by the rules of distribution of free software.  You can  use,
+# modify and/ or redistribute the software under the terms of the CeCILL
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# "http://www.cecill.info".
+
+# As a counterpart to the access to the source code and  rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty  and the software's author,  the holder of the
+# economic rights,  and the successive licensors  have only  limited
+# liability.
+
+# In this respect, the user's attention is drawn to the risks associated
+# with loading,  using,  modifying and/or developing or reproducing the
+# software by the user in light of its specific status of free software,
+# that may mean  that it is complicated to manipulate,  and  that  also
+# therefore means  that it is reserved for developers  and  experienced
+# professionals having in-depth computer knowledge. Users are therefore
+# encouraged to load and test the software's suitability as regards their
+# requirements in conditions enabling the security of their systems and/or
+# data to be ensured and,  more generally, to use and operate it in the
+# same conditions as regards security.
+
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL license and that you accept its terms.
+
+# Authors: Olivier Guilyardi <olivier@samalyse.com>
+#          Guillaume Pellerin <yomguy@parisson.com>
+
+from django.contrib.auth.models import User
+from django.contrib.auth.forms import UserChangeForm
+from django.utils.decorators import method_decorator
+from django.contrib.auth.decorators import login_required
+from teleforma.models.profile import UserProfile
+from teleforma.forms import UserProfileForm
+
+class ProfileView(object):
+    """Provide Collections web UI methods"""
+
+    @method_decorator(login_required)
+    def profile_detail(self, request, username, template='telemeta/profile_detail.html'):
+        user = User.objects.get(username=username)
+        try:
+            profile = user.get_profile()
+        except:
+            profile = None
+        playlists = get_playlists(request, user)
+        user_revisions = get_revisions(25, user)
+
+        return render(request, template, {'profile' : profile, 'usr': user, 'playlists': playlists,
+                                          'user_revisions': user_revisions})
+
+    @method_decorator(login_required)
+    def profile_edit(self, request, username, template='telemeta/profile_edit.html'):
+        if request.user.is_superuser:
+            user_hidden_fields = ['profile-user', 'user-password', 'user-last_login', 'user-date_joined']
+        else:
+            user_hidden_fields = ['user-username', 'user-is_staff', 'profile-user', 'user-is_active',
+                         'user-password', 'user-last_login', 'user-date_joined', 'user-groups',
+                         'user-user_permissions', 'user-is_superuser', 'profile-expiration_date']
+
+        user = User.objects.get(username=username)
+        if user != request.user and not request.user.is_staff:
+            mess = ugettext('Access not allowed')
+            title = ugettext('User profile') + ' : ' + username + ' : ' + 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})
+
+        try:
+            profile = user.get_profile()
+        except:
+            profile = UserProfile(user=user)
+
+        if request.method == 'POST':
+            user_form = UserChangeForm(request.POST, instance=user, prefix='user')
+            profile_form = UserProfileForm(request.POST, instance=profile, prefix='profile')
+            if user_form.is_valid() and profile_form.is_valid():
+                user_form.save()
+                profile_form.save()
+                return redirect('telemeta-desk-profile', username)
+        else:
+            user_form = UserChangeForm(instance=user, prefix='user')
+            profile_form = UserProfileForm(instance=profile, prefix='profile')
+            forms = [user_form, profile_form]
+        return render(request, template, {'forms': forms, 'usr': user,
+                                'user_hidden_fields': user_hidden_fields})
+