Binary file .DS_Store has changed
--- a/.hgtags Thu Dec 06 14:39:14 2012 +0100
+++ b/.hgtags Fri Dec 14 15:12:39 2012 +0100
@@ -134,3 +134,8 @@
a05ad02125c58e419fcbd52475c9f39be35f576e V01.35
a774af5e10f40b65dd1ec748ad36e9ed4e9a294e V01.36
89e3320ac56c863333e3e5317d1c7fced478cc05 V01.36
+a6a37775a76dd0a1aa56b61172ada2422fd99b14 V01.37
+5a9f718115d38140a9dcd4ba8d650a1de13f6aa0 V01.38
+0897d4ffdbc96f9cfb4b9c9b6e4f27dbebf8331a V01.39
+7fa1389a1d1da6f78f1509733874baf13647e960 V01.40
+57bb8c9fe1ff60b3a3e5d21a647e724b8cb18a45 V01.41
--- a/.settings/org.eclipse.core.resources.prefs Thu Dec 06 14:39:14 2012 +0100
+++ b/.settings/org.eclipse.core.resources.prefs Fri Dec 14 15:12:39 2012 +0100
@@ -1,41 +1,42 @@
-eclipse.preferences.version=1
-encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8
-encoding//src/ldt/ldt/indexation/backends/elasticsearch_backend.py=utf-8
-encoding//src/ldt/ldt/indexation/highlighter.py=utf-8
-encoding//src/ldt/ldt/indexation/models.py=utf-8
-encoding//src/ldt/ldt/indexation/query_parser.py=utf-8
-encoding//src/ldt/ldt/indexation/search_indexes.py=utf-8
-encoding//src/ldt/ldt/indexation/tests.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0006_auto__add_field_media_image.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0008_auto__add_field_project_image.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0012_auto__add_field_content_last_annotated.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0013_auto__add_field_content_front_project__chg_field_content_last_annotate.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0014_auto__del_annotationstat__chg_field_content_last_annotated.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0015_auto__add_contentstat__del_field_content_last_annotated__del_field_con.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0016_one_to_one_stat_annotation.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0017_correct_image_path.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0018_auto__chg_field_content_iri_id__chg_field_project_ldt_id__chg_field_au.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0019_recalculate_media_hash_src.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0020_auto__add_field_segment_id_hash__chg_field_segment_iri_id__chg_field_s.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0021_recalculate_segment_id_hash_script.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0022_auto__add_unique_media_src_hash__chg_field_segment_cutting_id__chg_fie.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0023_auto__add_field_segment_audio_src__add_field_segment_audio_href.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0024_auto__chg_field_tag_name.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/views/json.py=utf-8
-encoding//src/ldt/ldt/management/utils.py=utf-8
-encoding//src/ldt/ldt/test/test_runner.py=utf-8
-encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/user/migrations/0008_auto__chg_field_groupprofile_image__chg_field_groupprofile_group__chg_.py=utf-8
-encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8
-encoding/<project>=UTF-8
+eclipse.preferences.version=1
+encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8
+encoding//src/ldt/ldt/indexation/backends/elasticsearch_backend.py=utf-8
+encoding//src/ldt/ldt/indexation/highlighter.py=utf-8
+encoding//src/ldt/ldt/indexation/models.py=utf-8
+encoding//src/ldt/ldt/indexation/query_parser.py=utf-8
+encoding//src/ldt/ldt/indexation/search_indexes.py=utf-8
+encoding//src/ldt/ldt/indexation/tests.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0006_auto__add_field_media_image.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0008_auto__add_field_project_image.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0012_auto__add_field_content_last_annotated.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0013_auto__add_field_content_front_project__chg_field_content_last_annotate.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0014_auto__del_annotationstat__chg_field_content_last_annotated.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0015_auto__add_contentstat__del_field_content_last_annotated__del_field_con.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0016_one_to_one_stat_annotation.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0017_correct_image_path.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0018_auto__chg_field_content_iri_id__chg_field_project_ldt_id__chg_field_au.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0019_recalculate_media_hash_src.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0020_auto__add_field_segment_id_hash__chg_field_segment_iri_id__chg_field_s.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0021_recalculate_segment_id_hash_script.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0022_auto__add_unique_media_src_hash__chg_field_segment_cutting_id__chg_fie.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0023_auto__add_field_segment_audio_src__add_field_segment_audio_href.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0024_auto__chg_field_tag_name.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0025_chg_site_domain.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/views/json.py=utf-8
+encoding//src/ldt/ldt/management/utils.py=utf-8
+encoding//src/ldt/ldt/test/test_runner.py=utf-8
+encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/user/migrations/0008_auto__chg_field_groupprofile_image__chg_field_groupprofile_group__chg_.py=utf-8
+encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8
+encoding/<project>=UTF-8
--- a/src/ldt/ldt/__init__.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/__init__.py Fri Dec 14 15:12:39 2012 +0100
@@ -1,4 +1,4 @@
-VERSION = (1, 36, 0, "final", 0)
+VERSION = (1, 41, 0, "final", 0)
def get_version():
--- a/src/ldt/ldt/api/ldt/resources/tag.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/api/ldt/resources/tag.py Fri Dec 14 15:12:39 2012 +0100
@@ -26,15 +26,21 @@
# Search by content ids is priori
content_ids = request.GET.get('contents', '')
segment_ids = request.GET.get('segments', '')
+ # We define the number of steps in weight int
+ try:
+ weight_steps = int(request.GET.get('steps', 10))
+ except:
+ weight_steps = 10
tags_cloud = None
- if content_ids != "":
+ if content_ids=="all" or segment_ids=="all":
+ tags_cloud = Tag.objects.cloud_for_model(Segment, steps=weight_steps)
+ elif content_ids != "":
# We get all the segments for these contents
content_ids = content_ids.split(',')
- tags_cloud = Tag.objects.cloud_for_model(Segment, filters={"iri_id__in":content_ids})
- if not all_segments and segment_ids != "":
+ tags_cloud = Tag.objects.cloud_for_model(Segment, filters={"iri_id__in":content_ids}, steps=weight_steps)
+ elif not all_segments and segment_ids != "":
segment_ids = segment_ids.split(',')
- tags_cloud = Tag.objects.cloud_for_model(Segment, filters={"element_id__in":segment_ids})
-
+ tags_cloud = Tag.objects.cloud_for_model(Segment, filters={"element_id__in":segment_ids}, steps=weight_steps)
limit = request.GET.get('limit', getattr(settings, 'API_LIMIT_PER_PAGE', 20))
if limit == "0":
@@ -52,10 +58,16 @@
bundle = self.build_bundle(obj=tag, request=request)
bundle = self.full_dehydrate(bundle)
objects.append(bundle)
-
+
object_list = {
'objects': objects,
}
self.log_throttled_access(request)
- return self.create_response(request, object_list)
\ No newline at end of file
+ return self.create_response(request, object_list)
+
+ def dehydrate(self, bundle):
+ # This function enable to add the weight of a tag in the bundle's datas, which is not in the tag model
+ if bundle.obj and hasattr(bundle.obj,'font_size'):
+ bundle.data['weight'] = bundle.obj.font_size
+ return bundle
\ No newline at end of file
--- a/src/ldt/ldt/auth/views.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/auth/views.py Fri Dec 14 15:12:39 2012 +0100
@@ -8,7 +8,6 @@
redirect_field_name=REDIRECT_FIELD_NAME,
authentication_form=AuthenticationForm,
current_app=None):
-
extra_context = {'social_list': social_list}
return django_login(request, template_name, redirect_field_name, authentication_form, current_app, extra_context)
--- a/src/ldt/ldt/ldt_utils/admin.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/admin.py Fri Dec 14 15:12:39 2012 +0100
@@ -8,6 +8,10 @@
from ldt.ldt_utils.models import Content, Project, Media, Author
from ldt.ldt_utils.stat import update_stat_content
from guardian.admin import GuardedModelAdmin
+from django.http import HttpResponse
+from StringIO import StringIO
+from django.core.management import call_command
+import logging
class ProjectAdmin(GuardedModelAdmin):
@@ -95,18 +99,38 @@
form = StatAnnotationForm()
return render_to_response('admin/ldt_utils/content/stats_form.html', {'form': form, 'message':message, 'current_app': self.admin_site.name, 'current_action' : 'stats' }, context_instance=RequestContext(request))
-
+
+
+ def dumpdata(self, request):
+ # do we dump the datas ?
+ dump_str = request.REQUEST.get("dump")
+ app_str = request.REQUEST.get("app", "")
+ dump_bool = False
+ if dump_str:
+ dump_bool = {'true': True, 'false': False, "0": False, "1": True}.get(dump_str.lower())
+ if dump_bool:
+ content = StringIO()
+ if app_str=="":
+ call_command("dumpdata", indent=1, stdout=content)
+ else:
+ call_command("dumpdata", app_str, indent=1, stdout=content)
+ content.seek(0)
+ out = content.getvalue()
+ content.close()
+ res = HttpResponse(out, mimetype='application/json')
+ res["Content-Disposition"] = "attachment; filename=dumpdata_ldt.json"
+ return res
+ return render_to_response('admin/ldt_utils/content/dumpdata.html', {}, context_instance=RequestContext(request))
+
def get_urls(self):
urls = super(ContentAdmin, self).get_urls()
content_urls = patterns('',
url(r'^reindex/$', self.admin_site.admin_view(self.reindex), name="ldt_content_reindex"),
- # (r'^admin/ldt/content/import/upload/$', 'ldt.ldt_utils.views.uploadFile'),
url(r'^import/$', self.admin_site.admin_view(self.import_file), name="ldt_content_import_file"),
- url(r'^stats/$', self.admin_site.admin_view(self.stats_annotations), name="ldt_project_compute_stats")
-
+ url(r'^stats/$', self.admin_site.admin_view(self.stats_annotations), name="ldt_project_compute_stats"),
+ url(r'^dumpdata/$', self.admin_site.admin_view(self.dumpdata), name="ldt_admin_dump_data"),
)
-
return content_urls + urls
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/migrations/0025_chg_site_domain.py Fri Dec 14 15:12:39 2012 +0100
@@ -0,0 +1,168 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import DataMigration
+from django.conf import settings
+from django.db import models
+
+class Migration(DataMigration):
+
+ def forwards(self, orm):
+ Sites = orm['sites.Site']
+ site = Sites.objects.get(id=settings.SITE_ID)
+ web_url = settings.WEB_URL
+ if (web_url.startswith("http://")):
+ domain_area = web_url.split("//",1)
+ domain = domain_area[1]
+ else :
+ domain=web_url
+ if site.domain!=domain:
+ site.domain = domain
+ site.save()
+ if site.name!=domain:
+ site.name=domain
+ site.save()
+
+ def backwards(self, orm):
+ #do nothing
+ pass
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'ldt_utils.author': {
+ 'Meta': {'object_name': 'Author'},
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
+ 'handle': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastname': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'})
+ },
+ 'ldt_utils.content': {
+ 'Meta': {'ordering': "['title']", 'object_name': 'Content'},
+ 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ldt_utils.Author']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'content_creation_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'duration': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'front_project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ldt_utils.Project']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image': ('sorl.thumbnail.fields.ImageField', [], {'default': "'thumbnails/contents/content_default_icon.png'", 'max_length': '200'}),
+ 'iri_id': ('django.db.models.fields.CharField', [], {'default': "u'ccfe5711-3581-11e2-8abd-00161798aedb'", 'unique': 'True', 'max_length': '255'}),
+ 'iriurl': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
+ 'media_obj': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ldt_utils.Media']", 'null': 'True', 'blank': 'True'}),
+ 'tags': ('tagging.fields.TagField', [], {'max_length': '2048', 'null': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'update_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ 'ldt_utils.contentstat': {
+ 'Meta': {'object_name': 'ContentStat'},
+ 'annotation_volume_str': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'content': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'stat_annotation'", 'unique': 'True', 'to': "orm['ldt_utils.Content']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'last_annotated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'blank': 'True'}),
+ 'nb_annotations': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'polemics_volume_str': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'})
+ },
+ 'ldt_utils.media': {
+ 'Meta': {'object_name': 'Media'},
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'duration': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'external_permalink': ('django.db.models.fields.URLField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'external_publication_url': ('django.db.models.fields.URLField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'external_src_url': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'media_creation_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'mimetype_field': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
+ 'src': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
+ 'src_hash': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'update_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'videopath': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'})
+ },
+ 'ldt_utils.project': {
+ 'Meta': {'ordering': "['title']", 'object_name': 'Project'},
+ 'changed_by': ('django.db.models.fields.CharField', [], {'max_length': '70'}),
+ 'contents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ldt_utils.Content']", 'symmetrical': 'False'}),
+ 'created_by': ('django.db.models.fields.CharField', [], {'max_length': '70'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image': ('sorl.thumbnail.fields.ImageField', [], {'default': "'thumbnails/projects/project_default_icon.png'", 'max_length': '200'}),
+ 'ldt': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'ldt_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
+ 'state': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '1024'})
+ },
+ 'ldt_utils.segment': {
+ 'Meta': {'object_name': 'Segment'},
+ 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'audio_href': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
+ 'audio_src': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'author': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
+ 'content': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ldt_utils.Content']"}),
+ 'cutting_id': ('django.db.models.fields.CharField', [], {'max_length': '512', 'db_index': 'True'}),
+ 'date': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+ 'duration': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'element_id': ('django.db.models.fields.CharField', [], {'max_length': '512', 'db_index': 'True'}),
+ 'ensemble_id': ('django.db.models.fields.CharField', [], {'max_length': '512', 'db_index': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'id_hash': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'iri_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'polemics': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'project_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'project_obj': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ldt_utils.Project']", 'null': 'True'}),
+ 'start_ts': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'tags': ('tagging.fields.TagField', [], {'max_length': '2048', 'null': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'})
+ },
+ 'sites.site': {
+ 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
+ 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ }
+ }
+
+ complete_apps = ['sites', 'ldt_utils']
+ symmetrical = True
--- a/src/ldt/ldt/ldt_utils/models.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/models.py Fri Dec 14 15:12:39 2012 +0100
@@ -14,6 +14,7 @@
from utils import (create_ldt, copy_ldt, create_empty_iri, update_iri,
generate_uuid)
from ldt.utils import generate_hash
+from ldt.utils.web_url_management import get_web_url
import datetime
import lxml.etree #@UnresolvedImport
import mimetypes
@@ -300,7 +301,9 @@
def __unicode__(self):
return str(self.id) + ":" + self.iri_id + ":" + self.title.replace("\n", " ")
- def iri_url(self, web_url=settings.WEB_URL):
+ def iri_url(self, web_url=None):
+ if not web_url:
+ web_url=get_web_url()
if url_utils.is_absolute(self.iriurl):
return self.iriurl
else:
--- a/src/ldt/ldt/ldt_utils/templates/admin/ldt_utils/app_index.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/admin/ldt_utils/app_index.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,7 +1,9 @@
{% extends "admin/app_index.html" %}
+{% load absurl %}
+{% load absstatic %}
{% block extrastyle %}
{{ block.super }}
- <link rel="stylesheet" type="text/css" href="{% load ldtmedia %}{% ldt_media_prefix %}css/dashboard.css" />
+ <link rel="stylesheet" type="text/css" href='{% absstatic "ldt/css/dashboard.css" %}' />
{% endblock %}
{% load i18n %}
{% block content %}
@@ -11,27 +13,33 @@
<table summary="Import">
<caption>Import</caption>
<tr>
- <th><a href="{{WEB_URL}}{% url admin:ldt_content_import_file %}">Import
- an ldt</a></th>
+ <th><a href="{% absurl admin:ldt_content_import_file %}">Import
+ an ldt</a>
+ </th>
+ <td> </td>
+ </tr>
+ <tr>
+ <th><a href="{% absurl admin:ldt_content_reindex %}">Reindex</a>
+ </th>
<td> </td>
- <!--tr>
- <th>
- <a href="content/export/form">Generate ldt</a>
- </th>
- <td> </td>
- </tr-->
- <tr>
- <th><a href="{{WEB_URL}}{% url admin:ldt_content_reindex %}">Reindex</a>
- </th>
- <td> </td>
- </tr>
- <tr>
- <th><a href="{{WEB_URL}}{% url admin:ldt_project_compute_stats %}">Compute stats</a>
- </th>
- <td> </td>
- </tr>
+ </tr>
+ <tr>
+ <th><a href="{% absurl admin:ldt_project_compute_stats %}">Compute stats</a>
+ </th>
+ <td> </td>
+ </tr>
</table>
</div>
+ <div class="module">
+ <table summary="Data">
+ <caption>Data</caption>
+ <tr>
+ <th><a href="{% absurl admin:ldt_admin_dump_data %}">Dump data</a>
+ </th>
+ <td> </td>
+ </tr>
+ </table>
+ </div>
</div>
{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/admin/ldt_utils/content/dumpdata.html Fri Dec 14 15:12:39 2012 +0100
@@ -0,0 +1,16 @@
+{% extends "admin/ldt_utils/app_action.html" %}
+{% load i18n %}
+{% load absurl %}
+{# DUMP DATA #}
+{% block content %}
+{% if message %}
+<div>
+<p>{{ message }}</p>
+</div>
+{% endif %}
+<div>
+<p>Click <a href="{% absurl admin:ldt_admin_dump_data %}?dump=1">HERE</a> if you want to download the dumpdata's json. It can be long to load. The dumpdata is full and raw, without natural keys.</p>
+</div>
+
+<a href="{% absurl admin:app_list 'ldt_utils' %}">Back to administration page</a>
+{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/admin/ldt_utils/content/reindex_form.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/admin/ldt_utils/content/reindex_form.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,6 @@
{% extends "admin/ldt_utils/app_action.html" %}
{% load i18n %}
+{% load absurl %}
{# reindex contents #}
{% block content %}
{% if message %}
@@ -11,13 +12,13 @@
{% endif %}
<div>
<form method="post"
- action="{{WEB_URL}}{% url admin:ldt_content_reindex %}">{% csrf_token %}
+ action="{% absurl admin:ldt_content_reindex %}">{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="submit" /></form>
</div>
-<a href="{{WEB_URL}}{% url admin:app_list 'ldt_utils' %}">Back to administration page</a>
+<a href="{% absurl admin:app_list 'ldt_utils' %}">Back to administration page</a>
{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/admin/ldt_utils/content/stats_form.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/admin/ldt_utils/content/stats_form.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,6 @@
{% extends "admin/ldt_utils/app_action.html" %}
{% load i18n %}
+{% load absurl %}
{# reindex contents #}
{% block content %}
{% if message %}
@@ -11,13 +12,13 @@
{% endif %}
<div>
<form method="post"
- action="{{WEB_URL}}{% url admin:ldt_project_compute_stats %}">{% csrf_token %}
+ action="{% absurl admin:ldt_project_compute_stats %}">{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="submit" /></form>
</div>
-<a href="{{WEB_URL}}{% url admin:app_list 'ldt_utils' %}">Back to administration page</a>
+<a href="{% absurl admin:app_list 'ldt_utils' %}">Back to administration page</a>
{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Fri Dec 14 15:12:39 2012 +0100
@@ -2,6 +2,7 @@
{% load i18n %}
{% load thumbnail %}
{% load front_tags %}
+{% load absstatic %}
{% block title %}
{% if tag_label %}
@@ -13,13 +14,13 @@
{% block js_import %}
{{block.super}}
-<script src="{{LDT_MEDIA_PREFIX}}js/raphael.js" type="text/javascript"></script>
-<script src="{{LDT_MEDIA_PREFIX}}js/Ldt_front_sparkline.js" type="text/javascript"></script>
+<script src='{% absstatic "ldt/js/raphael.js" %}' type="text/javascript"></script>
+<script src='{% absstatic "ldt/js/Ldt_front_sparkline.js" %}' type="text/javascript"></script>
{% endblock %}
{% block css_import %}
{{block.super}}
-<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_home.css" type="text/css"/>
+<link rel="stylesheet" href='{% absstatic "ldt/css/front_home.css" %}' type="text/css"/>
{% endblock %}
{% block js_declaration %}
@@ -51,7 +52,7 @@
{% else %}{% trans 'All medias' %}{% endif %}</h2>
</li>
<li class="li_right">
- <span class="tag_link"><a href="#" id="tag_cloud_link" title="{% trans 'Filter the medias' %}"><img id="hide_tag_cloud" src="{{LDT_MEDIA_PREFIX}}img/little_minus_pink.png" alt="{% trans 'Filter the medias' %}" /><img id="show_tag_cloud" src="{{LDT_MEDIA_PREFIX}}img/little_plus_pink.png" alt="{% trans 'Filter the medias' %}" /> {% trans 'Filter the medias' %}</a></span>
+ <span class="tag_link"><a href="#" id="tag_cloud_link" title="{% trans 'Filter the medias' %}"><img id="hide_tag_cloud" src='{% absstatic "ldt/img/little_minus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /><img id="show_tag_cloud" src='{% absstatic "ldt/img/little_plus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /> {% trans 'Filter the medias' %}</a></span>
</li>
</ul>
</li>
--- a/src/ldt/ldt/ldt_utils/templates/front/front_base.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_base.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,6 +1,7 @@
{% load i18n %}
{% load logintag %}
{% load navigation %}
+{% load absstatic %}
{% load analytics %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -9,15 +10,15 @@
{% block head %}
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta http-equiv="content-language" content="{{LANGUAGE_CODE}}" />
- <link rel="SHORTCUT ICON" href="{{LDT_MEDIA_PREFIX}}/img/favicon.ico" />
+ <link rel="SHORTCUT ICON" href='{% absstatic "ldt/img/favicon.ico" %}' />
<title>{% block title %}Lignes de temps{% endblock %}</title>
{% block js_import %}
- <script src="{{LDT_MEDIA_PREFIX}}js/jquery.min.js" type="text/javascript"></script>
- <script src="{{LDT_MEDIA_PREFIX}}js/jquery.textchange.min.js" type="text/javascript"></script>
+ <script src='{% absstatic "ldt/js/jquery.min.js" %}' type="text/javascript"></script>
+ <script src='{% absstatic "ldt/js/jquery.textchange.min.js" %}' type="text/javascript"></script>
{% endblock %}
{% block css_declaration %}{% endblock %}
{% block css_import %}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_common.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/front_common.css" %}' type="text/css"/>
{% endblock %}
{% block js_declaration %}
<script type="text/javascript">
@@ -55,7 +56,7 @@
{% if user.is_authenticated %}
<li id="li_annotation">
<div class="fl">
- <!-- a href="#"><img src="{{LDT_MEDIA_PREFIX}}img/annot_icon.png" id="annot_icon" /></a -->
+ <!-- a href="#"><img src='{% absstatic "ldt/img/annot_icon.png" %}' id="annot_icon" /></a -->
<a href="{% url root-view %}" title="{% trans "My projects" %}">{% trans "My projects" %}</a>
</div>
<div class="fl">
--- a/src/ldt/ldt/ldt_utils/templates/front/front_group.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_group.html Fri Dec 14 15:12:39 2012 +0100
@@ -2,12 +2,13 @@
{% load i18n %}
{% load thumbnail %}
{% load front_tags %}
+{% load absstatic %}
{% block title %}Lignes de temps : groupe "{{group.name}}"{% endblock %}
{% block css_import %}
{{block.super}}
-<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_group.css" type="text/css"/>
+<link rel="stylesheet" href='{% absstatic "ldt/css/front_group.css" %}' type="text/css"/>
{% endblock %}
{% block js_declaration %}
--- a/src/ldt/ldt/ldt_utils/templates/front/front_home.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_home.html Fri Dec 14 15:12:39 2012 +0100
@@ -2,19 +2,19 @@
{% load i18n %}
{% load thumbnail %}
{% load front_tags %}
-
+{% load absstatic %}
{% block title %}{% trans "front.home" %}{% endblock %}
{% block js_import %}
{{block.super}}
-<script src="{{LDT_MEDIA_PREFIX}}js/raphael.js" type="text/javascript"/></script>
-<script src="{{LDT_MEDIA_PREFIX}}js/Ldt_front_sparkline.js" type="text/javascript"/></script>
+<script src='{% absstatic "ldt/js/raphael.js" %}' type="text/javascript"/></script>
+<script src='{% absstatic "ldt/js/Ldt_front_sparkline.js" %}' type="text/javascript"/></script>
{% endblock %}
{% block css_import %}
{{block.super}}
-<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_home.css" type="text/css"/>
+<link rel="stylesheet" href='{% absstatic "ldt/css/front_home.css" %}' type="text/css"/>
{% endblock %}
{% block js_declaration %}
@@ -42,7 +42,7 @@
<ul class="title_ul">
<li><h2>{% trans 'Last annotated medias' %}</h2></li>
<li class="li_right">
- <a class="blue" href="{% url ldt.ldt_utils.views.front.all_contents %}" title="{% trans 'view all medias' %}">{% trans 'All medias' %}</a> <span class="tag_link"><a href="#" id="tag_cloud_link" title="{% trans 'Filter the medias' %}"><img id="hide_tag_cloud" src="{{LDT_MEDIA_PREFIX}}img/little_minus_pink.png" alt="{% trans 'Filter the medias' %}" /><img id="show_tag_cloud" src="{{LDT_MEDIA_PREFIX}}img/little_plus_pink.png" alt="{% trans 'Filter the medias' %}" /> {% trans 'Filter the medias' %}</a></span>
+ <a class="blue" href="{% url ldt.ldt_utils.views.front.all_contents %}" title="{% trans 'view all medias' %}">{% trans 'All medias' %}</a> <span class="tag_link"><a href="#" id="tag_cloud_link" title="{% trans 'Filter the medias' %}"><img id="hide_tag_cloud" src='{% absstatic "ldt/img/little_minus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /><img id="show_tag_cloud" src='{% absstatic "ldt/img/little_plus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /> {% trans 'Filter the medias' %}</a></span>
</li>
</ul>
</li>
--- a/src/ldt/ldt/ldt_utils/templates/front/front_player.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_player.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,14 +1,15 @@
{% extends "front/front_base.html" %}
{% load i18n %}
{% load thumbnail %}
+{% load absstatic %}
{% block title %}Lignes de temps : {% trans 'Annotate' %} "{{content.title}}"{% endblock %}
{% block css_import %}
{{block.super}}
-<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_player.css" type="text/css"/>
-<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/embed_popup.css" type="text/css"/>
-<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/jq-css/jquery.qtip.css" type="text/css"/>
+<link rel="stylesheet" href='{% absstatic "ldt/css/front_player.css" %}' type="text/css"/>
+<link rel="stylesheet" href='{% absstatic "ldt/css/embed_popup.css" %}' type="text/css"/>
+<link rel="stylesheet" href='{% absstatic "ldt/css/jq-css/jquery.qtip.css" %}' type="text/css"/>
{% endblock %}
{% block js_declaration %}
--- a/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,18 +1,19 @@
{% extends "front/front_base.html" %}
{% load i18n %}
{% load thumbnail %}
+{% load absstatic %}
{% load front_tags %}
{% block title %}Lignes de temps : {% trans 'search' %} "{{search}}" {% endblock %}
{% block js_import %}
{{block.super}}
-<script src="{{LDT_MEDIA_PREFIX}}js/raphael.js" type="text/javascript"/></script>
+<script src='{% absstatic "ldt/js/raphael.js" %}' type="text/javascript"/></script>
{% endblock %}
{% block css_import %}
{{block.super}}
-<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/front_search.css" type="text/css"/>
+<link rel="stylesheet" href='{% absstatic "ldt/css/front_search.css" %}' type="text/css"/>
{% endblock %}
{% block js_declaration %}
@@ -40,7 +41,7 @@
var global_csrf_token = "{{ csrf_token }}";
</script>
-<script src="{{LDT_MEDIA_PREFIX}}js/Ldt_front_search_results.js" type="text/javascript"></script>
+<script src='{% absstatic "ldt/js/Ldt_front_search_results.js" %}' type="text/javascript"></script>
{% endblock %}
{% block body %}
@@ -77,6 +78,7 @@
</li>
<li id="li_nb_resultats">
<p id="p_nb_resultats">{{ nb_results }} {% trans "Result" %}{{ nb_results|pluralize }}</p>
+ <p id="p_nb_segments">{{ nb_segment }} {% trans "Segment" %}{{ nb_segment|pluralize }}</p>
</li>
<!--li id="resultats_options">options</li-->
</ul>
@@ -106,7 +108,7 @@
<li class="li_segment" id="li_{{segment.project_id}}_{{segment.iri_id}}_{{segment.ensemble_id}}_{{segment.cutting_id}}_{{segment.element_id}}">
<div class="left_segment">
<div class="color_zone"></div>
- <a href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.cutting_id %}#id={{segment.element_id}}"><img src="{{LDT_MEDIA_PREFIX}}img/annot_icon_80x45.png" width="80" height="45" alt="" /></a>
+ <a href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.cutting_id %}#id={{segment.element_id}}"><img src='{% absstatic "ldt/img/annot_icon_80x45.png" %}' width="80" height="45" alt="" /></a>
<!--p class="duree_segment">{{ segment.duration|str_duration:"::" }}</p-->
</div>
<h4 class="title_segment"><a class="blue under" href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.cutting_id %}#id={{segment.element_id}}" title="{% trans 'view this annotation in the player' %}">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/content_list.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/content_list.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,6 @@
{% extends "ldt/user/user_base.html" %}
{% load i18n %}
+{% load absstatic %}
{% block js_declaration %}
{{block.super}}
@@ -47,7 +48,7 @@
{% block css_import %}
{{block.super}}
- <link rel="stylesheet" type="text/css" href="{{LDT_MEDIA_PREFIX}}/css/ldt.css" />
+ <link rel="stylesheet" type="text/css" href='{% absstatic "ldt/css/ldt.css" %}' />
{% endblock %}
{% block breadcrumb %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/copy_ldt.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/copy_ldt.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,11 +1,11 @@
{% extends "ldt/ldt_raw_base.html" %}
-
+{% load absstatic %}
{% load i18n %} {# form of copy of project ldt #}
{% block css_import %}
{{ block.super }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' />
{% endblock %}
{% block body %}
<div id="add_contribution" class="span-12 last">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,7 @@
{% extends "ldt/ldt_utils/workspace_base.html" %}
{% load i18n %}
+{% load absstatic %}
+{% load absurl %}
{# form of creation of content #}
{% load adminmedia %}
@@ -8,11 +10,17 @@
{{ block.super }}
<script type="text/javascript" src="{{ADMIN_MEDIA_PREFIX}}js/core.js" ></script>
<script type="text/javascript" src="{{ADMIN_MEDIA_PREFIX}}js/jquery.init.js"></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.min.js"></script>
+ <script type="text/javascript" src="{{ADMIN_MEDIA_PREFIX}}js/jquery.min.js"></script>
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js"></script>
<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.textchange.min.js"></script>
<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery-ui.min.js"></script>
+ <script type="text/javascript" src="{% absurl ldt.jsi18n packages='ldt' %}" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.textchange.min.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery-ui.min.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/swfupload/swfupload.js" %}'></script>
+
{{ content_form.media.js }}
{% endblock %}
@@ -26,7 +34,7 @@
"{{cookie_name}}" : "{{session_key}}"};
onCreateContentReady("{% url ldt.ldt_utils.views.content.upload %}",
- "{{LDT_MEDIA_PREFIX}}",
+ '{% absstatic "ldt" %}',
post_added_params,
'{% trans "Browse" %}',
'{% trans "File uploaded" %}',
@@ -52,11 +60,11 @@
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/style.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/blueprint/screen.css" type="text/css" media="screen, projection" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/blueprint/print.css" type="text/css" media="print" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/workspace.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}'/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/style.css" %}'/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/blueprint/screen.css" %}' type="text/css" media="screen, projection" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/blueprint/print.css" %}' type="text/css" media="print" />
+ <link rel="stylesheet" href='{% absstatic "ldt//css/workspace.css" %}'type="text/css"/>
<link rel="stylesheet" href="{{ STATIC_URL }}chunked_uploads/css/chunked_upload.css" type="text/css"/>
@@ -81,7 +89,11 @@
{{ content_form.errors }}
<div id="add_content" class="span-18 last">
- <div class="projectscontentstitle">{% trans "Create content" %}</div>
+ {% if iri_id %}
+ <div class="projectscontentstitle">{% trans "Modify this content" %}</div>
+ {% else %}
+ <div class="projectscontentstitle">{% trans "Create content" %}</div>
+ {% endif %}
<form action="{{create_content_action}}" enctype="multipart/form-data" id="my_form" method="POST" enctype="multipart/form-data" >
<div id="contentformhidden">
@@ -107,18 +119,14 @@
<div>{{ content_form.media_input_type.errors }}{{ content_form.media_input_type.label_tag }}{{content_form.media_input_type}}</div>
<div id="media_fields_div">
<div id="media_field_link" class="media_fields">{{ content_form.media_obj.errors }}{{ content_form.media_obj.label_tag }}{{content_form.media_obj}}</div>
-
<div id="media_field_upload" class="media_fields">
- <input type="file" id="fileupload" name="files[]" accept="video/* wmv"/>
- </br>
- <button id="start_upload"><span>{% trans 'Start' %}</span></button>
- <button class="Stop"><span>{% trans 'Stop' %}</span></button>
- <button class="btn cancel" type="button"><span>{% trans 'Cancel' %}</span></button>
- <div class="bar grey stripes">
- <span class="progress" style="width: 0%"></span>
- </div>
+ {{ media_form.media_file.errors }}
+ {% comment %}{{ media_form.media_file.label_tag }}{{media_form.media_file}}{% endcomment %}
+ <div id="upload_btn"></div>
+ <input type="text" name="media-local_file_name" id="id_media-local_file_name" readonly/>
+ <div id="upload_progress_bar"></div>
+ <div id="upload_progress_info"></div>
</div>
-
<div id="media_field_url" class="media_fields">{{ media_form.external_src_url.errors }}{{ media_form.external_src_url.label_tag }}{{ media_form.external_src_url }}</div>
<div id="media_field_create" class="media_fields">{{ media_form.src.errors }}{{ media_form.src.label_tag }}{{ media_form.src }}</div>
</div>
@@ -135,10 +143,11 @@
{% endif %}
{% include "ldt/ldt_utils/partial/picture.html"%}
{% include "ldt/ldt_utils/partial/permissions.html" %}
+
<div id="submitcontent" class="span-18 last">
<div id="submitcontent-loader" class="span-10">
- <div id="submitcontent-loader-img" class="submitcontent-loader-content span-10 last"><img alt="loader" src="{{LDT_MEDIA_PREFIX}}img/ajax-loader-220x19.gif"/></div>
+ <div id="submitcontent-loader-img" class="submitcontent-loader-content span-10 last"><img alt="loader" src='{% absstatic "ldt/img/ajax-loader-220x19.gif" %}'/></div>
<div id="submitcontent-loader-msg" class="submitcontent-loader-content span-10 last">{% trans "media file is being processed please wait." %}</div>
<span> </span>
</div>
@@ -151,8 +160,4 @@
</form>
</div>
- <script type="text/javascript" src="{{ STATIC_URL }}chunked_uploads/js/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="{{ STATIC_URL }}chunked_uploads/js/jquery.iframe-transport.js"></script>
- <script type="text/javascript" src="{{ STATIC_URL }}chunked_uploads/js/jquery.fileupload.js"></script>
- <script type="text/javascript" src="{{ STATIC_URL }}chunked_uploads/js/main.js"></script>
{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_group.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_group.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,23 +1,25 @@
{% extends "ldt/ldt_utils/workspace_base.html" %}
{% load i18n %}
+{% load absstatic %}
+{% load absurl %}
{% load adminmedia %}
{% load thumbnail %}
{% block js_import %}
{{ block.super }}
- <script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/tiny_mce/tiny_mce.js"></script>
+ <script type="text/javascript" src="{% absurl ldt.jsi18n packages='ldt' %}" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}' ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/tiny_mce/tiny_mce.js" %}'></script>
{{ content_form.media.js }}
{% endblock %}
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' />
{% endblock %}
@@ -42,7 +44,7 @@
$( this ).find("button[type=submit]").removeClass("e-clicked");
});
- var search_url = "{% url ldt.ldt_utils.views.workspace.share_filter filter='__FILTER__' use_groups='false' %}";
+ var search_url = "{% absurl ldt.ldt_utils.views.workspace.share_filter filter='__FILTER__' use_groups='false' %}";
});
</script>
@@ -53,7 +55,7 @@
<div id="add_group" class="span-18 last">
<div class="projectscontentstitle span-18 last">{% if group_id %}{% trans "Update a group" %}{% else %}{% trans "Create a group" %}{% endif %}</div>
- <form action="{% if group_id %}{% url ldt.ldt_utils.views.group.update_group group_id %} {% else %}{% url ldt.ldt_utils.views.group.create_group %}{% endif %}" method="POST" enctype="multipart/form-data" {% if target_parent %}target="_parent"{% endif %}>
+ <form action="{% if group_id %}{% absurl ldt.ldt_utils.views.group.update_group group_id %} {% else %}{% absurl ldt.ldt_utils.views.group.create_group %}{% endif %}" method="POST" enctype="multipart/form-data" {% if target_parent %}target="_parent"{% endif %}>
{% csrf_token %}
<input type="hidden" name="form_status" value="{{form_status}}" id="project_form_status" />
<input type="hidden" name="id_group" value="" id="id_group"/>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,23 +1,23 @@
{% extends "ldt/ldt_raw_base.html" %}
-
+{% load absstatic %}
{% load i18n %} {# form of creation of content #}
{% load adminmedia %}
{% block js_import %}
{{ block.super }}
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.nyroModal.min.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.nyroModal.min.js" %}'></script>
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js"></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/tiny_mce/tiny_mce.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/tiny_mce/tiny_mce.js" %}'></script>
{{ content_form.media.js }}
{% endblock %}
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' />
{% endblock %}
{% block js_declaration %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,7 @@
{% load i18n %}
{% load thumbnail %}
+{% load absstatic %}
+{% load absurl %}
{% load analytics %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -24,7 +26,7 @@
<div>
<div id="{{ player_id }}_embed" class="iri_player_embed"></div>
- <script type="text/javascript" src="{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/metadataplayer/LdtPlayer-core.js" %}'></script>
<script type="text/javascript">
if (typeof jQuery == "undefined") {
@@ -33,14 +35,14 @@
var metadatas = {metadata: {url: '{{json_url}}'}};
var metadata_key = "metadata";
- IriSP.libFiles.defaultDir = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}js/";
- IriSP.libFiles.locations.jwPlayerSWF = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/player.swf";
- IriSP.libFiles.locations.recordMicSwf = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/record_mic.swf";
- IriSP.libFiles.locations.zeroClipboardSwf = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/ZeroClipboard10.swf";
- IriSP.libFiles.locations.cssjQueryUI = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/jq-css/themes/base/jquery-ui.css"
+ IriSP.libFiles.defaultDir = '{% absstatic "ldt/js/" %}';
+ IriSP.libFiles.locations.jwPlayerSWF = '{% absstatic "ldt/swf/player.swf" %}';
+ IriSP.libFiles.locations.recordMicSwf = '{% absstatic "ldt/swf/record_mic.swf" %}';
+ IriSP.libFiles.locations.zeroClipboardSwf = '{% absstatic "ldt/swf/ZeroClipboard10.swf" %}';
+ IriSP.libFiles.locations.cssjQueryUI = '{% absstatic "ldt/css/jq-css/themes/base/jquery-ui.css" %}';
IriSP.language = '{{LANGUAGE_CODE}}';
- IriSP.widgetsDir = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer";
+ IriSP.widgetsDir = '{% absstatic "ldt/metadataplayer" %}';
var _metadata = {
url: metadatas[metadata_key].url + '?callback=?',
format: 'ldt'
@@ -48,7 +50,7 @@
var _config = {
width: '{{ player_width }}',
container: '{{ player_id }}_embed',
- css: '{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.css',
+ css: '{% absstatic "ldt/metadataplayer/LdtPlayer-core.css" %}',
default_options: {
metadata: _metadata
},
@@ -119,9 +121,9 @@
{% if annotations_list %},{
type: "AnnotationsList",
container: "AnnotationsList_ext",
- ajax_url: "{{WEB_URL}}{% url segment_api_empty resource_name='segments' api_name='1.0' %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}",
+ ajax_url: "{% absurl segment_api_empty resource_name='segments' api_name='1.0' %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}",
ajax_granularity : 300000,
- default_thumbnail : "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/imgs/video_sequence.png",
+ default_thumbnail : '{% absstatic "ldt/css/imgs/video_sequence.png" %}',
show_audio: true,
rtmp_streamer: "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/"
}{% endif %},{
@@ -147,7 +149,7 @@
{% if createannotation %},{
type: "CreateAnnotation",
- api_endpoint_template: "{{WEB_URL}}{% url api_dispatch_list resource_name='annotations' api_name='1.0' %}",
+ api_endpoint_template: "{% absurl api_dispatch_list resource_name='annotations' api_name='1.0' %}",
api_method: "PUT",
after_send_timeout: 8000,
{% if tag_titles %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,13 +1,16 @@
{% extends "ldt/ldt_utils/workspace_base.html" %}
{% load i18n %}
{% load front_tags %}
+{% load absurl %}
+{% load static %}
+{% load absstatic %}
{% load analytics %}
{% block js_import %}
{{ block.super }}
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.min.js"></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.qtip.min.js"></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/embed_popup.js"></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jscolor/jscolor.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.min.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldtjs/jquery.qtip.min.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/embed_popup.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jscolor/jscolor.js" %}'></script>
{{ content_form.media.js }}
{% endblock %}
@@ -22,13 +25,21 @@
var player_id='{{player_id}}';
var translate_show="{% trans 'Show Player' %}";
var translate_hide="{% trans 'Hide Player' %}";
- var WEB_URL='{{WEB_URL}}';
- var LDT_MEDIA_PREFIX='{{LDT_MEDIA_PREFIX}}';
var LANGUAGE_CODE='{{LANGUAGE_CODE}}';
var json_url='{{json_url}}';
var player_id='{{player_id}}';
- var segment_api='{% url segment_api_empty resource_name="segments" api_name="1.0" %}';
+ var defaultDir='{% absstatic "ldt/js/" %}';
+ var jwPlayerSWF='{% absstatic "ldt/swf/player.swf" %}';
+ var recordMicSwf='{% absstatic "ldt/swf/record_mic.swf" %}';
+ var zeroClipboardSwf='{% absstatic "ldt/swf/ZeroClipboard10.swf" %}';
+ var cssjQueryUI='{% absstatic "ldt/css/jq-css/themes/base/jquery-ui.css" %}';
+ var widgetsDir='{% absstatic "ldt/metadataplayer" %}';
+ var configCss='{% absstatic "ldt/metadataplayer/LdtPlayer-core.css" %}';
+ var default_thumbnail='{% absstatic "ldt/css/imgs/video_sequence.png" %}';
+ var segment_api="{% absurl segment_api_empty resource_name='segments' api_name='1.0' %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}";
+ var LdtPlayer_core='{% absstatic "ldt/metadataplayer/LdtPlayer-core.js" %}';
var creator_name='{{request.user.username}}';
+
$j(document).ready(function(){
init_events();
});
@@ -38,10 +49,10 @@
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/style.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" type="text/css"/>
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/embed_popup.css" type="text/css"/>
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/jq-css/jquery.qtip.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/style.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}'/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/embed_popup.css" %}'/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/jq-css/jquery.qtip.css" %}' type="text/css"/>
{% endblock %}
@@ -79,8 +90,8 @@
</div>
<div id="player_size">
{% trans 'Player Size : ' %}
- <input type="text" class="number_area" id="player_width" onchange="put_new_code();"></input> x
- <input type="text" class="number_area" id="player_height" onchange="put_new_code();"></input>
+ <input type="text" class="number_area" id="player_width" onChange="put_new_code();"></input> x
+ <input type="text" class="number_area" id="player_height" onChange="put_new_code();"></input>
</div>
<a id="displayPreMode" class="OptionsEmbedDisplay">
<span id= "preModeExpArrow" class="expArrow"></span>
@@ -208,7 +219,7 @@
<a id="displayPlayer" href="javascript:toggle();">{% trans 'Show Player' %}</a>
<div id="player_div" style="display:none">
<button type="button" class="refresh_button" id="refresh_player_button" title="Rafraichir le player" >
- <img src="{{LDT_MEDIA_PREFIX}}img/arrow_refresh.png" id="refresh_player" ></img>
+ <img src='{% absstatic "ldt/img/arrow_refresh.png" %}' id="refresh_player" ></img>
</button>
<div class="ldt_player" id="wrapper_{{player_id}}"></div>
</div>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,17 +1,17 @@
{% extends "ldt/ldt_utils/workspace_base.html" %}
-
+{% load absstatic %}
{% load i18n %} {# form of creation of content #}
{% block js_import %}
{{ block.super }}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
{% endblock %}
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm_popup.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm_popup.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,18 +1,18 @@
{% extends "ldt/ldt_raw_base.html" %}
-
+{% load absstatic %}
{% load i18n %} {# form of creation of content #}
{% block js_import %}
{{ block.super }}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}' ></script>
{% endblock %}
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,10 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
-
+{% load absstatic %}
{% block js_import %}
{{block.super}}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}' ></script>
{% endblock %}
{% block js_declaration %}
@@ -82,7 +82,7 @@
{% block css_import %}
{{block.super}}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/workspace.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' type="text/css"/>
{% endblock %}
{% block content %}
@@ -91,13 +91,13 @@
<div class="span-12 last titlediv" >
<div class="span-8 projectscontentstitle">{% trans "My groups" %}
{% if can_add_group %}
- <a class="create_group" href="{% url ldt.ldt_utils.views.group.create_group %}"><img class='icon_title' src="{{LDT_MEDIA_PREFIX}}img/group_add.png" alt="{% trans 'Create group' %}" title="{% trans 'Create group' %}" /></a>
+ <a class="create_group" href="{% url ldt.ldt_utils.views.group.create_group %}"><img class='icon_title' src='{% absstatic "ldt/img/group_add.png" %}' alt="{% trans 'Create group' %}" title="{% trans 'Create group' %}" /></a>
{% endif %}
</div>
<div class="span-4 last searchfielddiv" >
<div class="span-4 last searchfielddiv" >
- <div class="searchfield rounded"><input id="searchgroupsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src="{{LDT_MEDIA_PREFIX}}/img/ajax-loader-16x16.gif" alt="loader"/><img id="projecsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}img/clear-left.png"/></div>
+ <div class="searchfield rounded"><input id="searchgroupsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src='{% absstatic "ldt/img/ajax-loader-16x16.gif" %}' alt="loader"/><img id="projecsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}'/></div>
</div>
</div>
</div>
@@ -109,7 +109,7 @@
<div class="span-12 last titlediv" >
<div class="span-8 projectscontentstitle" >{% trans "The group's projects" %}</div>
<div class="span-4 last searchfielddiv" >
- <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src="{{LDT_MEDIA_PREFIX}}/img/ajax-loader-16x16.gif" alt="loader"/><img id="projecsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}img/clear-left.png"/></div>
+ <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src='{% absstatic "ldt/img/ajax-loader-16x16.gif" %}' alt="loader"/><img id="projecsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}' /></div>
</div>
</div>
<div class="span-12 last projectscontentsdiv" id="projectslistcontainer">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/init_ldt.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/init_ldt.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,3 +1,4 @@
+{% load absstatic %}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -6,10 +7,10 @@
<meta http-equiv="Cache" content="no store" />
<meta http-equiv="Expires" content="-1" />
<title>Ligne de Temps - IRI</title>
-<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.min.js"></script>
-<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.nyroModal.min.js"></script>
+<script type="text/javascript" src='{% absstatic "ldt/js/jquery.min.js" %}'></script>
+<script type="text/javascript" src='{% absstatic "ldt/js/jquery.nyroModal.min.js" %}'></script>
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
-<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js"></script>
+<script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
<script type="text/javascript">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/ldt_list.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/ldt_list.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,10 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
-
+{% load absstatic %}
{% block js_import %}
{{block.super}}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}' ></script>
{% endblock %}
@@ -68,7 +68,7 @@
{% block css_import %}
{{block.super}}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/workspace.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' type="text/css"/>
{% endblock %}
{% block content %}
@@ -77,7 +77,7 @@
<div class="span-12 last titlediv" >
<div class="span-8 projectscontentstitle" >{% trans "project list" %}</div>
<div class="span-4 last searchfielddiv" >
- <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" value="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src="{{LDT_MEDIA_PREFIX}}/img/ajax-loader-16x16.gif"/><img id="projectsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}/img/clear-left.png"/></div>
+ <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" value="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src='{% absstatic "ldt/img/ajax-loader-16x16.gif" %}'/><img id="projectsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}'/></div>
</div>
</div>
<div class="span-12 last projectscontentsdiv" id="projectslistcontainer">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/loading.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/loading.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,3 +1,4 @@
+{% load absstatic %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml version="1.0" encoding="UTF-8"?>
@@ -20,7 +21,7 @@
<body>
<div class="center">
<div><img alt="loading"
- src="{{LDT_MEDIA_PREFIX}}img/loadingAnimation.gif" /></div>
+ src='{% absstatic "ldt/img/loadingAnimation.gif" %}' /></div>
</div>
</body>
</html>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,6 +1,7 @@
{% load i18n %}
{% load thumbnail %}
{% load front_tags %}
+{% load absstatic %}
<ul class="prev_next_cont_proj" >
<li id="content_tags_li"><span id="content_tags" class="clickable">{% if tag_cloud|length > 0 %}{% trans 'All categories' %}{% endif %}</span>{% if current_content_tag %}{% if current_content_tag != "" %} > {{current_content_tag}} <span id="no_content_tag" class="clickable">[x]</span>{% endif %}{% endif %}</li>
@@ -25,8 +26,8 @@
<tbody class="projectscontentsbody">
{% for content in contents %}
<tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%}">
- <td class="cellimg"><div class="cellimgdiv"><img src="{{LDT_MEDIA_PREFIX}}/img/page_add.png" title="{% trans 'create project' %}" alt="{% trans 'create project' %}" href="{% url ldt.ldt_utils.views.project.create_project content.iri_id %}" class="ldt_link_create_project"/></div></td>
- <td class="cellimg"><div class="cellimgdiv"><img alt="{% trans 'preview media'%}" title="{% trans 'preview media'%}" src="{{LDT_MEDIA_PREFIX}}/img/control_play.png" href="{% url ldt.ldt_utils.views.lignesdetemps.index content.iri_id %}" class="ldt_link_open_ldt"/></div></td>
+ <td class="cellimg"><div class="cellimgdiv"><img src='{% absstatic "ldt/img/page_add.png" %}' title="{% trans 'create project' %}" alt="{% trans 'create project' %}" href="{% url ldt.ldt_utils.views.project.create_project content.iri_id %}" class="ldt_link_create_project"/></div></td>
+ <td class="cellimg"><div class="cellimgdiv"><img alt="{% trans 'preview media'%}" title="{% trans 'preview media'%}" src='{% absstatic "ldt/img/control_play.png" %}' href="{% url ldt.ldt_utils.views.lignesdetemps.index content.iri_id %}" class="ldt_link_open_ldt"/></div></td>
<td>{% thumbnail content.image "50x50" format="PNG" crop="top" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">{% endthumbnail %}</td>
<td class="contenttitle"><a {% if content.change %} class="contenttitlelink infostooltip" href="{% url ldt.ldt_utils.views.content.write_content iri_id=content.iri_id %}" data-title="{{ content.title}}" data-desc="{{ content.description }}" {% else %} class="contenttitlelink qtiplink" title="{% trans "You can't edit this content" %}" {% endif %}>{{ content.title|default:"_" }}</a></td>
</tr>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,12 @@
{% spaceless %}
{% load i18n %}
+{% load absurl %}
+{% load absstatic %}
{% load thumbnail %}
<div>
<div id="{{ player_id }}_embed" class="iri_player_embed">
</div>
-<script type="text/javascript" src="{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.js"></script>
+<script type="text/javascript" src='{% absstatic "ldt/metadataplayer/LdtPlayer-core.js" %}'></script>
<script type="text/javascript">
if (typeof jQuery == "undefined") {
@@ -13,14 +15,14 @@
var metadatas = {metadata: {url: '{{json_url}}'}};
var metadata_key = "metadata";
-IriSP.libFiles.defaultDir = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}js/";
-IriSP.libFiles.locations.jwPlayerSWF = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/player.swf";
-IriSP.libFiles.locations.recordMicSwf = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/record_mic.swf";
-IriSP.libFiles.locations.zeroClipboardSwf = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/ZeroClipboard10.swf";
-IriSP.libFiles.locations.cssjQueryUI = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/jq-css/themes/base/jquery-ui.css"
+IriSP.libFiles.defaultDir = '{% absstatic "ldt/js/" %}';
+IriSP.libFiles.locations.jwPlayerSWF = '{% absstatic "ldt/swf/player.swf" %}';
+IriSP.libFiles.locations.recordMicSwf = '{% absstatic "ldt/swf/record_mic.swf" %}';
+IriSP.libFiles.locations.zeroClipboardSwf = '{% absstatic "ldt/swf/ZeroClipboard10.swf" %}';
+IriSP.libFiles.locations.cssjQueryUI = '{% absstatic "ldt/css/jq-css/themes/base/jquery-ui.css" %}';
IriSP.language = '{{LANGUAGE_CODE}}';
-IriSP.widgetsDir = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer";
+IriSP.widgetsDir = '{% absstatic "ldt/metadataplayer" %}';
var _metadata = {
url: metadatas[metadata_key].url,
format: 'ldt'
@@ -28,7 +30,7 @@
var _config = {
width: '{{ player_width }}',
container: '{{ player_id }}_embed',
- css: '{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.css',
+ css: '{% absstatic "ldt/metadataplayer/LdtPlayer-core.css" %}',
default_options: {
metadata: _metadata
},
@@ -66,9 +68,9 @@
},{
type: "AnnotationsList",
container: "AnnotationsList_ext",
- ajax_url: "{{WEB_URL}}{% url segment_api_empty resource_name='segments' api_name='1.0' %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}",
+ ajax_url: "{% absurl segment_api_empty resource_name='segments' api_name='1.0' %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}",
ajax_granularity : 300000,
- default_thumbnail : "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/imgs/video_sequence.png",
+ default_thumbnail : '{% absstatic "ldt/css/imgs/video_sequence.png" %}',
show_audio: true,
rtmp_streamer: "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/"
},{
@@ -86,7 +88,7 @@
hide_timeout: 5000
},{
type: "CreateAnnotation",
- api_endpoint_template: "{{WEB_URL}}{% url api_dispatch_list resource_name='annotations' api_name='1.0' %}",
+ api_endpoint_template: "{% absurl api_dispatch_list resource_name='annotations' api_name='1.0' %}",
after_send_timeout: 8000,
show_mic_record: {% if show_mic_record %}true{% else %}false{% endif %},
close_after_send: false,
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_seo_meta.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_seo_meta.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,3 +1,4 @@
+{% load absurl %}
{% spaceless %}
-<link rel="meta" href="{{WEB_URL}}{% url ldt.ldt_utils.views.rdf.project_annotations_rdf ldt_id=ldt_id %}"/>
+<link rel="meta" href="{% absurl ldt.ldt_utils.views.rdf.project_annotations_rdf ldt_id=ldt_id %}"/>
{% endspaceless %}
\ No newline at end of file
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/groupslist.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/groupslist.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,21 +1,36 @@
{% load i18n %}
{% load thumbnail %}
+{% load absstatic %}
+{% load static %}
<script type="text/javascript">
$(document).ready(function () {
var icon_size = 16;
$(".editable").each(function () {
- var img = $('<img src="{{LDT_MEDIA_PREFIX}}img/pencil.png"/>');
+ var src='{% absstatic "ldt/img/pencil.png" %}';
+ var img = $('<img src='+src+' id="pencil_img" >');
var top = $(this).offset().top + $(this).height() - icon_size;
var left = $(this).offset().left + $(this).width() - icon_size;
img.css({'position' : 'absolute',
'top': top,
- 'left': left});
+ 'left' : left});
$(this).after(img);
});
-
});
+
+ $(window).resize(function(){
+ var icon_size = 16;
+ $(".editable").each(function () {
+ img=$(this).next();
+ var top = $(this).offset().top + $(this).height() - icon_size;
+ var left = $(this).offset().left + $(this).width() - icon_size;
+ img.css({'position' : 'absolute',
+ 'top': top,
+ 'left' : left});
+ });
+ });
+
</script>
<div class="projectscontentsheader projectcontentsheadertitle span-12 last" id="contentsheader">
@@ -42,7 +57,7 @@
<td>{{ group.name }}</td>
{% endif %}
- <td class="align_right"><img src="{{LDT_MEDIA_PREFIX}}/img/control_play.png" class="next_icon"/></td>
+ <td class="align_right"><img src='{% absstatic "ldt/img/control_play.png" %}' class="next_icon"/></td>
</tr>
{% endfor %}
@@ -54,7 +69,7 @@
</td>
<td>{% trans "Projects shared with me only" %}</td>
- <td class="align_right"><img src="{{LDT_MEDIA_PREFIX}}/img/control_play.png" class="next_icon"/></td>
+ <td class="align_right"><img src='{% absstatic "ldt/img/control_play.png" %}' class="next_icon"/></td>
</tr>
{% endif %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/ldt_div.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/ldt_div.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,7 +1,9 @@
+{% load absurl %}
+{% load absstatic %}
{% comment %}
Yes we include swfobject.js in the middle of the page...
{% endcomment %}
-<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/swfobject.js"></script>
+<script type="text/javascript" src='{% absstatic "ldt/js/swfobject.js" %}'></script>
<div id="ldtInit" name="ldtInit" style="background-color: #00FF00; width: 1201px; height: 831px; left: 100px; top: 100px; z-index: 99999999; margin: 0; padding: 0;"> </div>
<script language="JavaScript" type="text/javascript">
@@ -27,14 +29,14 @@
{% else %}
readOnly:'true',
{% endifequal %}
- segmentPassMask:"{{WEB_URL}}{% url ldt.ldt_utils.views.lignesdetemps.index_segment '{4}' '{0}' '{1}' '{2}' '{3}' %}",
- simplePlayerPassMask:"{{WEB_URL}}{% url ldt.ldt_utils.views.front.annot_content '{0}' '{4}' '{2}' %}#id={3}"
+ segmentPassMask:"{% absurl ldt.ldt_utils.views.lignesdetemps.index_segment '{4}' '{0}' '{1}' '{2}' '{3}' %}",
+ simplePlayerPassMask:"{% absurl ldt.ldt_utils.views.front.annot_content '{0}' '{4}' '{2}' %}#id={3}"
};
var attributes = { id: "ldtInitSwf", name: "ldtInitSwf"};
- swfobject.embedSWF("{{LDT_MEDIA_PREFIX}}swf/ldt/LignesDeTempsFlex.swf", "ldtInit", "1000", "630", "10.2.0", "{{LDT_MEDIA_PREFIX}}swf/expressInstall.swf", flashvars, params, attributes);
+ swfobject.embedSWF('{% absstatic "ldt/swf/ldt/LignesDeTempsFlex.swf" %}', "ldtInit", "1000", "630", "10.2.0", '{% absstatic "ldt/swf/expressInstall.swf" %}', flashvars, params, attributes);
</script>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,6 +1,7 @@
{% load i18n %}
+{% load absstatic %}
-<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery-ui.min.js"></script>
+<script type="text/javascript" src='{% absstatic "ldt/js/jquery-ui.min.js" %}'></script>
<script type="text/javascript">
function init_events() {
@@ -17,8 +18,8 @@
}
$(document).ready(function() {
- var can_edit = '{{LDT_MEDIA_PREFIX}}img/pencil.png';
- var can_view = '{{LDT_MEDIA_PREFIX}}img/eye.png';
+ var can_edit = '{% absstatic "ldt/img/pencil.png" %}';
+ var can_view = '{% absstatic "ldt/img/eye.png" %}';
{% if group_edition %}
var search_url = "{% url ldt.ldt_utils.views.workspace.share_filter filter='__FILTER__' use_groups='false' %}";
@@ -75,8 +76,9 @@
selection.each(function () {
var id_item = $("input",$(this)).val();
+ var eye_img = '{% absstatic "ldt/img/eye.png" %}';
$("#read").append('<input type="hidden" name="read_list" value="' + id_item + '"/>');
- $("td:last",$(this)).append('<img class="can_view" src="{{LDT_MEDIA_PREFIX}}img/eye.png" title="{% trans "share.eye" %}" alt="{% trans "share.eye" %}"/>');
+ $("td:last",$(this)).append('<img class="can_view" src="'+eye_img+'" title="{% trans "share.eye" %}" alt="{% trans "share.eye" %}"/>');
});
});
@@ -107,7 +109,7 @@
{% if not group_edition %}
<div id="shareproject" class="clear dropdownlist">
-<img class="shareicon" src="{{LDT_MEDIA_PREFIX}}img/user_add.png" />{% trans "share" %}
+<img class="shareicon" src='{% absstatic "ldt/img/user_add.png" %}' />{% trans "share" %}
</div>
{% endif %}
@@ -129,8 +131,8 @@
{% trans "User and group list" %}<br />
<div class="searchfield span-4">
<input type="text" name="search" id="searchuserinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}"/>
- <img id="projectsajaxloader" class="searchajaxloader" src="{{LDT_MEDIA_PREFIX}}/img/ajax-loader-16x16.gif" alt="loader"/>
- <img id="projecsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}img/clear-left.png"/>
+ <img id="projectsajaxloader" class="searchajaxloader" src='{% absstatic "ldt/img/ajax-loader-16x16.gif" %}' alt="loader"/>
+ <img id="projecsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}'/>
</div>
</div><br /><br />
@@ -141,13 +143,13 @@
</div>
<div id="elemslistfooter">
- <a href="#" id="selectallitems" title="{% trans "select all displayed elements" %}"><img class="shareicon" src="{{LDT_MEDIA_PREFIX}}img/user_go.png" title="{% trans "select all displayed elements" %}"/>{% trans "select all displayed elements" %}</a>
+ <a href="#" id="selectallitems" title="{% trans "select all displayed elements" %}"><img class="shareicon" src='{% absstatic "ldt/img/user_go.png" %}' title="{% trans "select all displayed elements" %}"/>{% trans "select all displayed elements" %}</a>
</div>
</div>
<div id="selectors">
- <a href="#" id="selectelems"><img src="{{LDT_MEDIA_PREFIX}}img/to-right.gif" title="{% trans "select users" %}"></a><br />
- <a href="#" id="removeelems"><img src="{{LDT_MEDIA_PREFIX}}img/to-left.gif" title="{% trans "remove users" %}"></a>
+ <a href="#" id="selectelems"><img src='{% absstatic "ldt/img/to-right.gif" %}' title="{% trans "select users" %}"></a><br />
+ <a href="#" id="removeelems"><img src='{% absstatic "ldt/img/to-left.gif" %}' title="{% trans "remove users" %}"></a>
</div>
{% if media_form %}
<br /> <br />
@@ -164,18 +166,18 @@
<tr class="shareline">
<td style="width: 5%;">
{% if elem.type == "user" %}
- <img src="{{LDT_MEDIA_PREFIX}}img/user.png" alt="{% trans "user" %}"/>
+ <img src='{% absstatic "ldt/img/user.png" %}' alt="{% trans "user" %}"/>
{% else %}
- <img src="{{LDT_MEDIA_PREFIX}}img/group.png" alt="{% trans "group" %}"/>
+ <img src='{% absstatic "ldt/img/group.png" %}' alt="{% trans "group" %}"/>
{% endif %}
</td>
<td style="width: 95%;">{{ elem.name }}</td>
<td>
{% if elem.change %}
- <img class="can_edit" src="{{LDT_MEDIA_PREFIX}}img/pencil.png" alt="{% trans "share.pencil" %}" />
+ <img class="can_edit" src='{% absstatic "ldt/img/pencil.png" %}' alt="{% trans "share.pencil" %}" />
{% else %}
- <img class="can_view" src="{{LDT_MEDIA_PREFIX}}img/eye.png" alt="{% trans "share.eye" %}" />
+ <img class="can_view" src='{% absstatic "ldt/img/eye.png" %}' alt="{% trans "share.eye" %}" />
{% endif %}
</td>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/picture.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/picture.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,6 +1,6 @@
{% load i18n %}
{% load thumbnail %}
-
+{% load absstatic %}
<script type="text/javascript">
$(document).ready(function () {
@@ -13,7 +13,7 @@
</script>
<div class="clear dropdownlist">
-<img class="shareicon" title="{% trans "choose a profile image" %}" src="{{LDT_MEDIA_PREFIX}}img/zoom_in.png"/>
+<img class="shareicon" title="{% trans "choose a profile image" %}" src='{% absstatic "ldt/img/zoom_in.png" %}'/>
{% trans "choose a profile image" %}
</div>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,6 @@
{% load i18n %}
{% load thumbnail %}
+{% load absstatic %}
{% load front_tags %}
{% if nb_pj_pages %}
@@ -21,33 +22,33 @@
{% if is_gecko %}
<td class="cellimg"><div class="cellimgdiv"><a href="{% url index_project_full project.ldt_id %}">
{% if project.change and project.state != 2 %}
- <img src="{{LDT_MEDIA_PREFIX}}img/page_edit.png" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
+ <img src='{% absstatic "ldt/img/page_edit.png" %}' alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
{% else %}
- <img src="{{LDT_MEDIA_PREFIX}}img/page_eye.png" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
+ <img src='{% absstatic "ldt/img/page_eye.png" %}' alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
{% endif %}
</a></div></td>
{% else %}
<td class="cellimg"><div class="cellimgdiv"><a href="{% url index_project project.ldt_id %}" class="ldt_link_open_ldt">
{% if project.change and project.state != 2 %}
- <img src="{{LDT_MEDIA_PREFIX}}img/page_edit.png" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
+ <img src='{% absstatic "ldt/img/page_edit.png" %}' alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
{% else %}
- <img src="{{LDT_MEDIA_PREFIX}}img/page_eye.png" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
+ <img src='{% absstatic "ldt/img/page_eye.png" %}' alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/>
{% endif %}
</a></div></td>
{% endif %}
- <td class="cellimg"><div class="cellimgdiv"><img src="{{LDT_MEDIA_PREFIX}}img/page_copy.png" href="{% url ldt.ldt_utils.views.project.copy_project project.ldt_id group_id %}" class="ldt_link_copy_project" alt="{% trans 'copy project' %}" title="{% trans 'copy project' %}"/></div></td>
+ <td class="cellimg"><div class="cellimgdiv"><img src='{% absstatic "ldt/img/page_copy.png" %}' href="{% url ldt.ldt_utils.views.project.copy_project project.ldt_id group_id %}" class="ldt_link_copy_project" alt="{% trans 'copy project' %}" title="{% trans 'copy project' %}"/></div></td>
<td class="cellimg"><div class="cellimgdiv">
<a href='{% url ldt.ldt_utils.views.workspace.popup_embed %}?json_url={{WEB_URL}}{{json_url_id}}&player_id=player_project_{{project.ldt_id}}&ldt_id={{project.ldt_id}}'>
- <img src="{{LDT_MEDIA_PREFIX}}img/plugin.png" id="player_project_{{project.ldt_id}}" class="ldt_link_embed" alt="{% trans 'link json by id' %}" title="{% trans 'link json by id' %}"/></div>
+ <img src='{% absstatic "ldt/img/plugin.png" %}' id="player_project_{{project.ldt_id}}" class="ldt_link_embed" alt="{% trans 'link json by id' %}" title="{% trans 'link json by id' %}"/></div>
</a>
</td>
<td class="cellimg">
{% ifequal project.state 2 %}
- <img src="{{LDT_MEDIA_PREFIX}}img/icon-yes.gif" {% if project.change %} alt="{% trans 'Project published, click to unpublish' %}" title="{% trans 'Project published, click to unpublish' %}" class="publishedproject qtiplink" {% else %} class="qtiplink" title="{% trans "You are not allowed to change this project" %}"{% endif %} id="project_{{project.ldt_id}}" /></div>
+ <img src='{% absstatic "ldt/img/icon-yes.gif" %}' {% if project.change %} alt="{% trans 'Project published, click to unpublish' %}" title="{% trans 'Project published, click to unpublish' %}" class="publishedproject qtiplink" {% else %} class="qtiplink" title="{% trans "You are not allowed to change this project" %}"{% endif %} id="project_{{project.ldt_id}}" /></div>
{% else %}
- <img src="{{LDT_MEDIA_PREFIX}}img/icon-no.gif" {% if project.change %} alt="{% trans 'Project not published, click to publish' %}" title="{% trans 'Project not published, click to publish' %}" class="unpublishedproject qtiplink" {% else %} class="qtiplink" title="{% trans "You are not allowed to change this project" %}"{% endif %}id="project_{{project.ldt_id}}" />
+ <img src='{% absstatic "ldt/img/icon-no.gif" %}' {% if project.change %} alt="{% trans 'Project not published, click to publish' %}" title="{% trans 'Project not published, click to publish' %}" class="unpublishedproject qtiplink" {% else %} class="qtiplink" title="{% trans "You are not allowed to change this project" %}"{% endif %}id="project_{{project.ldt_id}}" />
{% endifequal %}
</td>
<td>{% thumbnail project.image "50x50" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />{% empty %} {% endthumbnail %}</td>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,6 +1,7 @@
{% load i18n %}
{% load thumbnail %}
{% load front_tags %}
+{% load absstatic %}
{% if nb_pj_pages %}
<ul class="prev_next_cont_proj" >
@@ -18,14 +19,14 @@
<tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%}" >
{% url ldt.ldt_utils.views.json.project_json_id project.ldt_id as json_url_id %}
{% if is_gecko %}
- <td class="cellimg"><div class="cellimgdiv"><a href="{% url index_project_full project.ldt_id %}"><img src="{{LDT_MEDIA_PREFIX}}img/page_eye.png" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/></a></div></td>
+ <td class="cellimg"><div class="cellimgdiv"><a href="{% url index_project_full project.ldt_id %}"><img src='{% absstatic "ldt/img/page_eye.png" %}' alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/></a></div></td>
{% else %}
- <td class="cellimg"><div class="cellimgdiv"><a href="{% url index_project project.ldt_id %}" class="ldt_link_open_ldt"><img src="{{LDT_MEDIA_PREFIX}}img/page_eye.png" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/></a></div></td>
+ <td class="cellimg"><div class="cellimgdiv"><a href="{% url index_project project.ldt_id %}" class="ldt_link_open_ldt"><img src='{% absstatic "ldt/img/page_eye.png" %}' alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/></a></div></td>
{% endif %}
- <td class="cellimg"><div class="cellimgdiv"><img src="{{LDT_MEDIA_PREFIX}}img/page_copy.png" href="{% url ldt.ldt_utils.views.project.copy_project project.ldt_id %}" class="ldt_link_copy_project" alt="{% trans 'copy the project' %}" title="{% trans 'copy the project' %}"/></div></td>
- <td class="cellimg"><div class="cellimgdiv"><img src="{{LDT_MEDIA_PREFIX}}img/plugin.png" href="{{WEB_URL}}{{json_url_id}}" id="player_project_{{project.ldt_id}}" class="ldt_link_embed" alt="{% trans 'link json by id' %}" title="{% trans 'link json by id' %}"/></div></td>
+ <td class="cellimg"><div class="cellimgdiv"><img src='{% absstatic "ldt/img/page_copy.png" %}' href="{% url ldt.ldt_utils.views.project.copy_project project.ldt_id %}" class="ldt_link_copy_project" alt="{% trans 'copy the project' %}" title="{% trans 'copy the project' %}"/></div></td>
+ <td class="cellimg"><div class="cellimgdiv"><img src='{% absstatic "ldt/img/plugin.png" %}' href="{{WEB_URL}}{{json_url_id}}" id="player_project_{{project.ldt_id}}" class="ldt_link_embed" alt="{% trans 'link json by id' %}" title="{% trans 'link json by id' %}"/></div></td>
<td class="cellimg">
- <img src="{{LDT_MEDIA_PREFIX}}img/icon-yes.gif" alt="{% trans 'Project published' %}" id="project_{{project.ldt_id}}" />
+ <img src='{% absstatic "ldt/img/icon-yes.gif" %}' alt="{% trans 'Project published' %}" id="project_{{project.ldt_id}}" />
</td>
<td>{% thumbnail project.image "50x50" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />{% empty %} {% endthumbnail %}</td>
<td class="projecttitle">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/sharewith.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/sharewith.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,12 +1,12 @@
{% load i18n %}
-
+{% load absstatic %}
{% for res in elem_list %}
<tr class="shareline">
<td class="firstcolsharetable">
{% if res.type == "user" %}
- <img src="{{LDT_MEDIA_PREFIX}}img/user.png" alt="{% trans "user" %}"/>
+ <img src='{% absstatic "ldt/img/user.png" %}' alt="{% trans "user" %}"/>
{% else %}
- <img src="{{LDT_MEDIA_PREFIX}}img/group.png" alt={% trans "group" %}"/>
+ <img src='{% absstatic "ldt/img/group.png" %}' alt={% trans "group" %}"/>
{% endif %}
</td>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,10 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
-
+{% load absstatic %}
{% block js_import %}
{{block.super}}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}' ></script>
{% endblock %}
{% block js_declaration %}
@@ -43,7 +43,7 @@
{% block css_import %}
{{block.super}}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/workspace.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' type="text/css"/>
{% endblock %}
{% block content %}
@@ -65,9 +65,9 @@
<div class="span-12 last" id="projectsdiv">
<div class="span-12 last titlediv" >
<div class="span-8 projectscontentstitle" >{% trans "Published projects" %}
- <a class='ldt_link_create_project' href="{% url ldt.ldt_utils.views.project.create_ldt_view %}" ><img class='icon_title' src="{{LDT_MEDIA_PREFIX}}img/page_add_large.png" alt="{% trans 'Create project' %}" title="{% trans 'Create project' %}" /></a></div>
+ <a class='ldt_link_create_project' href="{% url ldt.ldt_utils.views.project.create_ldt_view %}" ><img class='icon_title' src='{% absstatic "ldt/img/page_add_large.png" %}' alt="{% trans 'Create project' %}" title="{% trans 'Create project' %}" /></a></div>
<div class="span-4 last searchfielddiv" >
- <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src="{{LDT_MEDIA_PREFIX}}/img/ajax-loader-16x16.gif" alt="loader"/><img id="projecsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}img/clear-left.png"/></div>
+ <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src='{% absstatic "ldt/img/ajax-loader-16x16.gif" %}' alt="loader"/><img id="projecsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}'/></div>
</div>
</div>
<div class="span-12 last projectscontentsdiv" id="projectslistcontainer">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,18 +1,18 @@
{% extends "ldt/ldt_utils/workspace_base.html" %}
-
+{% load absstatic %}
{% load i18n %} {# form of creation of content #}
{% block js_import %}
{{ block.super }}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
{% endblock %}
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm_popup.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/reset_confirm_popup.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,18 +1,18 @@
{% extends "ldt/ldt_raw_base.html" %}
-
+{% load absstatic %}
{% load i18n %} {# form of creation of content #}
{% block js_import %}
{{ block.super }}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
{% endblock %}
{% block css_import %}
{{ block.super }}
{{ content_form.media.css }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
{% endblock %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_form.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_form.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,6 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
+{% load absurl %}
{% block js_declaration %}
<script type="text/javascript">
@@ -20,7 +21,7 @@
{% block content %}
<form method="post" id="my_form"
- {% comment %}action="{{WEB_URL}}{% url ldt.ldt_utils.views.workspace.search_index %}"{% endcomment %}
+ {% comment %}action="{% absurl ldt.ldt_utils.views.workspace.search_index %}"{% endcomment %}
action="{% url ldt.ldt_utils.views.workspace.search_index %}"
accept-charset="utf-8">
{% csrf_token %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,15 +1,15 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
-
+{% load absstatic %}
{% block js_import %}
{{ block.super }}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
{% endblock %}
{% block css_import %}
{{ block.super }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' />
<style type="text/css">
.titleresults {
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,10 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
-
+{% load absstatic %}
{% block js_import %}
{{block.super}}
<script type="text/javascript" src="{% url ldt.jsi18n packages='ldt' %}" ></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/projectscontents.js" %}'></script>
{% endblock %}
@@ -42,7 +42,7 @@
{% block css_import %}
{{block.super}}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/workspace.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt//css/workspace.css" %}' type="text/css"/>
{% endblock %}
{% block content %}
@@ -50,12 +50,12 @@
<div class="span-12" id="contentsdiv">
<div class="span-12 last titlediv" >
<div class="span-8 projectscontentstitle">{% trans "content list" %}
- <a class='content_link_create' href="{% url ldt.ldt_utils.views.content.write_content %}" ><img class='icon_title' src="{{LDT_MEDIA_PREFIX}}img/film_add.png" alt="{% trans 'Create content' %}" title="{% trans 'Create content' %}" /></a></div>
+ <a class='content_link_create' href="{% url ldt.ldt_utils.views.content.write_content %}" ><img class='icon_title' src='{% absstatic "ldt/img/film_add.png" %}' alt="{% trans 'Create content' %}" title="{% trans 'Create content' %}" /></a></div>
<div class="span-4 last searchfielddiv" >
<div class="searchfield rounded">
<input id="searchcontentsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" />
- <img id="contentsajaxloader" class="searchajaxloader" src="{{LDT_MEDIA_PREFIX}}/img/ajax-loader-16x16.gif" alt="loader"/>
- <img id="contentsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}img/clear-left.png"/>
+ <img id="contentsajaxloader" class="searchajaxloader" src='{% absstatic "ldt//img/ajax-loader-16x16.gif" %}' alt="loader"/>
+ <img id="contentsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}' />
</div>
</div>
</div>
@@ -66,9 +66,9 @@
<div class="span-12 last" id="projectsdiv">
<div class="span-12 last titlediv" >
<div class="span-8 projectscontentstitle" >{% trans "My projects" %}
- <a class='ldt_link_create_project' href="{% url ldt.ldt_utils.views.project.create_ldt_view %}" ><img class='icon_title' src="{{LDT_MEDIA_PREFIX}}img/page_add_large.png" alt="{% trans 'Create project' %}" title="{% trans 'Create project' %}" /></a></div>
+ <a class='ldt_link_create_project' href="{% url ldt.ldt_utils.views.project.create_ldt_view %}" ><img class='icon_title' src='{% absstatic "ldt/img/page_add_large.png" %}' alt="{% trans 'Create project' %}" title="{% trans 'Create project' %}" /></a></div>
<div class="span-4 last searchfielddiv" >
- <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src="{{LDT_MEDIA_PREFIX}}/img/ajax-loader-16x16.gif" alt="loader"/><img id="projecsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}img/clear-left.png"/></div>
+ <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src='{% absstatic "ldt//img/ajax-loader-16x16.gif" %}' alt="loader"/><img id="projecsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}'/></div>
</div>
</div>
<div class="span-12 last projectscontentsdiv" id="projectslistcontainer">
--- a/src/ldt/ldt/ldt_utils/urls.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/urls.py Fri Dec 14 15:12:39 2012 +0100
@@ -34,7 +34,7 @@
url(r'^filtergroups/_(?P<filter>[\w\%\_\-\+]*?)/$', "views.group.groups_filter",),
url(r'filtershare/_(?P<filter>[\w\%\_\-\+]*?)/(?P<use_groups>true|false)$', "views.workspace.share_filter"),
url(r'^embedpopup/?$', "views.workspace.popup_embed"),
- url(r'^embediframe/?$', "views.workspace.iframe_embed"),
+ url(r'^embediframe/?$', "views.workspace.iframe_embed", name="embediframe_page"),
url(r'^segment/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.lignesdetemps.index_segment'),
url(r'^segmentInit/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.lignesdetemps.init_segment'),
url(r'^segmentLdt/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.lignesdetemps.ldt_segment'),
--- a/src/ldt/ldt/ldt_utils/utils.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/utils.py Fri Dec 14 15:12:39 2012 +0100
@@ -7,6 +7,8 @@
import lxml.etree #@UnresolvedImport
import uuid
from ldt.utils.url import request_with_auth
+from ldt.utils.url import absurl_norequest
+import logging
__BOOLEAN_DICT = {
'false':False,
@@ -145,12 +147,11 @@
elementFiles = lxml.etree.SubElement(iri, 'files')
elementInit = lxml.etree.SubElement(elementFiles, 'init')
- elementfile = lxml.etree.SubElement(elementInit, 'file')
-
- elementfile.set('src', settings.WEB_URL + django.core.urlresolvers.reverse(method, args=url))
+ elementfile = lxml.etree.SubElement(elementInit, 'file')
+ elementfile.set('src', absurl_norequest(method, args=url))
elementfile.set('src', django.core.urlresolvers.reverse(method, args=url))
if(search):
- elementfile.set("segsel", settings.WEB_URL + django.core.urlresolvers.reverse(search, args=url))
+ elementfile.set("segsel", absurl_norequest(search, args=url))
lxml.etree.SubElement(elementFiles, 'recent')
lxml.etree.SubElement(elementFiles, 'library')
--- a/src/ldt/ldt/ldt_utils/views/front.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/front.py Fri Dec 14 15:12:39 2012 +0100
@@ -1,6 +1,5 @@
from django.conf import settings
from django.contrib.auth.models import Group, User
-from django.http import HttpResponseRedirect
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response
@@ -10,7 +9,8 @@
from ldt.ldt_utils.forms import SearchForm
from ldt.ldt_utils.views.content import get_content_tags
from ldt.ldt_utils.views.workspace import get_search_results
-from tagging.models import Tag, TaggedItem
+from tagging.models import TaggedItem
+from ldt.utils.url import absstatic
import base64
@@ -143,7 +143,9 @@
search = ''
field = 'all'
content_tag = None
-
+ colorurl=absstatic(request, "ldt/swf/ldt/pkg/color.xml")
+ i18nurl=absstatic(request, "ldt/swf/ldt/pkg/i18n")
+ baseurl=absstatic(request, "ldt/swf/ldt/")
sform = SearchForm(request.GET)
if sform.is_valid():
search = sform.cleaned_data["search"]
@@ -154,9 +156,10 @@
content_list = None
if content_tag is not None and content_tag != "" :
content_list = TaggedItem.objects.get_by_model(Content.objects.all(), '"'+content_tag+'"')
- results, nb = get_search_results(request, search, field, page, content_list)
+ results, nb, nb_segment = get_search_results(request, search, field, page, content_list)
- return render_to_response('front/front_search_results.html', {'results': results, 'nb_results' : nb, 'search' : search, 'field': field, 'tag_label':content_tag, 'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'colorurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/'}, context_instance=RequestContext(request))
+
+ return render_to_response('front/front_search_results.html', {'results': results, 'nb_results' : nb, 'nb_segment':nb_segment, 'search' : search, 'field': field, 'tag_label':content_tag, 'colorurl': colorurl, 'i18nurl': i18nurl, 'language': language_code, 'baseurl': baseurl}, context_instance=RequestContext(request))
--- a/src/ldt/ldt/ldt_utils/views/group.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/group.py Fri Dec 14 15:12:39 2012 +0100
@@ -9,7 +9,6 @@
from ldt.security.utils import add_change_attr, get_userlist, get_userlist_group
from ldt.security.cache import get_cached_checker, cached_assign
from ldt.user.forms import PictureForm
-import logging
@login_required
--- a/src/ldt/ldt/ldt_utils/views/json.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/json.py Fri Dec 14 15:12:39 2012 +0100
@@ -8,9 +8,11 @@
from ldt.ldt_utils.models import Project
from ldt.ldt_utils.projectserializer import ProjectJsonSerializer
from ldt.ldt_utils.searchutils import search_generate_ldt
+from operator import itemgetter
from datetime import datetime
import ldt.auth as ldt_auth
import lxml.etree
+import logging
def project_json_id(request, id):
@@ -94,6 +96,7 @@
# We search
s = request.REQUEST.get("tag")
+ sort_type = request.REQUEST.get("sort", "")
if s:
# We get the projects with all the segments
project_xml, results = search_generate_ldt(request, "tags", s, False)
@@ -127,18 +130,48 @@
},
"id": "generated_mashup_list"
}
- #filtered_results = []
- for res in results:
- cur_in = float(res["start_ts"])
- cur_out = cur_in + float(res["duration"])
- if tc_in<=cur_in and cur_out<=tc_out:
- #filtered_results.append(res)
- mashup_list["items"].append(res["element_id"])
+ # If sort_type = weight, we sort the result by the tag's weight
+ if sort_type.lower() == "weight":
+ # First we turn each string timecode to a float
+ for res in results:
+ res["start_ts"] = float(res["start_ts"])
+ res["duration"] = float(res["duration"])
+ # We sort to group by start_ts for each media/iri_id
+ sorted_results = sorted(results, key=itemgetter("iri_id", "start_ts", "duration"))
+ highest_weighted = []
+ current_weight = 1
+ nb_res = len(sorted_results)
+ for i, res in enumerate(sorted_results):
+ # Explanation : we calculate the weight, which is the number of segments
+ # tagged with the searched tag for the same iri_id at the same start_ts.
+ # Thanks to the previous sort, the last segment is the one with the longest duration and the one we finally keep
+ next_res = None
+ if i<(nb_res-1):
+ next_res = sorted_results[i+1]
+ if next_res and next_res["iri_id"]==res["iri_id"] and next_res["start_ts"]==res["start_ts"]:
+ current_weight += 1
+ continue
+ res["weight"] = current_weight
+ highest_weighted.append(res)
+ current_weight = 1
+
+ # Now that we have the weight for all temporal segments, we just have to sort the array.
+ highest_weighted = sorted(highest_weighted, key=itemgetter("weight"), reverse=True)
+ for res in highest_weighted:
+ cur_in = res["start_ts"]
+ cur_out = cur_in + res["duration"]
+ if tc_in<=cur_in and cur_out<=tc_out:
+ #mashup_list["items"].append(res["iri_id"] + ", " + res["element_id"] + ", " + str(res["start_ts"]) + ", " + str(res["duration"]) + ", " + str(res["weight"]))
+ mashup_list["items"].append(res["element_id"])
+ else:
+ # no particular sorting
+ for res in results:
+ cur_in = float(res["start_ts"])
+ cur_out = cur_in + float(res["duration"])
+ if tc_in<=cur_in and cur_out<=tc_out:
+ mashup_list["items"].append(res["element_id"])
mashup_dict["lists"].append(mashup_list)
- #mashup_dict["escape_bool"] = escape_bool
- #mashup_dict["indent"] = indent
-
json_str = simplejson.dumps(mashup_dict, ensure_ascii=False, indent=indent)
if escape_bool:
json_str = escape(json_str)
--- a/src/ldt/ldt/ldt_utils/views/lignesdetemps.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/lignesdetemps.py Fri Dec 14 15:12:39 2012 +0100
@@ -10,17 +10,23 @@
from ldt.security.utils import set_forbidden_stream
from ldt.ldt_utils.stat import update_stat_project
from ldt.ldt_utils.searchutils import search_generate_ldt
+from ldt.utils.url import absstatic, absurl
+from ldt.utils.web_url_management import get_web_url
import base64
import django.core.urlresolvers
import lxml.etree
-
+from django.contrib.sites.models import Site
+from django.template import Context, Template
def search_index_get(request, field, query):
language_code = request.LANGUAGE_CODE[:2]
- url = settings.WEB_URL + django.core.urlresolvers.reverse("ldt.ldt_utils.views.lignesdetemps.search_init", args=[field, query])
- return render_to_response('ldt/ldt_utils/init_ldt.html', {'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'colorurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/', 'url': url}, context_instance=RequestContext(request))
+ url = absurl(request, "ldt.ldt_utils.views.lignesdetemps.search_init", args=[field, query])
+ colorurl=absstatic(request, "ldt/swf/ldt/pkg/color.xml")
+ i18nurl=absstatic(request, "ldt/swf/ldt/pkg/i18n")
+ baseurl=absstatic(request, "ldt/swf/ldt/")
+ return render_to_response('ldt/ldt_utils/init_ldt.html', {'colorurl': colorurl, 'i18nurl': i18nurl, 'language': language_code, 'baseurl': baseurl, 'url': url}, context_instance=RequestContext(request))
def search_init(request, field, query):
@@ -77,13 +83,15 @@
def index_segment(request, project_id, content_id, cutting_id, ensemble_id, segment_id):
- url_str = settings.WEB_URL + reverse("ldt.ldt_utils.views.lignesdetemps.init_segment", args=[project_id, content_id, ensemble_id, cutting_id, segment_id])
+ url_str = absurl(request, "ldt.ldt_utils.views.lignesdetemps.init_segment", args=[project_id, content_id, ensemble_id, cutting_id, segment_id])
post_url = ""
language_code = request.LANGUAGE_CODE[:2]
readonly = 'true'
template_path = 'ldt/ldt_utils/init_ldt.html'
-
- return render_to_response(template_path, {'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'colorurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/', 'url': url_str, 'posturl': post_url, 'id': id, 'readonly': readonly}, context_instance=RequestContext(request))
+ colorurl=absstatic(request, "ldt/swf/ldt/pkg/color.xml")
+ i18nurl=absstatic(request, "ldt/swf/ldt/pkg/i18n")
+ baseurl=absstatic(request, "ldt/swf/ldt/")
+ return render_to_response(template_path, {'colorurl': colorurl, 'i18nurl': i18nurl, 'language': language_code, 'baseurl': baseurl, 'url': url_str, 'posturl': post_url, 'id': id, 'readonly': readonly}, context_instance=RequestContext(request))
def init_segment(request, project_id, content_id, ensemble_id, cutting_id, segment_id):
@@ -176,10 +184,12 @@
@login_required
def index_project(request, id, full=False):
- urlStr = settings.WEB_URL + reverse("ldt.ldt_utils.views.lignesdetemps.init", args=['ldt_project', id])
- posturl = settings.WEB_URL + reverse("ldt.ldt_utils.views.lignesdetemps.save_ldt_project")
+ urlStr = absurl(request, "ldt.ldt_utils.views.lignesdetemps.init", args=['ldt_project', id])
+ posturl = absurl(request, "ldt.ldt_utils.views.lignesdetemps.save_ldt_project")
language_code = request.LANGUAGE_CODE[:2]
-
+ colorurl=absstatic(request, "ldt/swf/ldt/pkg/color.xml")
+ i18nurl=absstatic(request, "ldt/swf/ldt/pkg/i18n")
+ baseurl=absstatic(request, "ldt/swf/ldt/")
try:
ldt = Project.safe_objects.get(ldt_id=id)
except Project.DoesNotExist:
@@ -195,7 +205,7 @@
else:
template_path = 'ldt/ldt_utils/init_ldt.html'
- return render_to_response(template_path, {'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'colorurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/', 'url': urlStr, 'posturl': posturl, 'id': id, 'readonly': readonly}, context_instance=RequestContext(request))
+ return render_to_response(template_path, {'colorurl': colorurl, 'i18nurl': i18nurl, 'language': language_code, 'baseurl': baseurl, 'url': urlStr, 'posturl': posturl, 'id': id, 'readonly': readonly}, context_instance=RequestContext(request))
def init(request, method, url):
@@ -312,10 +322,12 @@
def index(request, url):
- urlStr = settings.WEB_URL + reverse("ldt.ldt_utils.views.lignesdetemps.init", args=['ldt', url])
+ urlStr = absurl(request, "ldt.ldt_utils.views.lignesdetemps.init", args=['ldt', url])
language_code = request.LANGUAGE_CODE[:2]
-
- return render_to_response('ldt/ldt_utils/init_ldt.html', {'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'colorurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/', 'url': urlStr, 'weburl':settings.WEB_URL + settings.BASE_URL}, context_instance=RequestContext(request))
+ colorurl=absstatic(request, "ldt/swf/ldt/pkg/color.xml")
+ i18nurl=absstatic(request, "ldt/swf/ldt/pkg/i18n")
+ baseurl=absstatic(request, "ldt/swf/ldt/")
+ return render_to_response('ldt/ldt_utils/init_ldt.html', {'colorurl': colorurl, 'i18nurl': i18nurl, 'language': language_code, 'baseurl': baseurl, 'url': urlStr, 'weburl': get_web_url(request) + settings.BASE_URL}, context_instance=RequestContext(request))
def ldt(request, url, startSegment=None):
--- a/src/ldt/ldt/ldt_utils/views/project.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/project.py Fri Dec 14 15:12:39 2012 +0100
@@ -17,7 +17,7 @@
from ldt.user.forms import PictureForm
import lxml.etree
import math
-import logging
+
@login_required
def create_ldt_view(request):
--- a/src/ldt/ldt/ldt_utils/views/workspace.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/workspace.py Fri Dec 14 15:12:39 2012 +0100
@@ -3,7 +3,7 @@
from django.contrib.auth.models import Group
from django.core.urlresolvers import reverse#, resolve
from django.core.paginator import Paginator, InvalidPage, EmptyPage
-from django.http import HttpResponseForbidden
+from django.http import HttpResponseForbidden, HttpResponse
from ldt.indexation import get_results_with_context, highlight_documents
from django.shortcuts import render_to_response
from django.template import RequestContext
@@ -11,6 +11,8 @@
from django.utils.html import escape
from django.utils.translation import ugettext as _
from ldt.ldt_utils.forms import SearchForm
+from ldt.utils.url import absstatic, absurl
+from ldt.utils.web_url_management import get_web_url
from ldt.ldt_utils.models import Content, Project, Segment
from ldt.ldt_utils.utils import boolean_convert
from ldt.ldt_utils.projectserializer import ProjectJsonSerializer
@@ -23,7 +25,8 @@
import django.core.urlresolvers
import ldt.auth as ldt_auth
from django.utils.safestring import mark_safe
-
+from django.contrib.sites.models import Site
+from django.template import Context, Template
@login_required
@@ -93,7 +96,6 @@
json_url = request.GET.get("json_url")
player_id = request.GET.get("player_id")
ldt_id = request.GET.get("ldt_id")
-
rend_dict = get_datas_for_embed(request, json_url, player_id, ldt_id)
embed_rendered = dict((typestr,
@@ -101,7 +103,6 @@
for typestr in ('seo_body', 'seo_meta', 'links'))
rend_dict['embed_rendered'] = embed_rendered
-
return render_to_response("ldt/ldt_utils/embed_popup.html", rend_dict, context_instance=RequestContext(request))
@@ -125,50 +126,95 @@
rend_dict = get_datas_for_embed(request, json_url, player_id, ldt_id)
# Manage iframe options
- rend_dict["player_height"]=request.GET.get("player_height")
- rend_dict["player_width"]=request.GET.get("player_width")
+ if request.GET.has_key("player_height"):
+ rend_dict["player_height"]=request.GET.get("player_height")
+ else:
+ rend_dict["player_height"]=300
+ if request.GET.has_key("player_width"):
+ rend_dict["player_width"]=request.GET.get("player_width")
+ else:
+ rend_dict["player_width"]=550
if request.GET.has_key("polemic"):
rend_dict["polemic"] = request.GET.get("polemic")
- rend_dict["polemic_defaultColor"] = request.GET.get("polemic_defaultColor")
- rend_dict["polemic_foundColor"] = request.GET.get("polemic_foundColor")
- rend_dict["polemic_okColor"] = request.GET.get("polemic_okColor")
- rend_dict["polemic_koColor"] = request.GET.get("polemic_koColor")
- rend_dict["polemic_refColor"] = request.GET.get("polemic_refColor")
- rend_dict["polemic_qColor"] = request.GET.get("polemic_qColor")
+ if request.GET.has_key("polemic_defaultColor"):
+ rend_dict["polemic_defaultColor"] = request.GET.get("polemic_defaultColor")
+ else:
+ rend_dict["polemic_defaultColor"]="585858"
+ if request.GET.has_key("polemic_foundColor"):
+ rend_dict["polemic_foundColor"] = request.GET.get("polemic_foundColor")
+ else:
+ rend_dict["polemic_foundColor"]="fc00ff"
+ if request.GET.has_key("polemic_okColor"):
+ rend_dict["polemic_okColor"] = request.GET.get("polemic_okColor")
+ else:
+ rend_dict["polemic_okColor"] = "1d973d"
+ if request.GET.has_key("polemic_koColor"):
+ rend_dict["polemic_koColor"] = request.GET.get("polemic_koColor")
+ else:
+ rend_dict["polemic_koColor"]="ce0a15"
+ if request.GET.has_key("polemic_refColor"):
+ rend_dict["polemic_refColor"] = request.GET.get("polemic_refColor")
+ else:
+ rend_dict["polemic_refColor"] = "c5a62d"
+ if request.GET.has_key("polemic_qColor"):
+ rend_dict["polemic_qColor"] = request.GET.get("polemic_qColor")
+ else:
+ rend_dict["polemic_qColor"] = "036aae"
+
+ if request.GET.has_key("createannotation"):
+ rend_dict["createannotation"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("createannotation").lower())
if request.GET.has_key("show_mic_record"):
rend_dict["show_mic_record"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_mic_record").lower())
+ if rend_dict["show_mic_record"]:
+ rend_dict["createannotation"]=True
if request.GET.has_key("annotations_list"):
rend_dict["annotations_list"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("annotations_list").lower())
rend_dict["player_width"] = 550
- if request.GET.has_key("createannotation"):
- rend_dict["createannotation"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("createannotation").lower())
if request.GET.has_key("tag_titles"):
rend_dict["tag_titles"] = request.GET.get("tag_titles")
if request.GET.has_key("sparkline"):
rend_dict["sparkline"] = request.GET.get("sparkline")
- rend_dict["sparkline_lineColor"] = request.GET.get("sparkline_lineColor")
- rend_dict["sparkline_fillColor"] = request.GET.get("sparkline_fillColor")
+ if request.GET.has_key("sparkline_lineColor"):
+ rend_dict["sparkline_lineColor"] = request.GET.get("sparkline_lineColor")
+ else:
+ rend_dict["sparkline_lineColor"] = "7492b4"
+ if request.GET.has_key("sparkline_fillColor"):
+ rend_dict["sparkline_fillColor"] = request.GET.get("sparkline_fillColor")
+ else:
+ rend_dict["sparkline_fillColor"] = "aeaeb8"
if request.GET.has_key("slideshare"):
rend_dict["slideshare"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("slideshare").lower())
if request.GET.has_key("social"):
rend_dict["social"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("social").lower())
if request.GET.has_key("show_url"):
- rend_dict["show_url"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_url").lower())
+ rend_dict["show_url"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_url").lower())
+ else:
+ rend_dict["show_url"] = True
if request.GET.has_key("show_twitter"):
rend_dict["show_twitter"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_twitter").lower())
+ else:
+ rend_dict["show_twitter"] = True
if request.GET.has_key("show_fb"):
rend_dict["show_fb"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_fb").lower())
+ else:
+ rend_dict["show_fb"] = True
if request.GET.has_key("show_gplus"):
rend_dict["show_gplus"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_gplus").lower())
+ else:
+ rend_dict["show_gplus"] = True
if request.GET.has_key("show_mail"):
rend_dict["show_mail"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_mail").lower())
+ else:
+ rend_dict["show_mail"] = True
if request.GET.has_key("annotation"):
rend_dict["annotation"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("annotation").lower())
if request.GET.has_key("tweet"):
rend_dict["tweet"] ={'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("tweet").lower())
if request.GET.has_key("segments"):
- rend_dict["segments"] = request.GET.get("segments")
+ rend_dict["segments"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("segments").lower())
+ else:
+ rend_dict["segments"] = True
if request.GET.has_key("tagcloud"):
rend_dict["tagcloud"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("tagcloud").lower())
return render_to_response("ldt/ldt_utils/embed_iframe.html", rend_dict, context_instance=RequestContext(request))
@@ -179,7 +225,8 @@
project = Project.safe_objects.get(ldt_id=ldt_id); #@UndefinedVariable
project_contents = project.contents.all()
content=project_contents[0]
- iframe_url = mark_safe(settings.WEB_URL+settings.BASE_URL+"ldtplatform/ldt/embediframe/?content_id="+content.iri_id)
+ WEB_URL=get_web_url(request)
+ iframe_url = mark_safe(WEB_URL+settings.BASE_URL+"ldtplatform/ldt/embediframe/?content_id="+content.iri_id+"&project_id="+ldt_id)
external_url = None
if content.src is not None:
for external_src in settings.EXTERNAL_STREAM_SRC:
@@ -196,16 +243,13 @@
if not ldt_auth.check_access(request.user, project):
return HttpResponseForbidden(_("You can not access this project"))
- WEB_URL=settings.WEB_URL
- LDT_MEDIA_PREFIX=settings.LDT_MEDIA_PREFIX
LANGUAGE_CODE=settings.LANGUAGE_CODE
ps = ProjectJsonSerializer(project, from_contents=True, from_display=True)
annotations = ps.get_annotations(first_cutting=True)
rend_dict = {'json_url':json_url, 'player_id':player_id, 'annotations':annotations, 'ldt_id': ldt_id, 'stream_mode': stream_mode,
'external_url': external_url,
'polemic':False, 'show_mic_record':False, 'annotations_list':False, 'iframe_url':iframe_url, 'WEB_URL':WEB_URL,
- 'LDT_MEDIA_PREFIX':LDT_MEDIA_PREFIX, 'LANGUAGE_CODE':LANGUAGE_CODE}
-
+ 'LANGUAGE_CODE':LANGUAGE_CODE}
return rend_dict
@@ -241,8 +285,9 @@
results = []
search = ''
field = 'all'
-
-
+ colorurl=absstatic(request, "ldt/swf/ldt/pkg/color.xml")
+ i18nurl=absstatic(request, "ldt/swf/ldt/pkg/i18n")
+ baseurl=absstatic(request, "ldt/swf/ldt/")
sform = SearchForm(request.GET)
if sform.is_valid():
search = sform.cleaned_data["search"]
@@ -250,14 +295,13 @@
field = sform.cleaned_data["field"]
page = sform.cleaned_data["page"] or 1
ldt_pres = sform.cleaned_data["ldt_pres"]
-
if ldt_pres:
- url = settings.WEB_URL + django.core.urlresolvers.reverse("ldt.ldt_utils.views.lignesdetemps.search_init", args=[field, queryStr])
- return render_to_response('ldt/ldt_utils/init_ldt_full.html', {'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'colorurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/', 'url': url}, context_instance=RequestContext(request))
- else:
- results, nb = get_search_results(request, search, field, page)
+ url = absurl(request, "ldt.ldt_utils.views.lignesdetemps.search_init", args=[field, queryStr])
+ return render_to_response('ldt/ldt_utils/init_ldt_full.html', {'colorurl': colorurl, 'i18nurl': i18nurl , 'language': language_code, 'baseurl': baseurl, 'url': url}, context_instance=RequestContext(request))
+ else:
+ results, nb, nb_segment = get_search_results(request, search, field, page)
- return render_to_response('ldt/ldt_utils/search_results.html', {'results': results, 'nb_results' : nb, 'search' : search, 'field': field, 'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'colorurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.LDT_MEDIA_PREFIX + 'swf/ldt/'}, context_instance=RequestContext(request))
+ return render_to_response('ldt/ldt_utils/search_results.html', {'results': results, 'nb_results' : nb, 'nb_segment' : nb_segment, 'search' : search, 'field': field, 'colorurl': colorurl, 'i18nurl': i18nurl , 'language': language_code, 'baseurl': baseurl}, context_instance=RequestContext(request))
def get_search_results(request, search, field, page, content_list=None):
@@ -270,20 +314,22 @@
if sub[-1] != u'"':
sub = sub + u'"'
search = u'author:' + sub
- results = get_results_with_context(field, search, content_list)
-
+ results = get_results_with_context(field, search, content_list)
all_segments = Segment.objects.filter(element_id__in=[e['element_id'] for e in results])
all_projects = Project.objects.filter(ldt_id__in=[e['project_id'] for e in results], state=2)
all_contents = Content.objects.filter(iri_id__in=[e['iri_id'] for e in results])
viewable_projects_id = [p.ldt_id for p in all_projects]
-
+ nb_segment=0
complete_results = []
results.sort(key=lambda k: k['iri_id'])
for iri_id, item in groupby(results, itemgetter('iri_id')):
- content = filter(lambda e: e.iri_id == iri_id, all_contents)[0]
- if content.description is None:
- content.description = ''
+ content=[]
+ content_filter = filter(lambda e: e.iri_id == iri_id, all_contents)
+ if len(content_filter)>0:
+ content = filter(lambda e: e.iri_id == iri_id, all_contents)[0]
+ if content.description is None:
+ content.description = ''
all_related_segments = list(item)
@@ -302,8 +348,10 @@
if not s['project_id']:
segment.project_id = '_'
valid_segments.append(segment)
+ nb_segment+=1
elif s['project_id'] in viewable_projects_id:
valid_segments.append(segment)
+ nb_segment+=1
# If all segments found belong to unpublished projects or projects
# the current user is not allowed to see
@@ -328,7 +376,7 @@
results.object_list = highlight_documents(results.object_list, search, field)
- return results, len(complete_results)
+ return results, len(complete_results), nb_segment
def loading(request):
Binary file src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo has changed
--- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Fri Dec 14 15:12:39 2012 +0100
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-12 14:54+0100\n"
+"POT-Creation-Date: 2012-12-06 16:41+0100\n"
"PO-Revision-Date: 2010-03-09 15:52+0100\n"
"Last-Translator: Yves-Marie Haussonne <ymh.work@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -28,7 +28,7 @@
msgid "Time"
msgstr "Heure"
-#: .\ldt_utils\forms.py:32 .\ldt_utils\templates\front\front_base.html.py:52
+#: .\ldt_utils\forms.py:32 .\ldt_utils\templates\front\front_base.html.py:53
#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:53
msgid "Search"
msgstr "Recherche"
@@ -37,8 +37,8 @@
msgid "all"
msgstr "tous"
-#: .\ldt_utils\forms.py:33 .\ldt_utils\models.py:55
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:69
+#: .\ldt_utils\forms.py:33 .\ldt_utils\models.py:57
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:70
msgid "title"
msgstr "titre"
@@ -62,7 +62,7 @@
msgid "Content Tag"
msgstr "Catégorie de contenu"
-#: .\ldt_utils\forms.py:52 .\ldt_utils\models.py:157
+#: .\ldt_utils\forms.py:52 .\ldt_utils\models.py:158
msgid "content.content_creation_date"
msgstr "Date de création du contenu"
@@ -94,123 +94,123 @@
msgid "content.front_project"
msgstr "Choisir le front project"
-#: .\ldt_utils\forms.py:57 .\ldt_utils\models.py:156
+#: .\ldt_utils\forms.py:57 .\ldt_utils\models.py:157
msgid "content.duration"
msgstr "Durée"
-#: .\ldt_utils\models.py:44
+#: .\ldt_utils\models.py:46
msgid "media.external_id"
msgstr "id externe"
-#: .\ldt_utils\models.py:45
+#: .\ldt_utils\models.py:47
msgid "media.external_permalink"
msgstr "permalien externe"
-#: .\ldt_utils\models.py:46
+#: .\ldt_utils\models.py:48
msgid "media.external_publication_url"
msgstr "url de publication externe"
-#: .\ldt_utils\models.py:47
+#: .\ldt_utils\models.py:49
msgid "media.external_src_url"
msgstr "url source"
-#: .\ldt_utils\models.py:48
+#: .\ldt_utils\models.py:50
msgid "media.creation_date"
msgstr "Date de création"
-#: .\ldt_utils\models.py:49
+#: .\ldt_utils\models.py:51
msgid "media.media_creation_date"
msgstr "Date de création du média"
-#: .\ldt_utils\models.py:50
+#: .\ldt_utils\models.py:52
msgid "media.update_date"
msgstr "Date de maj"
-#: .\ldt_utils\models.py:51
+#: .\ldt_utils\models.py:53
msgid "media.videopath"
msgstr "videopath"
-#: .\ldt_utils\models.py:52
+#: .\ldt_utils\models.py:54
msgid "media.duration"
msgstr "Durée du contenu (ms)"
-#: .\ldt_utils\models.py:53
+#: .\ldt_utils\models.py:55
msgid "media.creator"
msgstr "Créateur"
-#: .\ldt_utils\models.py:54
+#: .\ldt_utils\models.py:56
msgid "description"
msgstr "description"
-#: .\ldt_utils\models.py:56
+#: .\ldt_utils\models.py:58
msgid "media.src"
msgstr "Sources"
-#: .\ldt_utils\models.py:58
+#: .\ldt_utils\models.py:59
msgid "media.src_hash"
msgstr "Hash de la source"
-#: .\ldt_utils\models.py:59
+#: .\ldt_utils\models.py:60
msgid "media.mimetype"
msgstr "mimetype"
-#: .\ldt_utils\models.py:149
+#: .\ldt_utils\models.py:150
msgid "content.iri_id"
msgstr "iri id"
-#: .\ldt_utils\models.py:150
+#: .\ldt_utils\models.py:151
msgid "content.iriurl"
msgstr "iri url"
-#: .\ldt_utils\models.py:151
+#: .\ldt_utils\models.py:152
msgid "content.creation_date"
msgstr "date de création"
-#: .\ldt_utils\models.py:152
+#: .\ldt_utils\models.py:153
msgid "content.update_date"
msgstr "Date de maj"
-#: .\ldt_utils\models.py:153
+#: .\ldt_utils\models.py:154
msgid "content.title"
msgstr "titre"
-#: .\ldt_utils\models.py:154
+#: .\ldt_utils\models.py:155
msgid "content.description"
msgstr "Description"
-#: .\ldt_utils\models.py:155
+#: .\ldt_utils\models.py:156
msgid "content.authors"
msgstr "Auteurs"
-#: .\ldt_utils\models.py:523
+#: .\ldt_utils\models.py:533
msgid "content_stat.content"
msgstr "statistiques d'annotation"
-#: .\ldt_utils\models.py:524
+#: .\ldt_utils\models.py:534
msgid "content_stat.annotations_volume"
msgstr "Volume d'annotations"
-#: .\ldt_utils\models.py:525
+#: .\ldt_utils\models.py:535
msgid "content_stat.polemics_volume"
msgstr "Volume d'annotations"
-#: .\ldt_utils\models.py:526
+#: .\ldt_utils\models.py:536
msgid "content.nb_annotation"
msgstr "nombre d'annotations"
-#: .\ldt_utils\models.py:527
+#: .\ldt_utils\models.py:537
msgid "content.last_annotated"
msgstr "annoté pour la dernière foiss"
-#: .\ldt_utils\models.py:582
+#: .\ldt_utils\models.py:592
msgid "created by"
msgstr "créé par"
-#: .\ldt_utils\models.py:583
+#: .\ldt_utils\models.py:593
msgid "changed by"
msgstr "modifié par"
-#: .\ldt_utils\utils.py:203 .\ldt_utils\utils.py:386
+#: .\ldt_utils\utils.py:205 .\ldt_utils\utils.py:388
msgid "Personal cutting"
msgstr "Découpages personnels"
@@ -223,63 +223,63 @@
msgid "Home"
msgstr "Accueil"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:8
+#: .\ldt_utils\templates\front\front_all_contents.html.py:9
#, python-format
msgid "Lignes de temps : %(tag_label)s"
msgstr "Lignes de temps : %(tag_label)s"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:10
+#: .\ldt_utils\templates\front\front_all_contents.html.py:11
msgid "Lignes de temps : all medias"
msgstr "Lignes de temps : tous les médias"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:44
+#: .\ldt_utils\templates\front\front_all_contents.html.py:45
#: .\ldt_utils\templates\front\front_home.html.py:39
msgid "Filter the medias by category"
msgstr "Filtrer les médias par catégorie"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:49
#: .\ldt_utils\templates\front\front_all_contents.html.py:50
#: .\ldt_utils\templates\front\front_all_contents.html.py:51
+#: .\ldt_utils\templates\front\front_all_contents.html.py:52
#: .\ldt_utils\templates\front\front_home.html.py:45
msgid "All medias"
msgstr "Tous les médias"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:54
+#: .\ldt_utils\templates\front\front_all_contents.html.py:55
#: .\ldt_utils\templates\front\front_home.html.py:45
msgid "Filter the medias"
msgstr "Filtrer les médias"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:60
+#: .\ldt_utils\templates\front\front_all_contents.html.py:61
#: .\ldt_utils\templates\front\front_home.html.py:51
msgid "Search in the medias title"
msgstr "Chercher dans le titre des médias"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:63
-#: .\ldt_utils\templates\front\front_all_contents.html.py:119
+#: .\ldt_utils\templates\front\front_all_contents.html.py:64
+#: .\ldt_utils\templates\front\front_all_contents.html.py:120
#: .\ldt_utils\templates\front\front_home.html.py:54
msgid "All categories of medias"
msgstr "Toutes les catégories de médias"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:71
-#: .\ldt_utils\templates\front\front_search_results.html.py:136
+#: .\ldt_utils\templates\front\front_all_contents.html.py:72
+#: .\ldt_utils\templates\front\front_search_results.html.py:138
#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:101
msgid "previous"
msgstr "Précedent"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:89
-#: .\ldt_utils\templates\front\front_search_results.html.py:156
+#: .\ldt_utils\templates\front\front_all_contents.html.py:90
+#: .\ldt_utils\templates\front\front_search_results.html.py:158
#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:111
msgid "next"
msgstr "Suivant"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:92
+#: .\ldt_utils\templates\front\front_all_contents.html.py:93
msgid "All"
msgstr "Tous"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:101
-#: .\ldt_utils\templates\front\front_all_contents.html.py:114
-#: .\ldt_utils\templates\front\front_group.html.py:26
-#: .\ldt_utils\templates\front\front_group.html.py:28
+#: .\ldt_utils\templates\front\front_all_contents.html.py:102
+#: .\ldt_utils\templates\front\front_all_contents.html.py:115
+#: .\ldt_utils\templates\front\front_group.html.py:27
+#: .\ldt_utils\templates\front\front_group.html.py:29
#: .\ldt_utils\templates\front\front_home.html.py:62
#: .\ldt_utils\templates\front\front_home.html.py:73
#: .\ldt_utils\templates\front\front_home.html.py:90
@@ -287,8 +287,8 @@
msgid "open this media"
msgstr "voir ce média"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:113
-#: .\ldt_utils\templates\front\front_group.html.py:27
+#: .\ldt_utils\templates\front\front_all_contents.html.py:114
+#: .\ldt_utils\templates\front\front_group.html.py:28
#: .\ldt_utils\templates\front\front_home.html.py:72
#: .\ldt_utils\templates\front\front_home.html.py:98
#, python-format
@@ -297,73 +297,73 @@
msgstr[0] "%(nb)s annotation sur ce média"
msgstr[1] "%(nb)s annotations sur ce média"
-#: .\ldt_utils\templates\front\front_all_contents.html.py:115
-#: .\ldt_utils\templates\front\front_group.html.py:29
+#: .\ldt_utils\templates\front\front_all_contents.html.py:116
+#: .\ldt_utils\templates\front\front_group.html.py:30
#: .\ldt_utils\templates\front\front_home.html.py:74
#: .\ldt_utils\templates\front\front_home.html.py:100
msgid "by"
msgstr "par"
-#: .\ldt_utils\templates\front\front_base.html.py:44
+#: .\ldt_utils\templates\front\front_base.html.py:45
msgid "homepage"
msgstr "Accueil"
-#: .\ldt_utils\templates\front\front_base.html.py:44
+#: .\ldt_utils\templates\front\front_base.html.py:45
msgid "<b>Lignes</b> de temps"
msgstr "<b>Lignes</b> de temps"
-#: .\ldt_utils\templates\front\front_base.html.py:59
+#: .\ldt_utils\templates\front\front_base.html.py:60
#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:68
msgid "My projects"
msgstr "Mes projets"
-#: .\ldt_utils\templates\front\front_base.html.py:62
-#: .\ldt_utils\templates\front\front_player.html.py:5
+#: .\ldt_utils\templates\front\front_base.html.py:63
+#: .\ldt_utils\templates\front\front_player.html.py:6
msgid "Annotate"
msgstr "Annoter"
-#: .\ldt_utils\templates\front\front_base.html.py:69
+#: .\ldt_utils\templates\front\front_base.html.py:70
#: .\templates\cms\admin\cms\page\change_form.html.py:11
-#: .\templates\ldt\ldt_base.html.py:97
-#: .\user\templates\ldt\user\login_form.html.py:34
+#: .\templates\ldt\ldt_base.html.py:98
+#: .\user\templates\ldt\user\login_form.html.py:35
msgid "Log out"
msgstr "Déconnexion"
-#: .\ldt_utils\templates\front\front_base.html.py:71
+#: .\ldt_utils\templates\front\front_base.html.py:72
#: .\templates\admin\page_login.html.py:32
-#: .\user\templates\ldt\user\login_form.html.py:37
-#: .\user\templates\ldt\user\login_form.html.py:45
-#: .\user\templates\registration\login.html.py:21
+#: .\user\templates\ldt\user\login_form.html.py:38
+#: .\user\templates\ldt\user\login_form.html.py:46
+#: .\user\templates\registration\login.html.py:22
#: .\user\templates\registration\password_reset_complete.html.py:14
msgid "Log in"
msgstr "Connexion"
-#: .\ldt_utils\templates\front\front_base.html.py:80
+#: .\ldt_utils\templates\front\front_base.html.py:81
#, python-format
msgid "%(WEB_VERSION)s | %(VERSION)s"
msgstr "v%(WEB_VERSION)s | v%(VERSION)s "
-#: .\ldt_utils\templates\front\front_base.html.py:83
+#: .\ldt_utils\templates\front\front_base.html.py:84
msgid "link IRI"
msgstr "Site de l'IRI"
-#: .\ldt_utils\templates\front\front_base.html.py:83
+#: .\ldt_utils\templates\front\front_base.html.py:84
msgid "about"
msgstr "A propos"
-#: .\ldt_utils\templates\front\front_group.html.py:22
+#: .\ldt_utils\templates\front\front_group.html.py:23
msgid "Medias annotated by the group"
msgstr "Médias annotés par le groupe"
-#: .\ldt_utils\templates\front\front_group.html.py:38
+#: .\ldt_utils\templates\front\front_group.html.py:39
msgid "About the group"
msgstr "A propos du groupe"
-#: .\ldt_utils\templates\front\front_group.html.py:47
+#: .\ldt_utils\templates\front\front_group.html.py:48
msgid "Members"
msgstr "liste des membres"
-#: .\ldt_utils\templates\front\front_group.html.py:54
+#: .\ldt_utils\templates\front\front_group.html.py:55
msgid "active since"
msgstr "actif depuis"
@@ -403,23 +403,23 @@
msgstr[0] "%(nb)s utilisateur dans ce groupe"
msgstr[1] "%(nb)s utilisateurs dans ce groupe"
-#: .\ldt_utils\templates\front\front_player.html.py:48
+#: .\ldt_utils\templates\front\front_player.html.py:49
msgid "All annotations on the media"
msgstr "Toutes les annotations sur le média"
-#: .\ldt_utils\templates\front\front_search_results.html.py:6
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:101
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:113
+#: .\ldt_utils\templates\front\front_search_results.html.py:7
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:100
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:112
#: .\ldt_utils\templates\ldt\ldt_utils\ldt_list.html.py:80
#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:70
#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:56
#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:71
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:129
-#: .\templates\ldt\ldt_base.html.py:127
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:133
+#: .\templates\ldt\ldt_base.html.py:128
msgid "search"
msgstr "Recherche"
-#: .\ldt_utils\templates\front\front_search_results.html.py:54
+#: .\ldt_utils\templates\front\front_search_results.html.py:55
#, python-format
msgid ""
" No results for <b>%(search)s</b> with the medias tagged <span class=\"pink"
@@ -428,74 +428,78 @@
"Aucun résultat pour <b>%(search)s</b> avec les médias taggués <span class="
"\"pink\">%(tag_label)s</span>"
-#: .\ldt_utils\templates\front\front_search_results.html.py:55
+#: .\ldt_utils\templates\front\front_search_results.html.py:56
msgid "See for all medias"
msgstr "Voir pour tous les médias"
-#: .\ldt_utils\templates\front\front_search_results.html.py:57
+#: .\ldt_utils\templates\front\front_search_results.html.py:58
#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:59
#, python-format
msgid " No results for <b>%(search)s</b>."
msgstr "Aucun résultat pour <b>%(search)s</b>."
-#: .\ldt_utils\templates\front\front_search_results.html.py:72
-#: .\ldt_utils\templates\front\front_search_results.html.py:74
+#: .\ldt_utils\templates\front\front_search_results.html.py:73
+#: .\ldt_utils\templates\front\front_search_results.html.py:75
msgid "Search results for "
msgstr "Résultats de recherche pour "
-#: .\ldt_utils\templates\front\front_search_results.html.py:79
+#: .\ldt_utils\templates\front\front_search_results.html.py:80
#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:62
msgid "Result"
msgstr "Résultat"
-#: .\ldt_utils\templates\front\front_search_results.html.py:98
+#: .\ldt_utils\templates\front\front_search_results.html.py:81
+msgid "Segment"
+msgstr "Segment"
+
+#: .\ldt_utils\templates\front\front_search_results.html.py:100
msgid "annotation distribution"
msgstr "Répartition des annotations"
-#: .\ldt_utils\templates\front\front_search_results.html.py:112
-#: .\ldt_utils\templates\front\front_search_results.html.py:117
+#: .\ldt_utils\templates\front\front_search_results.html.py:114
+#: .\ldt_utils\templates\front\front_search_results.html.py:119
msgid "view this annotation in the player"
msgstr "Visionner cette annotation"
-#: .\ldt_utils\templates\front\front_search_results.html.py:113
-#: .\ldt_utils\templates\front\front_search_results.html.py:118
+#: .\ldt_utils\templates\front\front_search_results.html.py:115
+#: .\ldt_utils\templates\front\front_search_results.html.py:120
#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:80
msgid "No title"
msgstr "Sans titre"
-#: .\ldt_utils\templates\front\front_search_results.html.py:114
+#: .\ldt_utils\templates\front\front_search_results.html.py:116
msgid "Begin"
msgstr "Début"
-#: .\ldt_utils\templates\front\front_search_results.html.py:114
+#: .\ldt_utils\templates\front\front_search_results.html.py:116
msgid "duration"
msgstr "durée"
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:55
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:56
#: .\templates\admin\page_base.html.py:19
-#: .\user\templates\ldt\user\login_form.html.py:33
+#: .\user\templates\ldt\user\login_form.html.py:34
msgid "Space"
msgstr "Esp. perso"
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:56
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:57
msgid "Ldt Project"
msgstr "Projet lignes de temps"
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:59
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:60
msgid "Contents"
msgstr "Liste des contenus"
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:63
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:64
msgid "Create new content"
msgstr "Créer un nouveau contenu"
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:66
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:67
msgid "Content"
msgstr "Contenu"
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:70
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:77
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:28
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:71
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:78
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:29
msgid "create project"
msgstr "Créer un nouveau projet d'indexation"
@@ -512,23 +516,23 @@
msgid "Copy"
msgstr "Copier"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:33
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:35
msgid "Browse"
msgstr "Parcourir"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:34
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:36
msgid "File uploaded"
msgstr "Fichier téléversé"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:35
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:37
msgid "Please wait, the upload is not finished yet"
msgstr "Veuillez patienter, le téléversement est en cours"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:36
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:38
msgid "Cancel upload"
msgstr "Annuler le téléversement"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:71
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:73
msgid ""
"The operation could not be performed because one or more error(s) occurred."
"<br />Please resubmit the media form after making the following changes:"
@@ -536,28 +540,32 @@
"opération impossible à cause d'une ou plusieurs erreurs.<br />Veuillez "
"resoumettre le formulaire media après avoir fait les changements suivants:"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:85
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:88
+msgid "Modify this content"
+msgstr "Modifier ce contenu"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:90
#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:53
msgid "Create content"
msgstr "Créer un contenu"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:126
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:132
msgid "Actual front project"
msgstr "Front project actuel"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:127
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:133
#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:149
#: .\ldt_utils\templates\ldt\ldt_utils\reset_confirm.html.py:39
#: .\ldt_utils\templates\ldt\ldt_utils\reset_confirm_popup.html.py:54
msgid "reset_front_project"
msgstr "Réinitialiser"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:141
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:147
msgid "media file is being processed please wait."
msgstr "Le fichier média est en cours de traitement. Veuillez patienter."
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:145
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:101
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:151
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:79
#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:145
#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:37
#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm_popup.html.py:53
@@ -566,44 +574,44 @@
msgid "close_cancel"
msgstr "Fermer"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:146
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:152
msgid "delete"
msgstr "Effacer"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:147
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:153
msgid "write"
msgstr "Enregistrer"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:57
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:38
msgid "Do you really want to delete this group ?"
msgstr "Voulez-vous quitter ce groupe ?"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:78
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:56
msgid "Update a group"
msgstr "Mettre à jour votre groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:78
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:56
msgid "Create a group"
msgstr "Créer un groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:85
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:63
#: .\user\templates\ldt\user\change_profile.html.py:62
msgid "Name"
msgstr "Nom"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:91
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:69
msgid "Description"
msgstr "Description"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:103
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:81
msgid "update_group"
msgstr "Mettre à jour le groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:105
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:83
msgid "delete_group"
msgstr "Effacer le groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:108
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:86
msgid "create_group"
msgstr "Créer un nouveau groupe"
@@ -632,9 +640,9 @@
msgstr "Liste de contenus"
#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:120
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:21
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:12
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:12
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:22
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:13
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:13
msgid "name"
msgstr "Nom"
@@ -654,180 +662,192 @@
msgid "create_project"
msgstr "Créer un nouveau projet Ligne de Temps"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:23
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:208
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:26
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:219
msgid "Show Player"
msgstr "Afficher le Lecteur métadata"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:24
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:27
msgid "Hide Player"
msgstr "Masquer le Lecteur métadata "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:62
msgid "project id"
msgstr "Identifiant du projet "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:62
msgid "Select"
msgstr "Sélectionner"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:56
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:67
msgid "popup_player"
msgstr "Code Lecteur métadata"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:57
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:68
msgid "popup_seo_body"
msgstr "Code SEO"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:58
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:69
msgid "popup_seo_meta"
msgstr "Code balise meta en-tête"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:59
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:70
msgid "popup_links"
msgstr "Liste de liens"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:76
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:87
msgid "Integration mode"
msgstr "Utiliser le mode d'intégration "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:77
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:88
msgid "div"
msgstr "div"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:78
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:89
msgid "iframe"
msgstr "iframe"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:81
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:92
msgid "Player Size : "
msgstr "Taille de la vidéo : "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:88
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:99
msgid "Preset Modes"
msgstr "Modes prédéfinis"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:91
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:102
msgid "Basic configuration"
msgstr "Confirmation de base"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:92
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:103
msgid "Polemic configuration"
msgstr "Configuration avec widget polemic"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:93
-msgid "Polemic configuration with sparkline and tagcloud"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:104
+#, fuzzy
+msgid "Polemic configuration with tagcloud, annotationsList and Social widgets"
msgstr "Configuration avec widget polemic, sparkline et tagcloud"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:100
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:111
msgid "Create your own configuration"
msgstr "Personnaliser votre configuration"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:105
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:116
msgid "Displays a form to create a new annotation"
msgstr "Permet de créer une annotation en affichant un formulaire"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:108
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:119
msgid "audio annotation"
msgstr "Annotation audio"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:109
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:120
msgid "Audio annotation"
msgstr "Annotation audio"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:109
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:120
msgid "Allows the user to record an annotation"
-msgstr "Permet à l'utilisateur d'enregistrer une annotation à l'aide d'un micro"
+msgstr ""
+"Permet à l'utilisateur d'enregistrer une annotation à l'aide d'un micro"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:111
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:122
msgid "Use most used tags "
msgstr "Utiliser les tags les plus utilisés"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:113
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:124
msgid "Set your own tags : "
msgstr "Ajouter vos propres tags"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:113
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:124
msgid "Write your tags separeted by a comma"
msgstr "Ecrire la liste des tags séparés par une virgule"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:119
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:130
msgid "Displays segments of a media as rectangles on an horizontal line"
msgstr "Affiche le chapitrage du média, en horizontal"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:122
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:133
msgid "Show a list of annotations"
msgstr "Affiche une liste d’annotations "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:126
-msgid "Shows the polemical timeline, i.e. tweets colored according to the polemical syntax"
-msgstr "Affiche la timeline polémique, c’est à dire les tweets colorés en fonction de la syntaxe polémique "
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:137
+msgid ""
+"Shows the polemical timeline, i.e. tweets colored according to the polemical "
+"syntax"
+msgstr ""
+"Affiche la timeline polémique, c’est à dire les tweets colorés en fonction "
+"de la syntaxe polémique "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:129
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:140
msgid "Display in the polemic timeline : "
msgstr "Afficher dans la timeline polemic : "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:130
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:141
msgid "only tweets"
msgstr "seulement les annotations de type tweet"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:131
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:142
msgid "all annotations"
msgstr "toutes les annotations"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:133
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:144
msgid "Personalize tweet's color"
msgstr "Personnaliser les couleurs des tweets"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:138
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:149
msgid "Default color"
msgstr "Couleur des tweets sans annotation polémique : "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:142
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:153
msgid "Polemic's color : ++ : "
msgstr "Couleur des tweets polémiques de type : ++ : "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:152
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:163
msgid "Found color"
msgstr "Couleur d'affichage des tweets lors d'une recherche : "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:160
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:171
msgid "Displays a curve showing the volume of tweets across time"
-msgstr "Affiche une courbe indiquant l’évolution du volume d’annotations au cours du temps"
+msgstr ""
+"Affiche une courbe indiquant l’évolution du volume d’annotations au cours du "
+"temps"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:164
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:175
msgid "personalize sparkline's color"
msgstr "Personnaliser les couleurs de la courbe"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:168
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:179
msgid "line color"
msgstr "Couleur de la courbe : "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:173
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:184
msgid "fill color"
msgstr "Couleur sous la courbe : "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:180
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:191
msgid "Displays a div in order to watch the slides displayed in the media"
msgstr "Permet d'afficher les slides d'un média"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:184
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:195
msgid " Adds buttons to share an URL on social networks"
msgstr "Affiche des boutons pour partager une URL sur les réseaux sociaux"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:191
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:202
msgid "share with email"
msgstr "Partager par email"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:195
-msgid " Displays information relative to a single segment/annotation while it is being played"
-msgstr "Affiche les informations relatives à une annotation au moment où celle-ci est jouée"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:206
+msgid ""
+" Displays information relative to a single segment/annotation while it is "
+"being played"
+msgstr ""
+"Affiche les informations relatives à une annotation au moment où celle-ci "
+"est jouée"
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:198
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:209
msgid "Show the contents on a tweet when clicked (in Polemic Widget)"
msgstr "Affiche furtivement le contenu d’un tweet "
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:201
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:212
msgid "Shows a tag cloud"
msgstr "Affiche un nuage de mots-clés "
@@ -854,20 +874,20 @@
msgid "close_error"
msgstr "Fermer"
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:68
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:67
msgid "Do you want to leave this group ?"
msgstr "Voulez-vous quitter ce groupe ?"
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:93
-#: .\templates\ldt\ldt_base.html.py:115
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:92
+#: .\templates\ldt\ldt_base.html.py:116
msgid "My groups"
msgstr "Groupes"
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:95
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:94
msgid "Create group"
msgstr "Créer un nouveau groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:111
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:110
msgid "The group's projects"
msgstr "projets du groupe"
@@ -888,7 +908,7 @@
msgstr "Chercher"
#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:67
-#: .\templates\ldt\ldt_base.html.py:116
+#: .\templates\ldt\ldt_base.html.py:117
msgid "Published projects"
msgstr "Projets publiés"
@@ -901,7 +921,7 @@
msgid "confirm_reset"
msgstr "Confirmation de réinitialisation"
-#: .\ldt_utils\templates\ldt\ldt_utils\search_form.html.py:10
+#: .\ldt_utils\templates\ldt\ldt_utils\search_form.html.py:11
msgid "The search field can not be empty."
msgstr "Le champ de recherche ne peut pas être vide."
@@ -910,12 +930,12 @@
msgstr "Résultats pour "
#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:76
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:24
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:26
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:32
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:34
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:21
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:23
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:25
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:27
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:33
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:35
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:22
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:24
msgid "open ldt"
msgstr "Ouvrir sous Lignes de Temps"
@@ -932,88 +952,88 @@
msgid "content list"
msgstr "Liste des contenus"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:6
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:7
msgid "All categories"
msgstr "Toutes les catégories"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:29
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:30
msgid "preview media"
msgstr "Aperçu"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:31
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:32
msgid "You can't edit this content"
msgstr "Vous n'avez pas l'autorisation d'éditer ce contenu"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:22
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:37
msgid "Click on the line to see the group's projects"
msgstr "cliquer ici pour voir les projets du groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:33
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:48
msgid "Change this group"
msgstr "Modifier ce groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:40
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:55
msgid "You are not allowed to edit this group"
msgstr "vous n'avez pas l'autorisation de modifier ce groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:55
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:70
msgid "Projects shared with me only"
msgstr "Projets partagés avec moi uniquement"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:52
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:79
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:174
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:53
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:81
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:180
msgid "share.eye"
msgstr "Cet utilisateur ou ce groupe a le droit de voir cet élement"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:60
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:172
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:61
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:178
msgid "share.pencil"
msgstr "cet utilisateur ou ce groupe a le droit de modifier cet élement"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:110
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:112
msgid "share"
msgstr "partager avec d'autres utilisateurs"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:119
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:121
msgid "publish for everyone"
msgstr "publier pour tout le monde"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:124
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:127
msgid "publish the title on the front"
msgstr "publier le titre sur le front"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:127
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:131
msgid "User and group list"
msgstr "Liste des groupes et des utilisateurs"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:142
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:146
msgid "select all displayed elements"
msgstr "ajouter tous les élements affichés"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:147
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:151
msgid "select users"
msgstr "choisir des utilisateurs"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:148
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:152
msgid "remove users"
msgstr "enlever des utilisateurs"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:153
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:159
msgid "Members list"
msgstr "liste des membres"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:163
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:169
#: .\ldt_utils\templates\ldt\ldt_utils\partial\sharewith.html.py:7
msgid "user"
msgstr "utilisateur"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:165
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:171
#: .\ldt_utils\templates\ldt\ldt_utils\partial\sharewith.html.py:9
msgid "group"
msgstr "groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:185
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:191
msgid "remove all"
msgstr "tout enlever"
@@ -1032,102 +1052,94 @@
msgid "Upload a new picture"
msgstr "Téléverser une nouvelle image"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:40
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:41
msgid "copy project"
msgstr "Copier votre projet"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:43
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:26
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:44
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:27
msgid "link json by id"
msgstr "Ouvrir le lecteur de métadata"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:48
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:49
msgid "Project published, click to unpublish"
msgstr "Projet publié, cliquer pour de-publier"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:48
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:50
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:61
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:49
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:51
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:62
msgid "You are not allowed to change this project"
msgstr "vous n'avez pas l'autorisation de modifier ce projet"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:50
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:51
msgid "Project not published, click to publish"
msgstr "Projet non publié, cliquer pour publier"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:25
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:26
msgid "copy the project"
msgstr "Copier le projet"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:28
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:29
msgid "Project published"
msgstr "Projet publié"
-#: .\ldt_utils\views\content.py:187
+#: .\ldt_utils\views\content.py:113
msgid "Problem when downloading file from url : "
msgstr "Problème lors du téléchargement du fichier : "
-#: .\ldt_utils\views\content.py:190
+#: .\ldt_utils\views\content.py:116
msgid "Problem when uploading file : "
msgstr "Problème lors de l'upload du fichier : "
-#: .\ldt_utils\views\content.py:295
-msgid "Content creation failure"
-msgstr "Echec lors de la creation du contenu"
-
-#: .\ldt_utils\views\content.py:303
-msgid "Commit of the content creation failed"
-msgstr "Echec lors du commit de la creation du contenu"
-
-#: .\ldt_utils\views\content.py:317
+#: .\ldt_utils\views\content.py:325
#, python-format
msgid "There is %(count)d error when deleting content"
msgid_plural "There are %(count)d errors when deleting content"
msgstr[0] "Il y a %(count)d erreur lors de l'effacement du contenu"
msgstr[1] "Il y a %(count)d erreurs lors de l'effacement du contenu"
-#: .\ldt_utils\views\content.py:318
+#: .\ldt_utils\views\content.py:326
msgid "title error deleting content"
msgstr "Erreur lors de l'effacement du contenu"
-#: .\ldt_utils\views\content.py:323
+#: .\ldt_utils\views\content.py:331
#, python-format
msgid "Confirm delete content %(titles)s"
msgstr "Veuillez confirmer l'effacement du contenu %(titles)s"
-#: .\ldt_utils\views\content.py:324
+#: .\ldt_utils\views\content.py:332
msgid "confirm delete content"
msgstr "Confirmation effacement contenu"
-#: .\ldt_utils\views\content.py:335
+#: .\ldt_utils\views\content.py:343
#, python-format
msgid "Please unpublish the front project %(title)s"
msgstr "Veuillez dépublier le projet : %(title)s"
-#: .\ldt_utils\views\content.py:336
+#: .\ldt_utils\views\content.py:344
msgid "The front project is published"
msgstr "Projet publié"
-#: .\ldt_utils\views\content.py:337 .\ldt_utils\views\content.py:340
+#: .\ldt_utils\views\content.py:345 .\ldt_utils\views\content.py:348
#: .\ldt_utils\views\project.py:137
msgid "confirm reset"
msgstr "Confirmer la réinitialisation"
-#: .\ldt_utils\views\content.py:339 .\ldt_utils\views\project.py:136
+#: .\ldt_utils\views\content.py:347 .\ldt_utils\views\project.py:136
#, python-format
msgid "please confirm reseting project %(title)s"
msgstr "Veuillez confirmer la réinitialisation du projet %(title)s"
-#: .\ldt_utils\views\content.py:367
+#: .\ldt_utils\views\content.py:374
msgid "An error occurred - Please try again or contact webmaster"
msgstr ""
"Une erreur est apparue - Merci de réessayer ou de contacter le webmaster"
-#: .\ldt_utils\views\content.py:368
+#: .\ldt_utils\views\content.py:375
msgid "Error"
msgstr "Erreur"
-#: .\ldt_utils\views\content.py:411
+#: .\ldt_utils\views\content.py:420
#, python-format
msgid ""
"Content '%(title)s' is referenced by this project : %(project_titles)s. "
@@ -1142,7 +1154,7 @@
"Le contenu '%(title)s' est référencé par les projets suivants : '%"
"(project_titles)s'.Veuillez les effacer préalablement."
-#: .\ldt_utils\views\content.py:414
+#: .\ldt_utils\views\content.py:423
#, python-format
msgid ""
"The project '%(project_title)s' pointing on the content '%(title)s' has "
@@ -1152,16 +1164,8 @@
"Le projet '%(project_title)s' référençant le contenu '%(title)s' comporte "
"plusieurs annotations. Voulez vous quand même supprimer le contenu ?"
-#: .\ldt_utils\views\content.py:440
-msgid "Content deletion failure"
-msgstr "Echec lors de la suppression du contenu"
-
-#: .\ldt_utils\views\content.py:450
-msgid "Commit of the content deletion failed"
-msgstr "Echec lors du commit de la suppression du contenu"
-
-#: .\ldt_utils\views\json.py:40 .\ldt_utils\views\rdf.py:15
-#: .\ldt_utils\views\workspace.py:205
+#: .\ldt_utils\views\json.py:39 .\ldt_utils\views\rdf.py:15
+#: .\ldt_utils\views\workspace.py:206
msgid "You can not access this project"
msgstr "vous n'avez pas l'autorisation d'accéder à ce projet"
@@ -1197,12 +1201,12 @@
msgid "confirm deletion"
msgstr "Confirmation d'effacement"
-#: .\ldt_utils\views\workspace.py:123
+#: .\ldt_utils\views\workspace.py:117
msgid ""
"The content does not exists or you are not allowed to access this content"
msgstr "Ce contenu n'existe pas, ou vous n'êtes pas autorisé a y acceder"
-#: .\ldt_utils\views\workspace.py:127
+#: .\ldt_utils\views\workspace.py:121
msgid "Parameters project_id or content_id must be given in the url"
msgstr "Les paramètres project_id et content_id doivent être passés dans l'URL"
@@ -1214,11 +1218,11 @@
msgid "You don't have the right permission to access this page"
msgstr "Vous n'avez pas l'autorisation d'accès à cette page."
-#: .\templates\404.html.py:6
+#: .\templates\404.html.py:7
msgid "404 error"
msgstr "Erreur 404"
-#: .\templates\404.html.py:9
+#: .\templates\404.html.py:10
msgid "Sorry, we couldn't find your page"
msgstr "Désolé, votre page est introuvable"
@@ -1406,12 +1410,12 @@
msgstr "Mot de passe :"
#: .\templates\admin\page_login.html.py:29
-#: .\user\templates\registration\login.html.py:39
+#: .\user\templates\registration\login.html.py:40
msgid "Create an account"
msgstr "Créer un compte"
#: .\templates\admin\page_login.html.py:30
-#: .\user\templates\registration\login.html.py:40
+#: .\user\templates\registration\login.html.py:41
msgid "Forget password?"
msgstr "mot de pass oublié ?"
@@ -1431,41 +1435,41 @@
msgid "Order:"
msgstr "Ordre :"
-#: .\templates\ldt\ldt_base.html.py:86
+#: .\templates\ldt\ldt_base.html.py:87
msgid "header_title"
msgstr "Plateforme Ldt"
-#: .\templates\ldt\ldt_base.html.py:90
+#: .\templates\ldt\ldt_base.html.py:91
msgid "Link to admin"
msgstr "Administration"
-#: .\templates\ldt\ldt_base.html.py:90
+#: .\templates\ldt\ldt_base.html.py:91
msgid "Staff"
msgstr "admin"
-#: .\templates\ldt\ldt_base.html.py:93
+#: .\templates\ldt\ldt_base.html.py:94
msgid "front link"
msgstr "front"
-#: .\templates\ldt\ldt_base.html.py:94
+#: .\templates\ldt\ldt_base.html.py:95
#: .\user\templates\ldt\user\change_profile.html.py:95
msgid "Profile change"
msgstr "Modification du profil"
-#: .\templates\ldt\ldt_base.html.py:114 .\templates\ldt\ldt_base.html.py:115
+#: .\templates\ldt\ldt_base.html.py:115 .\templates\ldt\ldt_base.html.py:116
msgid "home"
msgstr "accueil"
-#: .\templates\ldt\ldt_base.html.py:148
+#: .\templates\ldt\ldt_base.html.py:149
msgid "Version number"
msgstr "Numéro de version"
-#: .\templates\ldt\ldt_base.html.py:148
+#: .\templates\ldt\ldt_base.html.py:149
#, python-format
msgid " web %(WEB_VERSION)s | platform %(VERSION)s"
msgstr "web v%(WEB_VERSION)s | platform v%(VERSION)s "
-#: .\templates\ldt\ldt_raw_base.html.py:14
+#: .\templates\ldt\ldt_raw_base.html.py:15
msgid "page_title"
msgstr "Plateforme Ldt"
@@ -1526,7 +1530,7 @@
msgstr "Permissions"
#: .\user\admin.py:47 .\user\templates\ldt\user\change_profile.html.py:105
-#: .\user\templates\ldt\user\login_form.html.py:61
+#: .\user\templates\ldt\user\login_form.html.py:62
msgid "Password"
msgstr "Mot de passe"
@@ -1569,19 +1573,19 @@
msgid "Image size is limited to %s"
msgstr "La taille de l'image est limitée à %s"
-#: .\user\views.py:28
+#: .\user\views.py:26
msgid "Your profile has been updated."
msgstr "Votre profil a été modifié"
-#: .\user\views.py:52
+#: .\user\views.py:49
msgid "Your password has been updated."
msgstr "Votre mot de passe a été changé."
-#: .\user\views.py:76
+#: .\user\views.py:73
msgid "Your profile picture has been updated."
msgstr "Votre image de profil a été modifiée"
-#: .\user\views.py:98 .\user\templates\registration\login.html.py:24
+#: .\user\views.py:95 .\user\templates\registration\login.html.py:25
msgid "Sorry, that's not a valid username or password."
msgstr "Saisissez un nom d'utilisateur et un mot de passe valide."
@@ -1620,30 +1624,30 @@
msgid "Profile picture change"
msgstr "Modification de l'image de profil"
-#: .\user\templates\ldt\user\login_form.html.py:32
+#: .\user\templates\ldt\user\login_form.html.py:33
#: .\user\templates\registration\password_change_done.html.py:7
#: .\user\templates\registration\password_change_form.html.py:13
msgid "Profiles"
msgstr "Les profils"
-#: .\user\templates\ldt\user\login_form.html.py:50
+#: .\user\templates\ldt\user\login_form.html.py:51
msgid "create account"
msgstr "Créer un compte"
-#: .\user\templates\ldt\user\login_form.html.py:54
+#: .\user\templates\ldt\user\login_form.html.py:55
msgid "Pseudo"
msgstr "Pseudo"
-#: .\user\templates\ldt\user\login_form.html.py:57
-#: .\user\templates\ldt\user\login_form.html.py:64
+#: .\user\templates\ldt\user\login_form.html.py:58
+#: .\user\templates\ldt\user\login_form.html.py:65
msgid "this field is compulsory"
msgstr "Ce champs est obligatoire"
-#: .\user\templates\ldt\user\login_form.html.py:68
+#: .\user\templates\ldt\user\login_form.html.py:69
msgid "reset password"
msgstr "Réinitialiser le mot de passe"
-#: .\user\templates\ldt\user\login_form.html.py:71
+#: .\user\templates\ldt\user\login_form.html.py:72
msgid "Connection"
msgstr "Connexion"
@@ -1677,7 +1681,7 @@
msgid "Log in again"
msgstr "Se reconnecter"
-#: .\user\templates\registration\login.html.py:46
+#: .\user\templates\registration\login.html.py:47
msgid "login"
msgstr "Connexion"
@@ -1854,6 +1858,18 @@
"Nous vous avons envoyé par courriel les instructions pour activer le compte "
"à l'adresse que vous avez indiquée. Vous devriez le recevoir rapidement."
+#~ msgid "Content creation failure"
+#~ msgstr "Echec lors de la creation du contenu"
+
+#~ msgid "Commit of the content creation failed"
+#~ msgstr "Echec lors du commit de la creation du contenu"
+
+#~ msgid "Content deletion failure"
+#~ msgstr "Echec lors de la suppression du contenu"
+
+#~ msgid "Commit of the content deletion failed"
+#~ msgstr "Echec lors du commit de la suppression du contenu"
+
#~ msgid "Error 500"
#~ msgstr "Erreur 500"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/management/commands/initsitedomain.py Fri Dec 14 15:12:39 2012 +0100
@@ -0,0 +1,24 @@
+from django.core.management.base import BaseCommand
+from ldt.ldt_utils.models import Content, Project
+from ldt.ldt_utils.contentindexer import ContentIndexer, ProjectIndexer
+from django.conf import settings
+from django.db import models
+from django.contrib.sites.models import Site
+
+class Command(BaseCommand):
+ help = 'set the site domain to the right value according to the django settings'
+
+ def handle(self, *args, **options):
+ site = Site.objects.get(id=settings.SITE_ID)
+ web_url = settings.WEB_URL
+ if (web_url.startswith("http://")):
+ domain_area = web_url.split("//",1)
+ domain = domain_area[1]
+ else:
+ domain=web_url
+ if site.domain!=domain:
+ site.domain = domain
+ site.save()
+ if site.name!=domain:
+ site.name=domain
+ site.save()
\ No newline at end of file
--- a/src/ldt/ldt/security/cache.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/security/cache.py Fri Dec 14 15:12:39 2012 +0100
@@ -4,9 +4,12 @@
from django.contrib.auth.models import User
from django.db.models import Q
from guardian.shortcuts import assign
+from django.utils.encoding import smart_str
+import re
+import hashlib
def get_cached_checker(user):
- key_name = 'checker_%s' % user.username
+ key_name = get_key(user.username)
checker = cache.get(key_name)
if checker:
@@ -17,15 +20,15 @@
return checker
-def cached_assign(perm, user_or_group, object):
- assign(perm, user_or_group, object)
+def cached_assign(perm, user_or_group, object_inst):
+ assign(perm, user_or_group, object_inst)
if hasattr(user_or_group, 'username'):
- key = 'checker_%s' % user_or_group.username
+ key = get_key(user_or_group.username)
else:
- key = 'checker_%s' % user_or_group.name
+ key = get_key(user_or_group.name)
- cache.delete('checker_%s' % key)
+ cache.delete(key)
def get_cached_userlist():
@@ -36,4 +39,16 @@
query = Q(id=settings.ANONYMOUS_USER_ID) | Q(is_superuser=True)
userlist = User.objects.exclude(query)
cache.set('userlist', userlist)
- return userlist
\ No newline at end of file
+ return userlist
+
+def get_key(name):
+
+ name = smart_str(name, encoding="ascii", errors="replace")
+ name = re.sub(r"[^\w\s_\-]", '', name)
+ name = re.sub(r"\s+", '_', name)
+
+ key = "checker_%s" % name
+ if len(key) > 250:
+ key = hashlib.sha512(key).hexdigest()
+
+ return key
--- a/src/ldt/ldt/security/utils.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/security/utils.py Fri Dec 14 15:12:39 2012 +0100
@@ -1,9 +1,9 @@
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.core.cache import cache
-from guardian.shortcuts import assign, remove_perm, get_users_with_perms, get_groups_with_perms, get_objects_for_user
+from guardian.shortcuts import remove_perm, get_users_with_perms, get_groups_with_perms, get_objects_for_user
from cache import get_cached_userlist, cached_assign
-from ldt.security import change_security, get_current_user
+from ldt.security import change_security
import types
def unprotect_instance(instance):
--- a/src/ldt/ldt/static/ldt/js/embed_popup.js Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/embed_popup.js Fri Dec 14 15:12:39 2012 +0100
@@ -161,21 +161,21 @@
<div> \n \
<div id="'+player_id+'_embed" style="float:left; width:'+player_width_val+';" class="iri_player_embed">\n\
</div>\n\
-<script type="text/javascript" src="'+WEB_URL+LDT_MEDIA_PREFIX+'metadataplayer/LdtPlayer-core.js"></script>\n\
+<script type="text/javascript" src="'+LdtPlayer_core+'"></script>\n\
<script type="text/javascript">\n\
if (typeof jQuery == "undefined") {\n\
jQuery = IriSP.jQuery;\n\
}\n\
var metadatas = {metadata: {url: "'+json_url+'"}};\n\
var metadata_key = "metadata";\n\
- IriSP.libFiles.defaultDir = "'+WEB_URL+LDT_MEDIA_PREFIX+'js/";\n\
- IriSP.libFiles.locations.jwPlayerSWF = "'+WEB_URL+LDT_MEDIA_PREFIX+'swf/player.swf";\n\
- IriSP.libFiles.locations.recordMicSwf = "'+WEB_URL+LDT_MEDIA_PREFIX+'swf/record_mic.swf";\n\
- IriSP.libFiles.locations.zeroClipboardSwf = "'+WEB_URL+LDT_MEDIA_PREFIX+'swf/ZeroClipboard10.swf";\n\
- IriSP.libFiles.locations.cssjQueryUI = "'+WEB_URL+LDT_MEDIA_PREFIX+'css/jq-css/themes/base/jquery-ui.css"\n\
+ IriSP.libFiles.defaultDir = "'+defaultDir+'";\n\
+ IriSP.libFiles.locations.jwPlayerSWF = "'+jwPlayerSWF+'";\n\
+ IriSP.libFiles.locations.recordMicSwf = "'+recordMicSwf+'";\n\
+ IriSP.libFiles.locations.zeroClipboardSwf = "'+zeroClipboardSwf+'";\n\
+ IriSP.libFiles.locations.cssjQueryUI = "'+cssjQueryUI+'"\n\
IriSP.language = "'+LANGUAGE_CODE+'";\n\
\n\
- IriSP.widgetsDir = "'+WEB_URL+LDT_MEDIA_PREFIX+'metadataplayer";\n\
+ IriSP.widgetsDir = "'+widgetsDir+'";\n\
var _metadata = {\n\
url: metadatas[metadata_key].url + "?callback=?",\n\
format: "ldt"\n\
@@ -183,7 +183,7 @@
var _config = {\n\
width: "'+player_width_val+'",\n\
container: "'+player_id+'_embed",\n\
- css: "'+WEB_URL+LDT_MEDIA_PREFIX+'metadataplayer/LdtPlayer-core.css",\n\
+ css: "'+configCss+'",\n\
default_options: {\n\
metadata: _metadata\n\
},\n';
@@ -386,9 +386,10 @@
if(annotationslist_val.checked){
widget_code+=',{\n\
type: "AnnotationsList",\n\
+ ajax_url: "'+segment_api+'",\n\
container: "AnnotationsList_ext",\n\
ajax_granularity : 300000,\n\
- default_thumbnail : "'+WEB_URL+LDT_MEDIA_PREFIX+'css/imgs/video_sequence.png",\n\
+ default_thumbnail : "'+default_thumbnail+'",\n\
show_audio: true,\n\
rtmp_streamer: "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/"\n\
}';
@@ -649,7 +650,12 @@
var sparkline_val=document.getElementById('sparkline_checkbox');
var tagcloud_val=document.getElementById('tagcloud_checkbox');
iframeUrl= iframe_url;
- iframeUrl+="&player_height="+$j("#player_height").val()+"&player_width="+$j("#player_width").val();
+
+ if($j("#player_height").val()!=300)
+ iframeUrl+="&player_height="+$j("#player_height").val();
+ if ($j("#player_width").val()!=550)
+ iframeUrl+="&player_width="+$j("#player_width").val();
+
if(createannotation_val.checked){
iframeUrl+="&createannotation=True";
var show_mic_record_val = document.getElementById('show_mic_record_checkbox');
@@ -687,12 +693,18 @@
polemic_qColor =$j("#polemic_q_color").val();
polemic_qColor_code_array=polemic_qColor.split("#");
qColor_code=polemic_qColor_code_array[1];
- iframeUrl+="&polemic_defaultColor="+defaultColor_code;
- iframeUrl+="&polemic_foundColor="+foundColor_code;
- iframeUrl+="&polemic_okColor="+okColor_code;
- iframeUrl+="&polemic_koColor="+koColor_code;
- iframeUrl+="&polemic_refColor="+refColor_code;
- iframeUrl+="&polemic_qColor="+qColor_code;
+ if(defaultColor_code!="585858")
+ iframeUrl+="&polemic_defaultColor="+defaultColor_code;
+ if(foundColor_code!="fc00ff")
+ iframeUrl+="&polemic_foundColor="+foundColor_code;
+ if(okColor_code!="1d973d")
+ iframeUrl+="&polemic_okColor="+okColor_code;
+ if(koColor_code!="ce0a15")
+ iframeUrl+="&polemic_koColor="+koColor_code;
+ if(refColor_code!="c5a62d")
+ iframeUrl+="&polemic_refColor="+refColor_code;
+ if(qColor_code!="036aae")
+ iframeUrl+="&polemic_qColor="+qColor_code;
}
else{
@@ -701,6 +713,9 @@
if(annotationslist_val.checked){
iframeUrl+="&annotations_list=True";
}
+ if(annotation_val.checked){
+ iframeUrl+="&annotation=True";
+ }
if(slideshare_val.checked){
iframeUrl+="&slideshare=True";
}
@@ -711,27 +726,27 @@
show_gplus=document.getElementById("show_gplus_checkbox");
show_mail=document.getElementById("show_mail_checkbox");
iframeUrl+="&social=True";
- if(show_url.checked){
- iframeUrl+="&show_url=True";
+ if(!show_url.checked){
+ iframeUrl+="&show_url=False";
}
- if(show_twitter.checked){
- iframeUrl+="&show_twitter=True";
+ if(!show_twitter.checked){
+ iframeUrl+="&show_twitter=False";
}
- if(show_fb.checked){
- iframeUrl+="&show_fb=True";
+ if(!show_fb.checked){
+ iframeUrl+="&show_fb=False";
}
- if(show_gplus.checked){
- iframeUrl+="&show_gplus=True";
+ if(!show_gplus.checked){
+ iframeUrl+="&show_gplus=False";
}
- if(show_mail.checked){
- iframeUrl+="&show_mail=True";
+ if(!show_mail.checked){
+ iframeUrl+="&show_mail=False";
}
}
if(tweet_val.checked){
iframeUrl+="&tweet=True";
}
- if(segments_val.checked){
- iframeUrl+="&segments=True";
+ if(!segments_val.checked){
+ iframeUrl+="&segments=False";
}
if(sparkline_val.checked){
iframeUrl+="&sparkline=True";
@@ -741,8 +756,10 @@
sparkline_fillColor=$j("#sparkline_fill_color").val();
fillColor_code_array = sparkline_fillColor.split("#");
fillColor_code=fillColor_code_array[1];
- iframeUrl+="&sparkline_lineColor="+lineColor_code;
- iframeUrl+="&sparkline_fillColor="+fillColor_code;
+ if(lineColor_code!="7492b4")
+ iframeUrl+="&sparkline_lineColor="+lineColor_code;
+ if(fillColor_code!="aeaeb8")
+ iframeUrl+="&sparkline_fillColor="+fillColor_code;
}
if(tagcloud_val.checked){
iframeUrl+="&tagcloud=True";
--- a/src/ldt/ldt/static/ldt/js/projectscontents.js Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/projectscontents.js Fri Dec 14 15:12:39 2012 +0100
@@ -324,7 +324,7 @@
}
function display_loading_icon (project) {
- project.attr('src', LDT_MEDIA_PREFIX + "img/ajax-loader-transp.gif");
+ project.attr('src', project_load_src);
}
function init_events_groups (base_node, embed_url, groupfilterurl) {
--- a/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js Fri Dec 14 15:12:39 2012 +0100
@@ -389,9 +389,9 @@
* Nous remplissons les données de l'annotation générée à la volée
* ATTENTION: Si nous sommes sur un MASHUP, ces éléments doivent se référer AU MEDIA D'ORIGINE
* */
+ _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
_annotation.setBegin(this.begin); /*Timecode de début */
_annotation.setEnd(this.end); /* Timecode de fin */
- _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
_annotation.setAnnotationType(_annotationType.id); /* Id du type d'annotation */
if (this.show_title_field) {
--- a/src/ldt/ldt/static/ldt/metadataplayer/LdtPlayer-core.js Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/LdtPlayer-core.js Fri Dec 14 15:12:39 2012 +0100
@@ -491,7 +491,8 @@
var _iexact = _iexact || false,
_rgxp = Model.regexpFromTextOrArray(_text, true);
return this.filter(function(_element) {
- return _rgxp.test(_element.description) || _rgxp.test(_element.title);
+ var keywords = (_element.keywords || _element.getTagTexts() || []).join(", ");
+ return _rgxp.test(_element.description) || _rgxp.test(_element.title) || _rgxp.test(keywords);
});
}
@@ -676,7 +677,7 @@
}
_res += pad(2, _hms.minutes) + ':' + pad(2, _hms.seconds);
if (showCs) {
- _res += "." + Math.round(_hms.milliseconds / 100)
+ _res += "." + Math.floor(_hms.milliseconds / 100)
}
return _res;
}
@@ -1252,12 +1253,12 @@
Model.Source.prototype.getList = function(_listId, _global) {
_global = (typeof _global !== "undefined" && _global);
- if (_global || typeof this.contents[_listId] === "undefined") {
+ if (_global) {
return this.directory.getGlobalList().filter(function(_e) {
return (_e.elementType === _listId);
});
} else {
- return this.contents[_listId];
+ return this.contents[_listId] || new IriSP.Model.List(this.directory);
}
}
@@ -1391,6 +1392,7 @@
url: this.url,
dataType: dataType,
data: urlparams,
+ traditional: true,
success: function(_result) {
_this.deSerialize(_result);
_this.handleCallbacks();
@@ -1491,6 +1493,9 @@
noCss: true,
requires: [ "popcorn" ]
},
+ HtmlPlayer: {
+ noCss: true
+ },
JwpPlayer: {
noCss: true,
requires: [ "jwplayer" ]
--- a/src/ldt/ldt/static/ldt/metadataplayer/Mediafragment.js Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Mediafragment.js Fri Dec 14 15:12:39 2012 +0100
@@ -18,14 +18,15 @@
IriSP.Widgets.Mediafragment.prototype.draw = function() {
this.onMediaEvent("pause","setHashToTime");
- this.onMediaEvent("seeked","setHashToTime");
- this.goToHash();
var _this = this;
this.getWidgetAnnotations().forEach(function(_annotation) {
_annotation.on("click", function() {
_this.setHashToAnnotation(_annotation.id);
})
- })
+ });
+ this.player.on("widgets-loaded", function() {
+ _this.goToHash();
+ });
}
IriSP.Widgets.Mediafragment.prototype.setWindowHash = function(_hash) {
--- a/src/ldt/ldt/static/ldt/metadataplayer/Trace.js Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Trace.js Fri Dec 14 15:12:39 2012 +0100
@@ -16,22 +16,11 @@
}
IriSP.Widgets.Trace.prototype.draw = function() {
- this.lastEvent = "";
if (typeof window.tracemanager === "undefined") {
console.log("Tracemanager not found");
return;
}
var _this = this,
- _mdplisteners = {
- "search.open" : 0,
- "search.closed" : 0,
- "search" : 0,
- "search.cleared" : 0,
- "search.matchFound" : 0,
- "search.noMatchFound" : 0,
- "search.triggeredSearch" : 0,
- "TraceWidget.MouseEvents" : 0
- }
_medialisteners = {
"play" : 0,
"pause" : 0,
@@ -39,17 +28,8 @@
"seeked" : 0,
"play" : 0,
"pause" : 0,
- "timeupdate" : 2000
+ "timeupdate" : 10000
};
- IriSP._(_mdplisteners).each(function(_ms, _listener) {
- var _f = function(_arg) {
- _this.eventHandler(_listener, _arg);
- }
- if (_ms) {
- _f = IriSP._.throttle(_f, _ms);
- }
- _this.onMdpEvent(_listener, _f);
- });
IriSP._(_medialisteners).each(function(_ms, _listener) {
var _f = function(_arg) {
_this.eventHandler(_listener, _arg);
@@ -74,10 +54,10 @@
this.tracer.trace("TraceWidgetInit", {});
this.mouseLocation = '';
- IriSP.jQuery(".Ldt-Widget").on("click mouseover mouseout", ".Ldt-TraceMe", function(_e) {
+ IriSP.jQuery(".Ldt-Widget").on("click mouseenter mouseleave", ".Ldt-TraceMe", function(_e) {
var _target = IriSP.jQuery(this);
- var _widget = IriSP.jQuery(this).attr("widget-type"),
+ var _widget = _target.attr("widget-type") || _target.parents(".Ldt-Widget").attr("widget-type"),
_data = {
"type": _e.type,
"x": _e.clientX,
@@ -88,42 +68,16 @@
_class = _targetEl.className,
_name = _targetEl.localName,
_id = _targetEl.id,
- _value = _targetEl.value,
- _traceInfo = _target.attr("trace-info"),
- _lastTarget = _name + (_id && _id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class && _class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : '');
- _data.target = _lastTarget
- if (typeof _traceInfo == "string" && _traceInfo.length) {
+ _value = _target.val(),
+ _traceInfo = _target.attr("trace-info");
+ _data.target = _name + (_id && _id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class && _class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : '');
+ if (typeof _traceInfo == "string" && _traceInfo) {
_data.traceInfo = _traceInfo;
- _lastTarget += ( ";" + _traceInfo );
}
if (typeof _value == "string" && _value.length) {
_data.value = _value;
}
- switch(_e.type) {
- case "mouseover":
- if (_this.lastTarget != _lastTarget) {
- _this.player.trigger('TraceWidget.MouseEvents', _data);
- } else {
- if (typeof _this.moTimeout != "undefined") {
- clearTimeout(_this.moTimeout);
- _this.moTimeout = undefined;
- }
- }
- break;
- case "mouseout":
- if (typeof _this.moTimeout != "undefined") {
- clearTimeout(_this.moTimeout);
- }
- _this.moTimeout = setTimeout(function() {
- if (_lastTarget != _this.lastTarget) {
- _this.player.trigger('TraceWidget.MouseEvents', _data);
- }
- },100);
- break;
- default:
- _this.player.trigger('TraceWidget.MouseEvents', _data);
- }
- _this.lastTarget = _lastTarget;
+ _this.eventHandler('UIEvent', _data);
});
}
@@ -136,7 +90,7 @@
_arg = {}
}
switch(_listener) {
- case 'IriSP.TraceWidget.MouseEvents':
+ case 'UIEvent':
_traceName += _arg.widget + '_' + _arg.type;
delete _arg.widget;
delete _arg.type;
@@ -152,7 +106,6 @@
default:
_traceName += _listener.replace('.','_');
}
- this.lastEvent = _traceName;
if (typeof this.extend === "object" && this.extend) {
IriSP._(_arg).extend(this.extend);
}
@@ -160,4 +113,4 @@
if (this.js_console && typeof window.console !== "undefined" && typeof console.log !== "undefined") {
console.log("tracer.trace('" + _traceName + "', " + JSON.stringify(_arg) + ");");
}
-}
+}
\ No newline at end of file
--- a/src/ldt/ldt/templates/403.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/templates/403.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,10 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
-
+{% load absstatic %}
{% block content %}
<div style="text-align:center;vertical-align:middle;">
<h1>{% trans '403 error' %}</h1>
- <img src="{{LDT_MEDIA_PREFIX}}/img/403_gandalf.gif" alt="Gif 404" style="display:block;margin:auto;vertical-align:middle;"/>
+ <img src='{% absstatic "ldt/img/403_gandalf.gif" %}'alt="Gif 404" style="display:block;margin:auto;vertical-align:middle;"/>
<br>
<h1>{% trans "You don't have the right permission to access this page" %}</h1>
</div>
--- a/src/ldt/ldt/templates/404.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/templates/404.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,11 @@
{% extends "ldt/ldt_base.html" %}
{% load i18n %}
+{% load absstatic %}
{% block content %}
<div style="text-align:center;vertical-align:middle;">
<h1>{% trans '404 error' %}</h1>
- <img src="{{LDT_MEDIA_PREFIX}}/img/404_gandalf.gif" alt="Gif 404" style="display:block;margin:auto;vertical-align:middle;"/>
+ <img src='{% absstatic "ldt/img/404_gandalf.gif" %}' alt="Gif 404" style="display:block;margin:auto;vertical-align:middle;"/>
<br>
<h1>{% trans "Sorry, we couldn't find your page" %}</h1>
</div>
--- a/src/ldt/ldt/templates/base.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/templates/base.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,3 +1,4 @@
+{% load absstatic %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
{% block html_declare %}
<html lang="en">
@@ -5,7 +6,7 @@
<head>
<title>{% if user.is_authenticated %}Hello {{ user }}{% else %}Please login{% endif %}</title>
- <link rel="stylesheet" type="text/css" media="screen" href="{{ LDT_MEDIA_PREFIX }}css/socialauth.css" />
+ <link rel="stylesheet" type="text/css" media="screen" href='{% absstatic "ldt/css/socialauth.css" %}' />
{% block extra_head %}
{% endblock %}
</head>
--- a/src/ldt/ldt/templates/ldt/ldt_base.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/templates/ldt/ldt_base.html Fri Dec 14 15:12:39 2012 +0100
@@ -2,20 +2,21 @@
{% load i18n %}
{% load logintag %}
{% load navigation %}
+{% load absstatic %}
{% load thumbnail %}
{% block js_import %}
<script type="text/javascript">
- var LDT_MEDIA_PREFIX = "{{LDT_MEDIA_PREFIX}}"; // Required for search bar icon in projectscontents.js
+ var project_load_src = '{% absstatic "ldt/img/ajax-loader-transp.gif" %}'; // Required for search bar icon in projectscontents.js
</script>
{{ block.super }}
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.nyroModal.min.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.nyroModal.min.js" %}'></script>
<!--[if IE 6]>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.nyroModal-ie6.min.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.nyroModal-ie6.min.js" %}'></script>
<![endif]-->
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.qtip.min.js"></script>
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.validate.js" ></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.qtip.min.js" %}'></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.validate.js" %}' ></script>
{% endblock %}
{% block js_declaration %}
@@ -71,10 +72,10 @@
{% block css_import %}
{{ block.super }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/tabs.css" type="text/css" media="screen, projection" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/nyroModal.css" type="text/css"/>
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/js/login_ajax/login_ajax.css" type="text/css"/>
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/jquery.qtip.min.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/tabs.css" %}' type="text/css" media="screen, projection" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/nyroModal.css" %}' type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/js/login_ajax/login_ajax.css" %}' type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/jquery.qtip.min.css" %}' type="text/css"/>
{% endblock %}
{% block body %}
@@ -140,7 +141,7 @@
<div id="footer" class="span-24 last">
{% block footer %}
<div class="footer_img">
- <a href="http://www.iri.centrepompidou.fr"><img src="{{LDT_MEDIA_PREFIX}}/img/logo_IRI_footer.png" alt="Logo IRI" /></a>
+ <a href="http://www.iri.centrepompidou.fr"><img src='{% absstatic "ldt/img/logo_IRI_footer.png" %}' alt="Logo IRI" /></a>
</div>
<div style="float: right; text-align: right;" class="small" id="copyright_version">
<div>©2011 <a style="text-decoration: none; color: #4F5155;" href="http://www.iri.centrepompidou.fr">IRI</a></div>
--- a/src/ldt/ldt/templates/ldt/ldt_raw_base.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/templates/ldt/ldt_raw_base.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,6 +1,7 @@
{% load i18n %}
{% load logintag %}
{% load navigation %}
+{% load absstatic %}
{% load analytics %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -10,28 +11,28 @@
{% block head %}
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta http-equiv="content-language" content="{{LANGUAGE_CODE}}" />
- <link rel="SHORTCUT ICON" href="{{LDT_MEDIA_PREFIX}}/img/favicon.ico" />
+ <link rel="SHORTCUT ICON" href='{% absstatic "ldt//img/favicon.ico" %}' />
<title>{% block title %}{% trans "page_title" %}{% endblock %}</title>
{% block js_import %}
- <script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/jquery.min.js"></script>
+ <script type="text/javascript" src='{% absstatic "ldt/js/jquery.min.js" %}'></script>
{% endblock %}
{% block css_declaration %}
<style type="text/css">
.rounded {
- behavior:url("{{LDT_MEDIA_PREFIX}}css/border-radius.htc");
+ behavior:url('{% absstatic "ldt/css/border-radius.htc" %}');
}
</style>
{% endblock %}
{% block css_import %}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/blueprint/screen.css" type="text/css" media="screen, projection" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/blueprint/print.css" type="text/css" media="print" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/blueprint/screen.css" %}' type="text/css" media="screen, projection" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/blueprint/print.css" %}' type="text/css" media="print" />
<!--[if lt IE 8]>
<link rel="stylesheet" href="{{BASE_URL}}static/css/blueprint/ie.css" type="text/css" media="screen, projection" />
<![endif]-->
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/style.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/style.css" %}' type="text/css"/>
{% endblock %}
{% block js_declaration %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/templatetags/absstatic.py Fri Dec 14 15:12:39 2012 +0100
@@ -0,0 +1,24 @@
+from django import template
+from django.contrib.staticfiles.storage import staticfiles_storage
+from django.contrib.sites.models import Site
+from django.template import Library
+import logging
+import urlparse
+
+register = template.Library()
+
+@register.simple_tag
+def absstatic(context, path):
+ try:
+ request=context['request']
+ if request.is_secure():
+ domain = "https://%s" % Site.objects.get_current().domain
+ else:
+ domain = "http://%s" % Site.objects.get_current().domain
+ except:
+ domain = "http://%s" % Site.objects.get_current().domain
+
+ new_path = staticfiles_storage.url(path)
+ return urlparse.urljoin(domain, new_path)
+
+absstatic=register.simple_tag(takes_context=True)(absstatic)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/templatetags/absurl.py Fri Dec 14 15:12:39 2012 +0100
@@ -0,0 +1,31 @@
+import urlparse
+from django.template import Library
+from django.template.defaulttags import URLNode, url
+from django.contrib.sites.models import Site
+import logging
+
+
+register = Library()
+
+class AbsoluteURLNode(URLNode):
+ def render(self, context):
+ path = super(AbsoluteURLNode, self).render(context)
+ try:
+ request=context['request']
+ if request.is_secure():
+ domain = "https://%s" % Site.objects.get_current().domain
+ else:
+ domain = "http://%s" % Site.objects.get_current().domain
+ except:
+ domain = "http://%s" % Site.objects.get_current().domain
+ return urlparse.urljoin(domain, path)
+
+@register.simple_tag
+def absurl(parser, token, node_cls=AbsoluteURLNode):
+ """Just like {% url %} but ads the domain of the current site."""
+ node_instance = url(parser, token)
+ return node_cls(view_name=node_instance.view_name,
+ args=node_instance.args,
+ kwargs=node_instance.kwargs,
+ asvar=node_instance.asvar)
+absurl = register.tag(absurl)
\ No newline at end of file
--- a/src/ldt/ldt/user/templates/ldt/user/login_form.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/user/templates/ldt/user/login_form.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,11 @@
{% load i18n %}
+{% load absurl %}
{# print user's state and form of login #}
{% block js_import %}
{{block.super}}
<script language="javascript">
- var url_login_ajax='{{WEB_URL}}{% url ldt.user.views.login_ajax %}';
+ var url_login_ajax='{% absurl ldt.user.views.login_ajax %}';
{% if reload %}
var reload=true;
{% else %}
--- a/src/ldt/ldt/user/templates/ldt/user/user_base.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/user/templates/ldt/user/user_base.html Fri Dec 14 15:12:39 2012 +0100
@@ -2,10 +2,11 @@
{# this page inherit base html, all pages of ldt inherit this page. #}
{# all contents are writed in the "iricontent" block #}
{% load i18n %}
+{% load absstatic %}
{% block css_import %}
{{ block.super }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/workspace.css" type="text/css"/>
+ <link rel="stylesheet" href='{% absstatic "ldt/css/workspace.css" %}' type="text/css"/>
{% endblock %}
--- a/src/ldt/ldt/user/templates/registration/base.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/user/templates/registration/base.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,9 +1,10 @@
{% extends "ldt/user/user_base.html" %}
+{% load absstatic %}
{% block js_import %}
{{ block.super }}
{% endblock %}
{% block css_import %}
{{ block.super }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/registration.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/registration.css" %}' />
{% endblock %}
{% block pageclass %}profile{% endblock %}
--- a/src/ldt/ldt/user/templates/registration/login.html Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/user/templates/registration/login.html Fri Dec 14 15:12:39 2012 +0100
@@ -1,5 +1,6 @@
{% extends "registration/base.html" %}
{% load i18n %}
+{% load absstatic %}
{% block js_declaration %}{{ block.super }}
<script type="text/javascript">
$(document).ready(function() {
@@ -10,8 +11,8 @@
{% block css_import %}
{{ block.super }}
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
- <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}' />
+ <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
{% endblock %}
--- a/src/ldt/ldt/utils/__init__.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/utils/__init__.py Fri Dec 14 15:12:39 2012 +0100
@@ -3,5 +3,5 @@
def Property(func):
return property(**func())
-def generate_hash(str):
- return hashlib.sha512(str).hexdigest() if str is not None else None
+def generate_hash(str_hash):
+ return hashlib.sha512(str_hash).hexdigest() if str_hash is not None else None
--- a/src/ldt/ldt/utils/context_processors.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/utils/context_processors.py Fri Dec 14 15:12:39 2012 +0100
@@ -1,10 +1,11 @@
from ldt import settings
+from ldt.utils.web_url_management import get_web_url
import ldt
def ldt_context(request):
return {'BASE_URL': settings.BASE_URL, 'MEDIA_URL': settings.MEDIA_URL, \
- 'LDT_MEDIA_PREFIX': settings.LDT_MEDIA_PREFIX, 'WEB_URL': settings.WEB_URL, \
+ 'WEB_URL': get_web_url(), \
'ADMIN_MEDIA_PREFIX': settings.ADMIN_MEDIA_PREFIX, 'VERSION': ldt.get_version(), \
'WEB_VERSION' : settings.WEB_VERSION, }
--- a/src/ldt/ldt/utils/url.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/ldt/utils/url.py Fri Dec 14 15:12:39 2012 +0100
@@ -1,8 +1,26 @@
+from django.contrib.staticfiles.storage import staticfiles_storage
+from django.core.urlresolvers import reverse
+from ldt.utils.web_url_management import get_web_url
from ldt import settings
import httplib2
import re
import urlparse
+def absstatic(request, path):
+ domain=get_web_url(request)
+ new_path = staticfiles_storage.url(path)
+ return urlparse.urljoin(domain, new_path)
+
+def absurl(request, viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None):
+ domain=get_web_url(request)
+ path=reverse(viewname, urlconf, args, kwargs, prefix, current_app)
+ return urlparse.urljoin(domain, path)
+
+def absurl_norequest(viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None):
+ domain=get_web_url()
+ path=reverse(viewname, urlconf, args, kwargs, prefix, current_app)
+ return urlparse.urljoin(domain, path)
+
def request_with_auth(url, method='GET'):
h = httplib2.Http()
web_auth = settings.WEB_AUTH if settings.WEB_AUTH else []
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/utils/web_url_management.py Fri Dec 14 15:12:39 2012 +0100
@@ -0,0 +1,11 @@
+from django.contrib.sites.models import Site
+
+def get_web_url(request=None):
+ if request:
+ if request.is_secure():
+ domain = "https://%s" % Site.objects.get_current().domain
+ else:
+ domain = "http://%s" % Site.objects.get_current().domain
+ else :
+ domain = "http://%s" % Site.objects.get_current().domain
+ return domain
--- a/src/ldt/setup.py Thu Dec 06 14:39:14 2012 +0100
+++ b/src/ldt/setup.py Fri Dec 14 15:12:39 2012 +0100
@@ -102,10 +102,10 @@
cmdclass = cmdclasses,
scripts=[],
url='http://www.iri.centrepompidou.fr/dev/hg/platform',
- license='LICENSE.txt',
+ license='LICENSE',
description='Platform ldt',
long_description=open('README').read(),
- classifiers=['Development Status :: 5 - Production/Stable',
+ classifiers=['Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',