Merge with d79097e98244a8f6611a950c95323517300eb4e4
authorverrierj
Wed, 30 Nov 2011 10:44:15 +0100
changeset 262 1105a5ed9f8f
parent 261 14b59dcd2731 (diff)
parent 227 d79097e98244 (current diff)
child 263 eba92ea32281
Merge with d79097e98244a8f6611a950c95323517300eb4e4
.pydevproject
src/ldt/ldt/ldt_utils/forms.py
src/ldt/ldt/ldt_utils/middleware/userprofile.py
src/ldt/ldt/ldt_utils/models.py
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html
src/ldt/ldt/ldt_utils/views.py
src/ldt/ldt/static/ldt/js/projectscontents.js
--- a/.project	Wed Nov 23 11:12:31 2011 +0100
+++ b/.project	Wed Nov 30 10:44:15 2011 +0100
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>platform</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.python.pydev.PyDevBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.python.pydev.pythonNature</nature>
-		<nature>org.python.pydev.django.djangoNature</nature>
-	</natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>platform_group</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+		<nature>org.python.pydev.django.djangoNature</nature>
+	</natures>
+</projectDescription>
--- a/.pydevproject	Wed Nov 23 11:12:31 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?eclipse-pydev version="1.0"?>
-
-<pydev_project>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python_platform</pydev_property>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
-<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
-<path>/platform/src/ldt</path>
-<path>/platform/web</path>
-</pydev_pathproperty>
-<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
-<key>DJANGO_MANAGE_LOCATION</key>
-<value>web/ldtplatform/manage.py</value>
-</pydev_variables_property>
-</pydev_project>
--- a/src/ldt/ldt/ldt_utils/__init__.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/__init__.py	Wed Nov 30 10:44:15 2011 +0100
@@ -1,2 +1,2 @@
 VERSION = (0, 1)
-VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION)))
+VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION)))  
\ No newline at end of file
--- a/src/ldt/ldt/ldt_utils/admin.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/admin.py	Wed Nov 30 10:44:15 2011 +0100
@@ -7,11 +7,18 @@
 from ldt.ldt_utils.forms import LdtImportForm, ReindexForm
 from ldt.ldt_utils.models import Content, Project, Media, Author
 import ldt.indexation
+from guardian.admin import GuardedModelAdmin
 
+class ProjectAdmin(GuardedModelAdmin):
+    pass
 
-admin.site.register(Project)
+class AuthorAdmin(GuardedModelAdmin):
+    pass
 
-class ContentAdmin(admin.ModelAdmin):
+class MediaAdmin(GuardedModelAdmin):
+    pass
+
+class ContentAdmin(GuardedModelAdmin):
     
     def import_file(self, request):
         if request.method == 'POST':
@@ -82,6 +89,7 @@
         return content_urls + urls
 
 
+admin.site.register(Project, ProjectAdmin)
 admin.site.register(Content, ContentAdmin)
-admin.site.register(Media)
-admin.site.register(Author)
+admin.site.register(Media, MediaAdmin)
+admin.site.register(Author, AuthorAdmin)
--- a/src/ldt/ldt/ldt_utils/forms.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/forms.py	Wed Nov 30 10:44:15 2011 +0100
@@ -1,5 +1,6 @@
 from django import forms
 from django.utils.translation import ugettext_lazy as _
+from django.contrib.auth.models import User, Group
 from ldt.forms import widgets as ldt_widgets
 from models import Project, Content, Media
 from utils import generate_uuid
@@ -13,11 +14,17 @@
     title = forms.CharField(required=True)
     contents = forms.ModelMultipleChoiceField(Content.objects.all()) #@UndefinedVariable
     description = forms.CharField(widget=forms.Textarea, required=False)
+    groups = forms.ModelMultipleChoiceField(Group.objects.all(), required=False)
     # owner = forms.ModelChoiceField(Author.objects.all())
     class Meta:
         model = Project
         exclude = ("ldt_id", "ldt", "created_by", "changed_by", "creation_date", "modification_date", "state", "owner")   
 
+class PermissionForm(forms.Form):
+    share = forms.BooleanField(required=False, widget=forms.CheckboxInput(attrs={'class':'checkbox_group'}))
+    perms = forms.CharField(required=False, widget=forms.HiddenInput(attrs={'class':'perm_field'})) 
+    group = forms.IntegerField(required=False, widget=forms.HiddenInput())
+
 class ReindexForm(forms.Form):
     contents = forms.ModelMultipleChoiceField(Content.objects.all()) #@UndefinedVariable
     index_projects = forms.BooleanField(required=False, initial=False)
@@ -33,14 +40,14 @@
 
 class CopyProjectForm (forms.Form):
     title = forms.CharField()
-    
+    group = forms.IntegerField()    
 
 class ContentForm(forms.ModelForm):
-
     #iri_id = forms.CharField(max_length=1024, widget=forms.HiddenInput, initial=generate_uuid)
     iriurl = forms.CharField(max_length=1024, widget=forms.HiddenInput, required=False)
     content_creation_date = forms.SplitDateTimeField(widget=ldt_widgets.LdtSplitDateTime, required=False, label=_("content.content_creation_date"))
     media_input_type = forms.ChoiceField(required=False, label=_("content.media_input_type"), choices=(("upload", _("file_upload")), ("url", _("url")), ("link", _("existing_media")), ("create", _("create_media")), ("none", _("none_media"))))
+    groups = forms.ModelMultipleChoiceField(Group.objects.all(), required=False)
     
     def clean_iri_id(self):
         data = self.cleaned_data.get('iri_id')
@@ -83,3 +90,11 @@
         css = {
             'all' : ('admin/css/forms.css', 'admin/css/base.css', 'admin/css/widgets.css')
                }
+        
+class GroupAddForm(forms.ModelForm):
+    name = forms.CharField(required=True)
+    members_list = forms.ModelMultipleChoiceField(User.objects.all(), required=False)
+    admin_list = forms.ModelMultipleChoiceField(User.objects.all(), required=False)
+    
+    class Meta:
+        model = Group
--- a/src/ldt/ldt/ldt_utils/middleware/userprofile.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/middleware/userprofile.py	Wed Nov 30 10:44:15 2011 +0100
@@ -4,10 +4,14 @@
 class LanguageMiddleware(object):
 
     def process_request(self, request):
+        
         if request.user.is_authenticated():
-            language = request.user.get_profile().language
+            profile = request.user.get_profile()
+            request.user.is_regular = profile.is_regular
+            language = profile.language
         else:
             language = settings.LANGUAGE_CODE[:2]
+            request.user.is_regular = False
             
         translation.activate(language)
         request.LANGUAGE_CODE = translation.get_language()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,155 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import DataMigration
+from django.db import models
+from django.conf import settings
+from django.contrib.auth.models import Group, User
+from ldt.ldt_utils.models import Project
+from guardian.shortcuts import assign
+
+class Migration(DataMigration):
+
+    def forwards(self, orm):
+        
+        for model in ["project", "content", "segment", "author", "media"]:
+            self.add_perm(orm, model)            
+      
+        everyone = Group.objects.create(name=settings.PUBLIC_GROUP_NAME)
+        
+        for proj in Project.objects.all():
+            assign('ldt_utils.change_project', proj.owner)
+            assign('ldt_utils.view_project', proj.owner)
+        
+        for user in User.objects.all():
+            if user.is_staff:
+                profile = user.get_profile()
+                profile.is_regular = True
+                profile.save()
+            user.groups.add(everyone) 
+
+    
+    def add_perm(self, orm, model_name):
+        # Since south does not migrate permissions, they need to
+        # be added to the database manually
+        ct, created = orm['contenttypes.ContentType'].objects.get_or_create(model=model_name, app_label='ldt_utils') # model must bei lowercase!
+        orm['auth.permission'].objects.get_or_create(content_type=ct, codename='view_%s' % model_name, defaults={'name': 'Can view %s' % model_name })
+   
+    def backwards(self, orm):
+        "Write your backwards methods here."
+
+
+    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': '512', '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'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'iri_id': ('django.db.models.fields.CharField', [], {'default': "u'b6e0454f-174c-11e1-af90-001485352c9a'", 'unique': 'True', 'max_length': '1024'}),
+            '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.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', [], {'unique': 'True', 'max_length': '1024'}),
+            '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'}),
+            'ldt': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+            'ldt_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '1024'}),
+            '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': {'unique_together': "(('project_id', 'iri_id', 'ensemble_id', 'cutting_id', 'element_id'),)", 'object_name': 'Segment'},
+            'abstract': ('django.db.models.fields.TextField', [], {'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': '1024'}),
+            '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': '1024'}),
+            'ensemble_id': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'iri_id': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
+            'project_id': ('django.db.models.fields.CharField', [], {'max_length': '1024', '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'})
+        }
+    }
+
+    complete_apps = ['ldt_utils']
--- a/src/ldt/ldt/ldt_utils/models.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/models.py	Wed Nov 30 10:44:15 2011 +0100
@@ -1,10 +1,13 @@
 from django.conf import settings
-from django.contrib.auth.models import User
+from django.contrib.auth.models import User, Group
 from django.db import models
 from django.utils.translation import ugettext_lazy as _
 #from ldt.core.models import Document, Owner
 from ldt.core.models import Document
+from guardian.shortcuts import assign, remove_perm
 import ldt.indexation
+from ldt.security.models import SafeModel
+from ldt.security.manager import SafeManager
 from utils import (create_ldt, copy_ldt, create_empty_iri, update_iri, 
     generate_uuid, clean_description)
 import lucene
@@ -14,7 +17,7 @@
 import tagging.fields
 import uuid
 
-class Author(models.Model):
+class Author(SafeModel):
 
     handle = models.CharField(max_length=512, unique=True, blank=True, null=True)
     email = models.EmailField(unique=False, blank=True, null=True)
@@ -24,7 +27,12 @@
     def __unicode__(self):
         return unicode(self.id) + " - " + self.handle + ", " + self.email + ", " + self.firstname + " " + self.lastname
 
-class Media(models.Model):
+    class Meta:
+        permissions = (
+                       ('view_author', 'Can view author'),
+                       )
+
+class Media(SafeModel):
     external_id = models.CharField(max_length=1024, null=True, blank=True, verbose_name=_('media.external_id'))
     external_permalink = models.URLField(max_length=1024, verify_exists=False, null=True, blank=True, verbose_name=_('media.external_permalink'))
     external_publication_url = models.URLField(max_length=1024, verify_exists=True, null=True, blank=True, verbose_name=_('media.external_publication_url'))
@@ -40,6 +48,11 @@
     src = models.CharField(max_length=1024, unique=True, verbose_name=_('media.src'))
     mimetype_field = models.CharField(max_length=512, null=True, blank=True, verbose_name=_('media.mimetype'))
     
+    class Meta:
+        permissions = (
+                       ('view_media', 'Can view media'),
+                       )
+        
     def mimetype(): #@NoSelf
         def fget(self):
             if self.mimetype_field :
@@ -90,11 +103,15 @@
         return "|".join(strings)
 
 
-class ContentManager(models.Manager):
+class ContentManager(SafeManager):
+    
+    def __init__(self):
+        super(ContentManager, self).__init__(check_perm=False)
+        
     def get_by_natural_key(self, iri_id):
         return self.get(iri_id=iri_id)
 
-class Content(models.Model):
+class Content(SafeModel):
     objects = ContentManager()
     
     iri_id = models.CharField(max_length=1024, unique=True, default=generate_uuid, verbose_name=_('content.iri_id'))
@@ -111,6 +128,9 @@
     
     class Meta:
         ordering = ["title"]
+        permissions = (
+                       ('view_content', 'Can view content'),
+                       )
     
     def natural_key(self):
         return self.iri_id
@@ -181,7 +201,7 @@
         self.sync_iri_file()        
         # update it 
         super(Content, self).save(*args, **kwargs)
-    
+            
     def __unicode__(self):
         return str(self.id) + ": " + self.iri_id
         
@@ -286,10 +306,8 @@
         return locals()
        
     external_id = property(**external_id())
-
-        
-        
-class Project(Document):  
+    
+class Project(Document, SafeModel):  
     STATE_CHOICES = (
     (1, 'edition'),
     (2, 'published'),
@@ -310,6 +328,9 @@
     
     class Meta:
         ordering = ["title"]
+        permissions = (
+                       ('view_project', 'Can view project'),
+                       )
 
     
     def __unicode__(self):
@@ -325,7 +346,7 @@
             return res[0].get(u'abstract')
         else:
             return None
-
+        
     def stream_mode(): #@NoSelf
         def fget(self):
             modes = []
@@ -352,7 +373,7 @@
     stream_mode = property(**stream_mode())
 
     @staticmethod
-    def create_project(user, title, contents, description=''):
+    def create_project(user, title, contents, description='', groups=[]):
 #        owner = Owner.objects.get(user=user) #@UndefinedVariable
         owner = user
         project = Project(title=title, owner=owner, description=description)
@@ -361,27 +382,40 @@
         project.changed_by = user.username
         project.state = 1
         project.save()
+        assign('view_project', user, project)
+        assign('change_project', user, project)
         for content in contents:
             project.contents.add(content)
         project.save()
         return create_ldt(project, user)
 
-    def copy_project(self, user, title, description=''):
-#        owner = Owner.objects.get(user=user) #@UndefinedVariable
-        owner = user
-        project = Project(title=title, owner=owner, description=description)
+    def copy_project(self, user, title, description='', group=None):
+        project = Project(title=title, owner=user, description=description)
         project = copy_ldt(self, project, user)
-        project.save()
+        assign('view_project', user, project)
+        assign('change_project', user, project)
+        if group:
+            assign('view_project', group, project)
         for content in self.contents.all():
             project.contents.add(content)
         project.save()
         return project
     
+    def publish(self):
+        self.state = 2
+        everyone = Group.objects.get(name=settings.PUBLIC_GROUP_NAME)
+        assign('ldt_utils.view_project', everyone, self)
+        
+    def unpublish(self):
+        self.state = 1
+        everyone = Group.objects.get(name=settings.PUBLIC_GROUP_NAME)
+        remove_perm('ldt_utils.view_project', everyone, self)
+    
     def check_access(self, user):
         if (user and user.is_staff) or self.state == 2: 
             return True
         else:
-            return False
+            return False        
         
     def save(self):
         if self.ldt:
@@ -409,10 +443,19 @@
                 desc_node = doc.xpath('/iri/project')[0]
                 desc_node.set('abstract', new_desc)
                 self.ldt = lxml.etree.tostring(doc, pretty_print=True)          
+
+        super(Project, self).save() 
+        
+        if self.state == 2:
+            self.publish()
+        elif self.state == 1:
+            self.unpublish()
             
         super(Project, self).save()
+               
+        
 
-class Segment(models.Model):
+class Segment(SafeModel):
     
     project_obj = models.ForeignKey(Project, null=True)
     content = models.ForeignKey(Content)
@@ -434,5 +477,8 @@
     
     class Meta:
         unique_together = (('project_id', 'iri_id', 'ensemble_id', 'cutting_id', 'element_id'),)
+        permissions = (
+                       ('view_segment', 'Can view segment'),
+                       )
 
 
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/copy_ldt.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/copy_ldt.html	Wed Nov 30 10:44:15 2011 +0100
@@ -12,8 +12,9 @@
 	<div class="projectscontentstitle span-12 last">{% trans "Copy your project" %}</div>
 	
 	<form action="" method="POST" {% if target_parent %}target="_parent"{% endif %}>{% csrf_token %}
+		<input type="hidden" name="group" value="{{ group_id }}"/>
 	    <div class="span-12 last">
-		<label for="title">{%trans "Title" %}:</label>
+		<label for="title">{% trans "Title" %}:</label>
 		<input class="inputbox required" type="text" name="title" size="80"  value="" id="title" />
 		</div>
 		<div id="submitcontent-buttons" class="span-12 last">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html	Wed Nov 30 10:44:15 2011 +0100
@@ -20,9 +20,11 @@
 {% 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/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="{{LDT_MEDIA_PREFIX}}css/jq-css/themes/base/jquery-ui.css" />
+    
 {% endblock %}
 
 
@@ -112,7 +114,10 @@
 			<div id="media_field_create" class="media_fields">{{ media_form.src.errors }}{{ media_form.src.label_tag }}{{ media_form.src }}</div>
 		</div>
 	</div>
+		 
+	{% include "ldt/ldt_utils/partial/permissions.html" %}
 	</div>
+		
 	<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>
@@ -125,6 +130,7 @@
 			<button type="submit" value="write" name="submit_button" id="submit_button_write">{% trans "write" %}</button>
 		</div>
 	</div>
+	
 	</form>
 	</div>
 {% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_group.html	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,117 @@
+
+{% extends "ldt/ldt_raw_base.html" %}
+
+{% load i18n %}
+{% 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="{{LDT_MEDIA_PREFIX}}js/projectscontents.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" />
+{% endblock %}
+
+{% block js_declaration %}
+	{{ block.super }}
+	<script type="text/javascript">
+	$(document).ready(function() {	
+		$("#close_button").click(function (e) {
+			e.preventDefault();
+			parent.$.nmTop().close();
+		});
+		
+		var check_all = '{% trans "check all" %}';
+		var uncheck_all = '{% trans "uncheck all" %}';
+		
+		$("#check_projects").attr('title', uncheck_all);
+		$("#check_projects").live("change", function () {
+			var members_checkboxes = $("input[name=members_list]");
+			
+			if ($("#check_projects").is(":checked")) {
+				members_checkboxes.attr('checked', 'true');
+				$("#check_projects").attr('title', uncheck_all );
+			} else {
+				members_checkboxes.removeAttr('checked');
+				$("#check_projects").attr('title', check_all);
+			}
+
+			members_checkboxes.trigger("change");		
+		});
+		
+		$("input[name=admin_list]").change(function () {
+			var line = $(this).closest('tr');
+			var is_member = $('input[name=members_list]', line)
+			
+			if ($(this).is(':checked') && !is_member.is(':checked')) {
+				is_member.prop('checked', 'checked');
+			}			
+		});
+		
+		$("input[name=members_list]").change(function () {
+			var line = $(this).closest('tr');
+			var is_admin = $('input[name=admin_list]', line)
+
+			if (!$(this).is(':checked') && is_admin.is(':checked')) {
+				is_admin.prop('checked', false);
+			}	
+		});
+				
+		var user_filter_url = "{% url ldt.ldt_utils.views.users_filter filter='__FILTER__' id_group='__ID_GROUP__'%}";
+		
+		input_list_init = [
+			{'input_selector':"#searchusersinput", 'container_selector':"#userslistcontainer", 'url':user_filter_url}
+		];	           	
+		searchFieldInit(input_list_init);
+						
+	});
+	</script>
+
+{% endblock %}
+
+{% block body %}
+				 
+	<div id="add_contribution" class="span-12 last">
+	<div class="projectscontentstitle span-12 last">{% if group_id %}{% trans "Update a group" %}{% else %}{% trans "Create a group" %}{% endif %}</div>
+	
+	<div class="span-4 last searchfielddiv" style="margin-top: 15px;float: right;" >
+		<div class="searchfield rounded"><input style="background: white; width: 100px;" id="searchusersinput" class="searchfieldinput searchfieldinputbase" value="{% 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>
+	
+	<form action="{% if group_id %}{% url ldt.ldt_utils.views.update_group group_id %} {% else %}{% url ldt.ldt_utils.views.create_group %}{% endif %}" method="POST" {% 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="{{ group_id }}" id="id_group"/>
+	<label for="name">{% trans "Name" %}:</label>
+	{{form.name}}
+	{% for error in form.errors.name %}
+	<span class="error">{{ error }}</span>
+	{% endfor %}
+	
+	
+	<div id="userslistcontainer">
+		{% include "ldt/ldt_utils/partial/userslist.html" %}
+	</div>
+		
+	<div id="submitcontent-buttons" class="span-12 last">
+		<button type="button" id="close_button"  value="close">{% trans 'close_cancel' %}</button>
+		{% if group_id %}
+		<button class="button" id="ldt_submit" type="submit" value="update" name="submit_button">{% trans "update_group" %}</button>
+		<button class="button" id="ldt_submit" type="submit" value="delete" name="submit_button">{% trans "delete_group" %}</button>
+		{% else %}
+		<button class="button" id="ldt_submit" type="submit" value="create" name="submit_button">{% trans "create_group" %}</button>
+		{% endif %}
+	</div>
+	</form>
+	</div>
+		
+{% endblock %}
+
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html	Wed Nov 30 10:44:15 2011 +0100
@@ -15,45 +15,37 @@
 	<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" />
-	<style type="text/css" >
-		textarea {
-			padding: 0px;
-			width:390px;
-			height: 100px;
-		}
 	
-	</style>
 {% endblock %}
 
 {% block js_declaration %}
 	{{ block.super }}
 	<script type="text/javascript">
+	
+	function activate_initial_permissions() {		
+		$("#grouplist tr").each(function (e) {
+			if ($("input[type=checkbox]", $(this)).is(":checked")) {
+				var perm = $(".perm_field", $(this)).val();
+				if (perm) {
+					$(".perm_read, .perm_write", $(this)).addClass("permission");
+				}				
+				if (perm == 'read') {
+					$(".perm_read", $(this)).addClass("choice");
+				} else if (perm == 'write') {
+					$(".perm_write", $(this)).addClass("choice");
+				} 				
+			}
+		});
+	}
+	
 	$(document).ready(function() {	
-			
-		var form_status = $("input[name=form_status]").val();
-		var redirect_to = '{{ redirect_to }}';
-		if (form_status == "saved" && redirect_to) {
-			parent.location.href = redirect_to;
-			parent.$.nmTop.close();
-		}
 		
 		$("#close_button").click(function (e) {
 			e.preventDefault();
 			parent.$.nmTop().close();
-		});
-		var check_all = '{% trans "check all" %}';
-		var uncheck_all = '{% trans "uncheck all" %}';
-		
-		$("#check_projects").attr('title', uncheck_all);
-		$("#check_projects").change(function () {
-			if ($("#check_projects").is(":checked")) {
-				$(".cellcheckbox input").attr('checked', 'true');
-				$("#check_projects").attr('title', uncheck_all );
-			} else {
-				$(".cellcheckbox input").removeAttr('checked');
-				$("#check_projects").attr('title', check_all);
-			}
-		});
+		});		
+
+		check_uncheck_all("group");
 				
 	});
 	</script>
@@ -69,9 +61,8 @@
         theme_advanced_buttons3 : "",
         theme_advanced_toolbar_location : "top",
         theme_advanced_toolbar_align : "left",
-        width: "470",
-        plugins : "autoresize",
-        entity_encoding : "raw",
+        width: "630",
+        height: "150"       
 	});
 
 
@@ -80,10 +71,10 @@
 {% endblock %}
 
 {% block body %}
-	<div id="add_contribution" class="span-12 last">
-	<div class="projectscontentstitle span-12 last">{% if ldt_id %}{% trans "Update your project" %}{% else %}{% trans "Create your project" %}{% endif %}</div>
-	<form action="{{create_project_action}}" method="POST" >
-	{% csrf_token %}
+	<div id="add_contribution" class="span-23 last">	
+	<div class="projectscontentstitle span-23 last">{% if ldt_id %}{% trans "Update your project" %}{% else %}{% trans "Create your project" %}{% endif %}</div>
+	<form action="{{create_project_action}}" method="POST" {% if target_parent %}target="_parent"{% endif %}>
+	{% csrf_token %} 
 	<input type="hidden" name="form_status" value="{{form_status}}" id="project_form_status" />
 	<label for="title">{% trans "Title" %}:</label>
 	{{form.title}}
@@ -92,36 +83,41 @@
 	{% endfor %}
 	<label for="description" class="projectdesc">{% trans "Description :" %}</label>
 	{{form.description}}
+	
+	<div id="lefttable" class="span-11">
 	<label>{% trans "List of contents" %}</label>
-	<div class="span-12 last projectscontentsdiv" id="ldtcreatecontentslistcontainer">
-		<div class="span-12 last projectscontentstablediv" id="ldtcreatecontentstablediv">
-			<table class="projectscontentstable">
-			
-				<tr class="projectscontentsheader last" id="contentslistheader">
-					<td class="cellcheckbox">
-					{% if not ldt_id %}
-						{% if contents|length > 1 %}
-						<input class="selectallprojects" id="check_projects" type="checkbox" checked="true" />	 
-						{% endif %}
-					{% endif %}	
-					</td>				
-					<td class="projectcontentsheadertitle">{% trans "name" %}</td>
-				</tr>
-			
-			    <tbody class="projectscontentsbody">
-			{% for content in contents %}
-				<tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%}">
-				    <td class="cellcheckbox"><input type="checkbox" name="contents" value="{{ content.id }}" checked="true" {% if ldt_id %}disabled="disabled"{% endif %} /></td>
-				    <td class="contenttitle">{{ content.title }}</td>
-				</tr>
-			{% endfor %}
-				</tbody>
-			</table>			
+
+		<div class="span-11 last" id="ldtcreatecontentslistcontainer">
+			<div class="span-11 last projectscontentstablediv" id="ldtcreatecontentstablediv">
+				<table class="projectscontentstable">
+				
+					<tr class="projectscontentsheader last" id="contentslistheader">
+						<td class="cellcheckbox">
+						{% if not ldt_id %}
+							{% if contents|length > 1 %}
+							<input class="selectallcontents" id="global_checkbox_content" type="checkbox" checked="true" />	 
+							{% endif %}
+						{% endif %}	
+						</td>				
+						<td class="projectcontentsheadertitle">{% trans "name" %}</td>
+					</tr>
+				
+				    <tbody class="projectscontentsbody">
+				{% for content in contents %}
+					<tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%}">
+					    <td class="cellcheckbox"><input type="checkbox" class="checkbox_content" name="contents" value="{{ content.id }}" checked="true" {% if ldt_id %}disabled="disabled"{% endif %} /></td>
+					    <td class="contenttitle">{{ content.title }}</td>
+					</tr>
+				{% endfor %}
+					</tbody>
+				</table>			
+			</div>
 		</div>
-		
-	</div>
-	
-	<div id="submitcontent-buttons" class="span-12 last">
+	</div>	
+     
+    {% include "ldt/ldt_utils/partial/permissions.html" %}
+                   
+    <div id="submitcontent-buttons" class="span-11 last">
 		<button type="button" id="close_button"  value="close">{% trans 'close_cancel' %}</button>
 		{% if ldt_id %}
 		<button class="button" id="ldt_submit" type="submit" value="prepare_delete" name="submit_button">{% trans "delete_project" %}</button>
@@ -129,9 +125,12 @@
 		{% else %}
 		<button class="button" id="ldt_submit" type="submit" value="create" name="submit_button">{% trans "create_project" %}</button>
 		{% endif %}
-	</div>
-	</form>
-	</div>
+    </div>
+    
+    </form> 
+    </div>
+          
+    </div>    
 		
 {% endblock %}
 
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html	Wed Nov 30 10:44:15 2011 +0100
@@ -1,51 +1,56 @@
-{% extends "ldt/ldt_utils/workspace.html" %}
+{% extends "ldt/ldt_base.html" %}
 {% load i18n %}
 
+{% block js_import %}
+{{block.super}}
+	<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
+{% endblock %}
 
 {% block js_declaration %}
 {{block.super}}
 <script type="text/javascript">
 
-var content_filter_url = "{% url ldt.ldt_utils.views.contents_filter filter='__FILTER__' %}";
+var groups_filter_url = "{% url ldt.ldt_utils.views.groups_filter filter='__FILTER__' %}";
 var project_filter_url = "{% url ldt.ldt_utils.views.projects_filter filter='__FILTER__' is_owner='false' status='0' id_group='__ID_GROUP__' %}";
 var publish_project_url = "{% url ldt.ldt_utils.views.publish '__PROJECT_ID__' 'false' %}";
 var unpublish_project_url = "{% url ldt.ldt_utils.views.unpublish '__PROJECT_ID__' 'false' %}";
 var get_group_projects_url = "{% url ldt.ldt_utils.views.get_group_projects %}";
 
-
 function init_events(base_node) {
-
-	init_events_all(base_node, "{% url ldt.ldt_utils.views.popup_embed %}", content_filter_url, project_filter_url, publish_project_url, unpublish_project_url, get_group_projects_url);
-	
+	init_events_projects(base_node, "{% url ldt.ldt_utils.views.popup_embed %}", project_filter_url, publish_project_url, unpublish_project_url)
+	init_events_group(base_node, "{% url ldt.ldt_utils.views.popup_embed %}", groups_filter_url);
 }
-
 	
 var global_csrf_token = "{{ csrf_token }}";
 
 $(document).ready(function(){
 	
 	input_list_init = [
-		{'input_selector':"#searchcontentsinput", 'container_selector':"#contentslistcontainer", 'url':content_filter_url},
 		{'input_selector':"#searchprojectsinput", 'container_selector':"#projectslistcontainer", 'url':project_filter_url}
 	];
-	
+		
 	searchFieldInit(input_list_init);
 	
 	init_events(document);
-	
-    $(".update_group_projects").click(function(){
+});
+
+
+$(document).ready(function(){
+		
+    $(".update_group_projects").live("click", function(){
         //alert("group id = " + $(this).attr('id') + ", url = " + get_group_projects_url);
-        id_group = $(this).attr('id');
-        // Remove the icons from all the lines
-        $(".next_icon").hide();
-        // Display the icon from the good line
-        $(".next_icon",this).show();
+        var id_group = $(this).attr('id');
+        // Remove icons from all the lines
+        $(".next_icon, td .grouplink").hide();
+        // Display icons from the good line
+        $(".next_icon, .grouplink",this).show();
         // Show the search textfield and update the id_group in the hidden input
         $('#search_div').show();
         $('#id_group').val(id_group);
         $('#searchprojectsinput').val("");
         $(".searchclear",$('#search_div')).hide();
     	// Send the request to update the projects list
+    	
         $.ajax({
             url: get_group_projects_url,
             type: 'POST',
@@ -55,45 +60,38 @@
             success: function(msg, textStatus, XMLHttpRequest) {
                 $('#projectslistcontainer').html(msg);
                 init_events(document);
-            },
-    		error: function(jqXHR, textStatus, errorThrown) {
-    			resp = $.parseJSON(jqXHR.responseText);
-    			alert(resp.message);
-    		}
+            }
         });
     });
-
+    
 });
 </script>
 {% endblock %}
 
+{% block css_import %}
+{{block.super}}
+    <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}/css/workspace.css" type="text/css"/>
+{% endblock %}
+
 {% block content %}
 <div class="span-24 last" id="allcontentsdiv">
-	{% if groups and groups.all|length > 0 %}
 	<div class="span-12" id="contentsdiv">
 	    <div class="span-12 last titlediv" >
 			<div class="span-8 projectscontentstitle">{% trans "My groups" %}</div>
-		</div>
-		<div class="span-12 last projectscontentsdiv" id="contentslistcontainer">
-		<div class="projectscontentsheader groupsheader span-12 last" id="contentsheader">
-		{% trans "Click on the line to see the group's projects" %}
+			<div class="span-4 last searchfielddiv" >
+				{% if user.is_regular %}
+				<a class="create_group" href="{% url ldt.ldt_utils.views.create_group %}"><img class='icon_title' src="{{LDT_MEDIA_PREFIX}}img/film_add.png" alt="{% trans 'Create group' %}" title="{% trans 'Create group' %}" /></a>
+				{% endif %}
+			</div>
 		</div>
-		<input type='hidden' name='id_group' id='id_group' value='' />
-		<table class="projectscontentstable">
-	    <tbody class="projectscontentsbody">
-		{% for group in groups.all %}
-			<tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%} update_group_projects" id="{{ group.id }}">
-			    <td>{{ group.name }}</td><td class="align_right"><img src="{{LDT_MEDIA_PREFIX}}/img/control_play.png" class="next_icon"/></td>
-			</tr>
-		{% endfor %}
-		</tbody>
-		</table>
+		<div class="span-12 last projectscontentsdiv" id="groupslistcontainer">
+			{% include "ldt/ldt_utils/partial/groupslist.html" %}
 		</div>
 	</div>
 	<div class="span-12 last" id="projectsdiv">
 		<div class="span-12 last titlediv" >
 			<div class="span-8 projectscontentstitle" >{% trans "The group's projects" %}</div>
-			<div class="span-4 last searchfielddiv" id="search_div" style='display:none'>
+			<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" alt="loader"/><img id="projecsclear" class="searchclear" src="{{LDT_MEDIA_PREFIX}}img/clear-left.png"/></div>
 			</div>
 		</div>
@@ -101,9 +99,6 @@
 		{% include "ldt/ldt_utils/partial/projectslist.html" %}
 		</div>
 	</div>
-	{% else %}
-	<p>{% trans "You do not belong to any group." %}</p>
-    {% endif %}
 </div>
 {% endblock %}
 
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html	Wed Nov 30 10:44:15 2011 +0100
@@ -9,7 +9,7 @@
 		<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.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.index content.iri_id %}" class="ldt_link_open_ldt"/></div></td>
-		    <td class="contenttitle"><a class="contenttitlelink" href="{% url ldt.ldt_utils.views.write_content iri_id=content.iri_id %}"">{{ content.title|default:"_" }}</a></td>
+		    <td class="contenttitle"><a {% if content.change %} class="contenttitlelink infostooltip" href="{% url ldt.ldt_utils.views.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>
 	{% endfor %}
 		</tbody>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/groupslist.html	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,33 @@
+{% load i18n %}
+
+<div class="projectscontentsheader projectcontentsheadertitle span-12 last" id="contentsheader">
+{% trans "Click on the line to see the group's projects" %}
+</div>
+
+<input type='hidden' name='id_group' id='id_group' value='' />
+<table class="projectscontentstable">
+    <tbody class="projectscontentsbody">
+	{% for group in groups %}
+	<tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%} update_group_projects" id="{{ group.id }}">
+
+		
+
+		{% if user.is_regular %}
+			{% if group.change %}
+			   <td class="cellimg"><a class="grouplink create_group" title="{% trans "Change this group"%}" href="{% url ldt.ldt_utils.views.update_group group.id %}">c</a></td>
+			   <td><b>{{ group.name }}</b></td>
+			{% else %}
+			    <td class="cellimg"><a class="grouplink" title="{% trans "Leave this group" %}" href="{% url ldt.ldt_utils.views.leave_group group.id %}">l</a></td>
+			    <td>{{ group.name }}</td>
+			{% endif %}
+		{% else %}
+			<td class="cellimg"></td>
+			<td>{{ group.name }}</td>
+		{% endif %}
+		
+		<td class="align_right"><img src="{{LDT_MEDIA_PREFIX}}/img/control_play.png" class="next_icon"/></td>
+		
+		</tr>
+	{% endfor %}
+	</tbody>
+</table>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,95 @@
+{% load i18n %}
+
+<script type="text/javascript">
+	
+	function activate_initial_permissions() {		
+		$("#grouplist tr").each(function (e) {
+			if ($("input[type=checkbox]", $(this)).is(":checked")) {
+				var perm = $(".perm_field", $(this)).val();
+				if (perm) {
+					$(".perm_read, .perm_write", $(this)).addClass("pointer");
+				}				
+				if (perm == 'read') {
+					$(".perm_read", $(this)).addClass("bold");
+				} else if (perm == 'write') {
+					$(".perm_write", $(this)).addClass("bold");
+				} 				
+			}
+		});
+	}
+	
+	$(document).ready(function() {	
+				
+		$(".pointer").live("click", function () {
+            var group_name = $(this).attr('value');
+        	var group_id = group_name.split('_').pop();
+            
+            $("a[value=\"" + group_name + "\"]").removeClass('bold');
+            $(this).addClass('bold');
+            
+            if ($(this).hasClass('perm_read')) {
+            	var perm = 'read';
+            } else {
+            	var perm = 'write';            	
+            }
+            
+            $(".perm_field",$(this).closest('tr')).attr('value', perm);
+        });
+        
+        $(".checkbox_group").bind("change", function() {
+            var line = $(this).closest('tr');
+            
+            if (!$(this).is(":checked")) {
+                $(".bold", line).removeClass('bold');
+                $(".perm_read, .perm_write", line).removeClass('pointer');
+            } else {
+                $(".perm_read", line).addClass('bold');
+                $(".perm_read, .perm_write", line).addClass('pointer');
+            }
+        });        
+
+		check_uncheck_all("group");
+		activate_initial_permissions();	
+				
+	});
+</script>
+
+
+<div id="righttable" class="span-11">
+	    <label>{% trans "group list"%}</label>
+	
+        <div class="span-10 last" id="ldtcreatecontentslistcontainer">
+            <div class="span-10 last projectscontentstablediv" id="ldtcreatecontentstablediv">
+                <table class="projectscontentstable">
+                    {{ management_form }}
+                
+                    <tr class="projectscontentsheader last" id="contentslistheader">
+                        <td class="cellcheckbox">                        
+                        {% if groups|length > 1 %}
+                        	<input class="selectallgroups" id="global_checkbox_group" type="checkbox" />
+                        {% endif %}                            
+                        </td>				
+                        <td class="projectcontentsheadertitle">{% trans "nom" %}</td>
+                        <td class="projectcontentsheadertitle span-3" >{% trans "Permissions" %}</td>
+                    </tr>
+                
+                    <tbody class="projectscontentsbody" id="grouplist">
+                
+				    {% for form, group in group_form %}			    			    
+				    <tr class="imageline projectscontentsoddline">
+				    	<td class="cellcheckbox">{{ form.share }}</td>
+				    	<td class="projecttitle">{{ group.name }}</td>
+				    	<td>
+				    	<a value="group_{{group.id}}" class="perm_read" title="{% trans "This group can read the project" %}">{% trans "perm.read" %}</a>
+				        <a value="group_{{group.id}}" class="perm_write" title="{% trans "This group can change the project" %}">{% trans "perm.write" %}</a>
+				       	</td>
+				       	{{ form.perms }}
+				       	{{ form.group }}
+				    </tr>
+				    {% endfor %}
+				    				                
+                    </tbody>
+                </table>		
+            </div>		
+      </div>       
+</div>      
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html	Wed Nov 30 10:44:15 2011 +0100
@@ -6,6 +6,7 @@
 <table class="projectscontentstable">
     <tbody class="projectscontentsbody">
 {% for project in projects %}
+
     <tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%}" >
         {% url ldt.ldt_utils.views.project_json_id project.ldt_id as json_url_id %}
         {% if is_gecko %}
@@ -14,21 +15,26 @@
             <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_edit.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.copy_project project.ldt_id %}" class="ldt_link_copy_project" alt="{% trans 'copy project' %}" title="{% trans 'copy project' %}"/></div></td>
+        <td class="cellimg"><div class="cellimgdiv"><img src="{{LDT_MEDIA_PREFIX}}img/page_copy.png" href="{% url ldt.ldt_utils.views.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="{{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">
         {% ifequal project.state 2 %}
-        <img src="{{ADMIN_MEDIA_PREFIX}}img/admin/icon-yes.gif" alt="{% trans 'Project published, click to unpublish' %}" title="{% trans 'Project published, click to unpublish' %}" class="publishedproject" id="project_{{project.ldt_id}}" /></div>
+        <img src="{{ADMIN_MEDIA_PREFIX}}img/admin/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="{{ADMIN_MEDIA_PREFIX}}img/admin/icon-no.gif" alt="{% trans 'Project not published, click to publish' %}" title="{% trans 'Project not published, click to publish' %}" class="unpublishedproject" id="project_{{project.ldt_id}}" />
+        <img src="{{ADMIN_MEDIA_PREFIX}}img/admin/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 class="projecttitle">
-        {% ifequal project.state 2 %}
-        {% if show_username %}{{ project.owner.username }} : {% endif %} <span class="projectinfos" data-title="{{ project.title }}" data-desc="{{ project.get_description|linebreaksbr }}">{{ project.title }}</span>
+        {% if project.state == 2 %}
+        <span class="projecttitlelink infostooltip" data-title="{{ project.title }}" data-desc="{{ project.description|linebreaksbr }}" >{% if show_username %}{{ project.owner.username }} : {% endif %}{{ project.title }}</span>
         {% else %}
-        <a class="projecttitlelink" href="{% url ldt.ldt_utils.views.update_project ldt_id=project.ldt_id %}">{% if show_username %}{{ project.owner.username }} : {% endif %}<span class="projectinfos" data-title="{{ project.title }}" data-desc="{{ project.get_description|linebreaksbr }}">{{ project.title }}</span></a>
-        {% endifequal %}
+        	{% if project.change %}
+        	<a class="projecttitlelink" href="{% url ldt.ldt_utils.views.update_project ldt_id=project.ldt_id %}"><span class="infostooltip" data-title="{{ project.title }}" data-desc="{{ project.description|linebreaksbr }}" >{% if show_username %}{{ project.owner.username }} : {% endif %}{{ project.title }}</span></a>
+        	{% else %}
+        	<a class="projecttitlelink"><span class="qtiplink" title="{% trans "You are not allowed to change this project" %}">{% if show_username %}{{ project.owner.username }} : {% endif %}{{ project.title }}</span></a>
+        	{% endif %}
+        {% endif %}
         </td>
     </tr>
 {% endfor %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html	Wed Nov 30 10:44:15 2011 +0100
@@ -22,7 +22,7 @@
         {% ifequal project.state 2 %}
         <span class="projectinfos" data-title="{{ project.title }}" data-desc="{{ project.description|linebreaksbr }}">{{ project.title }}</span>
         {% else %}
-        <a class="projecttitlelink" href="{% url ldt.ldt_utils.views.update_project ldt_id=project.ldt_id %}">{{ project.title }}</a>
+        <a class="projecttitlelink" href="{% url ldt.ldt_utils.views.update_project ldt_id=project.ldt_id %} data-desc="{{ project.description|linebreaksbr }}">{{ project.title }}</a>
         {% endifequal %}
         </td>
     </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/userslist.html	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,29 @@
+{% load i18n %}
+
+<label>{% trans "List of members" %}:</label>	
+<div class="span-12 last projectscontentsdiv" id="ldtcreatecontentslistcontainer">
+	<div class="span-12 last projectscontentstablediv">
+		<table class="projectscontentstable">
+		
+			<tr class="projectscontentsheader last" id="contentslistheader">
+				<td class="cellcheckbox">
+				{% if user_list|length > 1 %}
+					<input class="selectallprojects" id="check_projects" type="checkbox" />	 
+				{% endif %}
+				</td>				
+				<td class="projectcontentsheadertitle">{% trans "name" %}</td>
+				<td class="projectcontentsheadertitle">{% trans "admin" %}</td>
+			</tr>				
+		
+		    <tbody class="projectscontentsbody">
+			{% for user in user_list %}
+				    <td class="cellcheckbox"><input type="checkbox" name="members_list" value="{{ user.id }}" title="{% trans "Check to include this user in the group" %}" {% if user.member %}checked="checked"{% endif %}/></td>
+				    <td class="contenttitle">{{ user.username }}</td>
+				    <td class="cellcheckbox"><input type="checkbox" name="admin_list" value="{{ user.id }}" title="{% trans "Check to give this user the right to change the group" %}" {% if user.admin %}checked="checked"{% endif %}/></td>
+				 </tr>
+			{% endfor %} 			
+				
+			</tbody>
+		</table>			
+	</div>	
+</div>
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html	Wed Nov 30 10:44:15 2011 +0100
@@ -6,7 +6,6 @@
 	<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/projectscontents.js" ></script>
 {% endblock %}
 
-
 {% block js_declaration %}
 {{block.super}}
 <script type="text/javascript">
--- a/src/ldt/ldt/ldt_utils/urls.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/urls.py	Wed Nov 30 10:44:15 2011 +0100
@@ -21,6 +21,7 @@
     url(r'^ldt/(?P<url>.*)$', 'views.ldt'),
     url(r'^search/loading/$', 'views.loading'),
     url(r'^create/(?P<iri_id>.*)$', 'views.create_project'),
+    url(r'^copy/(?P<ldt_id>.*)/(?P<group_id>.*)$', 'views.copy_project'),
     url(r'^copy/(?P<ldt_id>.*)$', 'views.copy_project'),
     url(r'^update/(?P<ldt_id>.*)$', 'views.update_project'),
     url(r'^cljson/id/(?P<id>.*)$', 'views.project_json_id'),
@@ -30,11 +31,16 @@
     url(r'^filterprojects/_(?P<filter>[\w\%\_\-\+]*?)/(?P<is_owner>true|false)/(?P<status>\d)$', "views.projects_filter",),
     url(r'^filterprojects/_(?P<filter>[\w\%\_\-\+]*?)/(?P<is_owner>true|false)/(?P<status>\d)/(?P<id_group>.*)$', "views.projects_filter",),
     url(r'^filtercontents/_(?P<filter>[\w\%\_\-\+]*?)/$', "views.contents_filter",),
+    url(r'^filtergroups/_(?P<filter>[\w\%\_\-\+]*?)/$', "views.groups_filter",),
+    url(r'filterusers/_(?P<filter>[\w\%\_\-\+]*?)/(?P<id_group>.*)$', "views.users_filter"),
     (r'^embedpopup/?$', "views.popup_embed"),
     url(r'^segment/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.index_segment'),
     url(r'^segmentInit/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.init_segment'),
     url(r'^segmentLdt/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.ldt_segment'),
     url(r'^segmentHighlight/(?P<project_id>.*)/(?P<content_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<segment_id>.*)/$', 'views.highlight_segment'),
+    url(r'^createGroup/$', 'views.create_group'),
+    url(r'^updateGroup/(?P<group_id>.*)$', 'views.update_group'),
+    url(r'^leaveGroup/(?P<group_id>.*)$', 'views.leave_group'),
 )
 
 urlpatterns += patterns('',
--- a/src/ldt/ldt/ldt_utils/views.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/views.py	Wed Nov 30 10:44:15 2011 +0100
@@ -6,6 +6,7 @@
 from django.db.models import Q
 from django.forms.models import model_to_dict
 from django.forms.util import ErrorList
+from django.forms.formsets import formset_factory
 from django.http import (HttpResponse, HttpResponseRedirect,
     HttpResponseForbidden, HttpResponseServerError)
 from ldt.indexation import get_results_with_context, highlight_documents
@@ -17,9 +18,12 @@
 from django.utils.html import escape
 from django.utils.translation import ugettext as _, ungettext
 from forms import (LdtAddForm, SearchForm, AddProjectForm, CopyProjectForm,
-    ContentForm, MediaForm)
+    ContentForm, MediaForm, GroupAddForm, PermissionForm)
+from guardian.core import ObjectPermissionChecker
+from guardian.shortcuts import assign, remove_perm, get_perms, get_objects_for_group
 from ldt.ldt_utils.models import Content
 from ldt.ldt_utils.utils import boolean_convert, LdtUtils, LdtSearch
+from ldt.security.utils import assign_object_to_groups, set_forbidden_stream, add_change_attr
 from lxml.html import fragment_fromstring
 from models import Media, Project
 from projectserializer import ProjectSerializer
@@ -44,11 +48,11 @@
 def workspace(request):
     
     # list of contents
-    content_list = Content.objects.all() #@UndefinedVariable
-
+    content_list = add_change_attr(request.user, Content.safe_objects.all()) #@UndefinedVariable
+    
     # get list of projects owned by the current user
-    project_list = Project.objects.filter(owner=request.user) #@UndefinedVariable
-    
+    project_list = add_change_attr(request.user, Project.safe_objects.filter(owner=request.user)) #@UndefinedVariable
+
     is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
     
     # render list
@@ -57,12 +61,17 @@
                                'is_gecko': is_gecko},
                               context_instance=RequestContext(request))
 
-
 @login_required
-def groups(request):
+def groups(request): 
 
     # get list of all published projects
-    group_list = request.user.groups #@UndefinedVariable
+    group_list = request.user.groups.exclude(name=settings.PUBLIC_GROUP_NAME) #@UndefinedVariable
+    checker = ObjectPermissionChecker(request.user)
+    
+    group_list = list(group_list.all())
+    for group in group_list:
+        if checker.has_perm('change_group', group):
+            group.change = True
 
     is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
     
@@ -74,10 +83,10 @@
 
 
 @login_required
-def published_project(request):
+def published_project(request): 
 
     # get list of all published projects
-    project_list = Project.objects.filter(state=2) #@UndefinedVariable
+    project_list = Project.safe_objects.filter(state=2) #@UndefinedVariable
     # Search form
     form = SearchForm()
 
@@ -96,8 +105,7 @@
     player_id = request.GET.get("player_id")
     ldt_id = request.GET.get("ldt_id")
 
-
-    project = Project.objects.get(ldt_id=ldt_id); #@UndefinedVariable
+    project = Project.safe_objects.get(ldt_id=ldt_id); #@UndefinedVariable
 
     stream_mode = project.stream_mode
     if stream_mode != "video":
@@ -130,7 +138,6 @@
 
 @login_required
 def projects_filter(request, filter, is_owner=False, status=0, id_group=None):
-
     is_owner = boolean_convert(is_owner)
     status = int(status)
     query = Q()
@@ -155,43 +162,87 @@
     show_username = False
     
     if id_group > 0:
-        # Get group, user and project_list
-        grp = Group.objects.get(id=id_group)  #@UndefinedVariable
-        users = User.objects.filter(groups__in=[grp]) #@UndefinedVariable
-        query &= Q(owner__in=users) #@UndefinedVariable
-        project_list = Project.objects.filter(query).extra(select={'lower_title': 'lower(title)'}).order_by('owner__username', 'lower_title') #@UndefinedVariable
+        grp = Group.objects.get(id=id_group)
+        project_list = get_objects_for_group(grp, 'ldt_utils.view_project').filter(query)
         show_username = True
     else :
-        project_list = Project.objects.filter(query) #@UndefinedVariable
+        project_list = Project.safe_objects.filter(query) #@UndefinedVariable
     
+    project_list = add_change_attr(request.user, project_list)
     # Template depends on the projects's status
     if status == 2 :
         url_templ = "ldt/ldt_utils/partial/publishedprojectslist.html"
     else :
         url_templ = "ldt/ldt_utils/partial/projectslist.html"
-    
+        
     return render_to_response(url_templ,
-                              {'projects': project_list, 'show_username':show_username, 'is_gecko': is_gecko},
+                              {'projects': project_list, 'show_username':show_username,
+                               'is_gecko': is_gecko, 'group_id':id_group},
+                              context_instance=RequestContext(request))
+    
+def users_filter(request, filter, id_group=None):
+    if filter and len(filter) > 0 and filter[0] == '_':
+        filter = filter[1:]
+    
+    query = Q(id=settings.ANONYMOUS_USER_ID) | Q(id=request.user.id)    
+    filter_query = Q(username__icontains=filter) if filter else Q()    
+    user_list = User.objects.exclude(query).filter(filter_query)  
+    
+    if id_group:
+        group = Group.objects.get(id=id_group)
+        members_list = group.user_set.all()
+        for u in user_list:
+            if u in members_list:
+                u.member = True
+            if u.has_perm('change_group', group):
+                u.admin = True  
+    
+    return render_to_response("ldt/ldt_utils/partial/userslist.html", {'user_list': user_list},
                               context_instance=RequestContext(request))
 
-
-
 @login_required
-def contents_filter(request, filter):
+def contents_filter(request, filter): 
     if filter and len(filter) > 0 and filter[0] == '_':
         filter = filter[1:]
 
     if filter:
-        content_list = Content.objects.filter(title__icontains=filter) #@UndefinedVariable
+        content_list = Content.safe_objects.filter(title__icontains=filter) #@UndefinedVariable
     else:
-        content_list = Content.objects.all() #@UndefinedVariable
-
+        content_list = Content.safe_objects.all() #@UndefinedVariable
+        
+    checker = ObjectPermissionChecker(request.user)
+    
+    for c in content_list:
+        if checker.has_perm('ldt_utils.change_content', c):
+            c.change = True
+    
     return render_to_response("ldt/ldt_utils/partial/contentslist.html",
                               {'contents': content_list},
                               context_instance=RequestContext(request))
 
 
-def search_form(request):
+@login_required
+def groups_filter(request, filter):
+    if filter and len(filter) > 0 and filter[0] == '_':
+        filter = filter[1:]
+
+    if filter:
+        group_list = request.user.groups.filter(title__icontains=filter) 
+    else:
+        group_list = request.user.groups.all()
+        
+    group_list = group_list.exclude(name=settings.PUBLIC_GROUP_NAME)
+    checker = ObjectPermissionChecker(request.user)
+    for g in group_list:
+        if checker.has_perm('change_group', g):
+            g.change = True
+        
+    return render_to_response("ldt/ldt_utils/partial/groupslist.html",
+                              {'groups': group_list},
+                              context_instance=RequestContext(request))
+    
+
+def search_form(request): 
     form = SearchForm()
     return render_to_response('ldt/ldt_utils/search_form.html', {'form': form} , context_instance=RequestContext(request))
 
@@ -212,26 +263,36 @@
         else:
             results = get_results_with_context(field, search)     
             complete_results = []
+            proj_list = Project.safe_objects.all()
             
             results.sort(key=lambda k: k['iri_id'])
-            for iri_id, item in groupby(results, itemgetter('iri_id')):
-                try:
+            for iri_id, item in groupby(results, itemgetter('iri_id')):                
+                try: 
                     content = Content.objects.get(iri_id=iri_id)
                 except Content.DoesNotExist:
                     continue
                 segments = list(item)
+                i = 0
                 for s in segments:
                     if not s['project_id']:
                         s['project_id'] = '_'
-                        
+                    else:
+                        project = proj_list.filter(ldt_id=s['project_id'])
+                        if not project:
+                            segments.pop(i)
+                    i += 1
+                if not segments:
+                    continue 
+                
                 score = sum([seg['score'] for seg in segments])
                 if content.description == None:
                     desc = ''
                 else:
                     desc = content.description        
                 complete_results.append({'list' : segments, 'score' : score, 'content_title' : content.title, 'content_id' : content.iri_id, 'content_description' : desc })
-            complete_results.sort(key=lambda k: k['score'])  
-             
+            
+            complete_results.sort(key=lambda k: k['score'])
+                                
             request.session['complete_results'] = complete_results
             request.session['search'] = search
             request.session['field'] = field
@@ -251,7 +312,7 @@
     else:
         return HttpResponseRedirect(reverse('ldt.ldt_utils.views.published_project'))
         
-@login_required       
+
 def search_listing(request):
     if not request.session.has_key('complete_results'):
         return HttpResponseRedirect(reverse('ldt.ldt_utils.views.published_project'))
@@ -277,7 +338,7 @@
     return render_to_response('ldt/ldt_utils/search_results.html', {'results': results, 'nb_results' : paginator.count, 'search' : search, '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))   
   
 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.search_init", args=[field, query])
@@ -293,7 +354,7 @@
     resp.write(lxml.etree.tostring(doc, pretty_print=True, encoding="utf-8")) 
     return resp
 
-def search_ldt(request, field, query, edition=None):
+def search_ldt(request, field, query, edition=None): 
     
     contentList = []
     resp = HttpResponse(mimetype="text/xml")
@@ -317,14 +378,14 @@
         #    id_list = filter(lambda id: id in id_list, ids_editions)
             
         contentList = Content.objects.filter(iri_id__in=id_list)        #@UndefinedVariable
-        projectList = Project.objects.filter(ldt_id__in=projId_list);
+        projectList = Project.safe_objects.filter(ldt_id__in=projId_list)
     
-            
+          
     ldtgen = LdtUtils()
     #            generate_ldt(contentList, title=u"", author=u"IRI Web", web_url=u"", startSegment=None, projects=None):
     doc = ldtgen.generate_ldt(contentList, title=u"Recherche : " + queryStr, projects=projectList)
+    doc = set_forbidden_stream(doc, request.user)   
     doc.write(resp, pretty_print=True)
-
     
     return resp
 
@@ -335,7 +396,7 @@
         searcher = LdtSearch()
         
         queryStr = base64.urlsafe_b64decode(query.encode("ascii")).decode("utf8")
-        res = searcher.query(field, queryStr)
+        res = searcher.query(field, queryStr)            
     else:
         res = []
         
@@ -356,21 +417,20 @@
             seg.set('idseg', resultMap['element_id'])
             seg.set('idvue', "")
             seg.set('crit', "")
-  
+    
     #return doc  
     
     return HttpResponse(lxml.etree.tostring(doc, pretty_print=True), mimetype="text/xml;charset=utf-8") 
 
 
-
 @login_required         
 def list_ldt(request):
-    contents = Content.objects.all() #@UndefinedVariable
+    contents = Content.safe_objects.all() #@UndefinedVariable
     try:
         owner = request.user #@UndefinedVariable
     except:
         return HttpResponseRedirect(settings.LOGIN_URL)
-    ldtProjects = Project.objects.filter(owner=owner) #@UndefinedVariable
+    ldtProjects = Project.safe_objects.filter(owner=owner) #@UndefinedVariable
     context = {
     'contents': contents,
     'projects': ldtProjects.reverse(),
@@ -379,7 +439,7 @@
 
 @login_required         
 def list_content(request):
-    contents = Content.objects.all() #@UndefinedVariable
+    contents = Content.safe_objects.all() #@UndefinedVariable
     context = {
         'contents': contents,
     }
@@ -387,15 +447,24 @@
 
 @login_required
 def create_ldt_view(request):
+    permission_formset = formset_factory(PermissionForm, extra=0)
+    groups = request.user.groups.exclude(name=settings.PUBLIC_GROUP_NAME)
     redirect_to = ''
     if request.method == "POST" :
         form = LdtAddForm(request.POST)
         form_status = "none"
-        contents = Content.objects.all()
-        
-        if form.is_valid():
+        contents = Content.safe_objects.all()
+
+        group_form = permission_formset(request.POST)
+        management_form = None
+                
+        if form.is_valid() and group_form.is_valid():
             user = request.user
-            project = Project.create_project(title=form.cleaned_data['title'], user=user, contents=form.cleaned_data['contents'], description=form.cleaned_data['description'])
+            
+            project = Project.create_project(title=form.cleaned_data['title'], user=user, contents=form.cleaned_data['contents'],
+                                       description=form.cleaned_data['description'])
+            
+            assign_object_to_groups(project, group_form.cleaned_data)
             form_status = "saved"
             is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
             if is_gecko :
@@ -405,10 +474,20 @@
                   
     else:
         form = LdtAddForm()
-        contents = Content.objects.all() #@UndefinedVariable
-        form_status = "none"
+        contents = Content.safe_objects.all() #@UndefinedVariable
+        
+        perm_list = [] 
+        for group in groups:
+            perm_list.append({'share': False, 'perms': 'read', 'group': group.id })
+        permission = permission_formset(initial=perm_list)
+              
+        management_form = permission.management_form
+        group_form = zip(permission, groups)
+        
+        form_status = "none"    
             
-    return render_to_response('ldt/ldt_utils/create_ldt.html', {'contents': contents, 'form': form, 'form_status':form_status, 'redirect_to': redirect_to, 'create_project_action':reverse(create_ldt_view), 'language_code' : settings.LANGUAGE_CODE[2:]}, context_instance=RequestContext(request))
+    return render_to_response('ldt/ldt_utils/create_ldt.html', {'contents': contents, 'form': form, 'group_form': group_form, 'management_form': management_form, 'form_status':form_status,
+                                                                'redirect_to': redirect_to, 'create_project_action':reverse(create_ldt_view), 'language_code' : settings.LANGUAGE_CODE[2:]}, context_instance=RequestContext(request))
      
 def created_ldt(request):
     return render_to_response('ldt/ldt_utils/save_done.html', context_instance=RequestContext(request))
@@ -422,8 +501,12 @@
     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))
+    
+def init_segment(request, project_id, content_id, ensemble_id, cutting_id, segment_id):
 
-def init_segment(request, project_id, content_id, ensemble_id, cutting_id, segment_id):
+    if project_id != u"_":
+        assert False, project_id
+        get_object_or_404(Project.safe_objects, ldt_id=project_id)
     
     ldtgen = LdtUtils()
     doc = ldtgen.generate_init([project_id, content_id, ensemble_id, cutting_id, segment_id], 'ldt.ldt_utils.views.ldt_segment', 'ldt.ldt_utils.views.highlight_segment')
@@ -431,7 +514,9 @@
     return HttpResponse(lxml.etree.tostring(lxml.etree.ElementTree(doc), pretty_print=True), mimetype="text/xml;charset=utf-8")
 
 def highlight_segment(request, project_id, content_id, ensemble_id, cutting_id, segment_id):
-        
+    if project_id != u"_":
+        get_object_or_404(Project.safe_objects, ldt_id=project_id)
+    
     iri = lxml.etree.Element('iri')
     doc = lxml.etree.ElementTree(iri)    
 
@@ -446,15 +531,16 @@
     return HttpResponse(lxml.etree.tostring(doc, pretty_print=True), mimetype="text/xml;charset=utf-8") 
 
 
-def ldt_segment(request, project_id, content_id, ensemble_id, cutting_id, segment_id):
+def ldt_segment(request, project_id, content_id, ensemble_id, cutting_id, segment_id): 
 
     resp = HttpResponse(mimetype="text/xml")
     resp['Cache-Control'] = 'no-cache, must-revalidate'
     resp['Pragma'] = 'no-cache'
     
     if project_id and project_id != "_" :
-        project = Project.objects.get(ldt_id=project_id) #@UndefinedVariable
+        project = Project.safe_objects.get(ldt_id=project_id) #@UndefinedVariable
         ldtdoc = lxml.etree.fromstring(project.ldt.encode("utf-8"))
+        ldtdoc = set_forbidden_stream(ldtdoc, request.user)
         displays_node = ldtdoc.find("displays")
         if not displays_node:
             displays_node = lxml.etree.SubElement(ldtdoc, u"displays")        
@@ -485,7 +571,7 @@
     else:
         # generate ldt from 
         ldtgen = LdtUtils()
-        content_list = Content.objects.filter(iri_id=content_id)
+        content_list = Content.safe_objects.filter(iri_id=content_id)
         if request.user and request.user.username:
             username = request.user.username
         else:
@@ -496,29 +582,28 @@
             'idgroup' : ensemble_id,
             'idcutting' : cutting_id,
             'idsegment' : segment_id
-        }
+        }        
         
         doc = ldtgen.generate_ldt(content_list, "segment : ", author=username, startSegment=start_segment)
-        
+        doc = set_forbidden_stream(doc, request.user)
         doc.write(resp, pretty_print=('DEBUG' in dir(settings) and settings.DEBUG))
         
     return resp
         
-#        ldtgen.
-
-@login_required  
-def index_project(request, id, full=False):
+   
+@login_required    
+def index_project(request, id, full=False): 
 
     urlStr = settings.WEB_URL + reverse("space_ldt_init", args=['ldt_project', id])
     posturl = settings.WEB_URL + reverse("ldt.ldt_utils.views.save_ldt_project")
     language_code = request.LANGUAGE_CODE[:2]
     
-    ldt = get_object_or_404(Project, ldt_id=id)
+    ldt = get_object_or_404(Project.safe_objects, ldt_id=id)
     if ldt.state == 2: #published
         readonly = 'true'
     else:
         readonly = 'false'
-    
+       
     if full:
         template_path = 'ldt/ldt_utils/init_ldt_full.html'
     else:
@@ -530,8 +615,8 @@
 def init(request, method, url):
     ldtgen = LdtUtils()
 
-    doc = ldtgen.generate_init([url], 'ldt.ldt_utils.views.' + method, None)
-    
+    doc = ldtgen.generate_init([url], 'ldt.ldt_utils.views.' + method, None)    
+
     library = doc.xpath('/iri/files/library')[0]
     for c in Content.objects.all():
         elem = lxml.etree.SubElement(library, 'file')
@@ -550,32 +635,36 @@
     resp.write(lxml.etree.tostring(doc, pretty_print=True, xml_declaration=True, encoding="utf-8")) 
     return resp
        
-def ldt_project(request, id):
+def ldt_project(request, id): 
     resp = HttpResponse(mimetype="text/xml")
     resp['Cache-Control'] = 'no-cache, must-revalidate'
     resp['Pragma'] = 'no-cache'
     
-    project = Project.objects.get(ldt_id=id) #@UndefinedVariable
-    resp.write(project.ldt)
+    project = Project.safe_objects.get(ldt_id=id) #@UndefinedVariable
+    
+    doc = lxml.etree.fromstring(project.ldt)
+    doc = set_forbidden_stream(doc, request.user)
+    resp.write(lxml.etree.tostring(doc, pretty_print=True, xml_declaration=True, encoding="utf-8")) 
+
     return resp
 
 
-def project_json_id(request, id):
+def project_json_id(request, id): 
     
-    project = get_object_or_404(Project, ldt_id=id)
+    project = get_object_or_404(Project.safe_objects, ldt_id=id)
 
     return project_json(request, project, False)
 
 
-def project_json_externalid(request, id):
+def project_json_externalid(request, id): 
         
-    res_proj = get_list_or_404(Project.objects.order_by('-modification_date'), contents__external_id=id) #@UndefinedVariable
+    res_proj = get_list_or_404(Project.safe_objects.order_by('-modification_date'), contents__external_id=id) #@UndefinedVariable
     
     return project_json(request, res_proj[0], False)
 
 
 
-def project_json(request, project, serialize_contents=True):
+def project_json(request, project, serialize_contents=True): # Not checked
     
     if not ldt_auth.check_access(request.user, project):
         return HttpResponseForbidden(_("You can not access this project"))
@@ -621,7 +710,7 @@
 
 def project_annotations_rdf(request, ldt_id):
 
-    project = Project.objects.get(ldt_id=ldt_id); #@UndefinedVariable
+    project = Project.safe_objects.get(ldt_id=ldt_id); #@UndefinedVariable
     
     if not ldt_auth.check_access(request.user, project):
         return HttpResponseForbidden(_("You can not access this project"))
@@ -676,12 +765,11 @@
     if request.method == "POST":
         ldt = request.POST['ldt']
         id = request.POST['id']
-        ldtproject = Project.objects.get(ldt_id=id) #@UndefinedVariable
+        ldtproject = Project.safe_objects.get(ldt_id=id) #@UndefinedVariable
 
         #save xml ldt
         ldtproject.ldt = ldt
 
-
         doc = lxml.etree.fromstring(ldtproject.ldt.encode("utf-8"))
         result = doc.xpath("/iri/project")
         
@@ -707,23 +795,21 @@
     
     return render_to_response('ldt/ldt_utils/save_done.html', {'ldt': ldt, 'id':id, 'title':ldtproject.title, 'contents': new_contents}, context_instance=RequestContext(request))
 
-
-
 @login_required
 def publish(request, id, redirect=True):
-    ldt = get_object_or_404(Project, ldt_id=id)
-    ldt.state = 2 #published
+    ldt = get_object_or_404(Project.safe_objects, ldt_id=id)
+    ldt.publish()
     ldt.save()
     redirect = boolean_convert(redirect)
     if redirect:
         return HttpResponseRedirect(reverse("ldt.ldt_utils.views.list_ldt"))
     else:
         return HttpResponse(simplejson.dumps({'res':True, 'ldt': {'id': ldt.id, 'state':ldt.state, 'ldt_id': ldt.ldt_id}}, ensure_ascii=False), mimetype='application/json')
-    
+
 @login_required
 def unpublish(request, id, redirect=True):
-    ldt = get_object_or_404(Project, ldt_id=id)
-    ldt.state = 1 #edition
+    ldt = get_object_or_404(Project.safe_objects, ldt_id=id)
+    ldt.unpublish()
     ldt.save()
     redirect = boolean_convert(redirect)
     if redirect:
@@ -740,34 +826,41 @@
     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))
 
 
-def ldt(request, url, startSegment=None):
+def ldt(request, url, startSegment=None): 
     
     resp = HttpResponse(mimetype="text/xml; charset=utf-8")
     resp['Cache-Control'] = 'no-cache'
 
-    contentList = Content.objects.filter(iri_id=url) #@UndefinedVariable
+    contentList = Content.safe_objects.filter(iri_id=url) #@UndefinedVariable
 
     ldtgen = LdtUtils()
     doc = ldtgen.generate_ldt(contentList, title=contentList[0].title, startSegment=startSegment)
+    doc = set_forbidden_stream(doc, request.user)
     doc.write(resp, pretty_print=True)
 
     return resp
 
 
-def loading(request):
+def loading(request): 
     return render_to_response('ldt/ldt_utils/loading.html', context_instance=RequestContext(request))
 
 
 @login_required
-def create_project(request, iri_id):
+def create_project(request, iri_id): 
+    permission_formset = formset_factory(PermissionForm, extra=0)
+    content = get_object_or_404(Content.safe_objects, iri_id=iri_id)
+    contents = [ content, ]
+    groups = request.user.groups.exclude(name=settings.PUBLIC_GROUP_NAME)
     redirect_to = ''
-    content = get_object_or_404(Content, iri_id=iri_id)
-    contents = [ content, ]    
     form_status = "none"
     
     if request.method == "POST" :
+        
+        group_form = permission_formset(request.POST)
+        management_form = None        
         form = AddProjectForm(request.POST)
-        if form.is_valid():
+        
+        if form.is_valid() and group_form.is_valid():
             user = request.user
             project = Project.create_project(title=form.cleaned_data['title'], user=user, contents=contents, description=form.cleaned_data['description'])
             form_status = "saved"
@@ -776,18 +869,31 @@
             if is_gecko :
                 redirect_to = reverse('index_project_full', args=[project.ldt_id])
             else:
-                return HttpResponseRedirect(reverse('index_project', args=[project.ldt_id]))  
+                return HttpResponseRedirect(reverse('index_project', args=[project.ldt_id]))
+            assign_object_to_groups(project, group_form.cleaned_data)
     else:
         form = AddProjectForm()
+        perm_list = [] 
+        for group in groups:
+            perm_list.append({'share': False, 'perms': 'read', 'group': group.id })
+        permission = permission_formset(initial=perm_list)
+              
+        management_form = permission.management_form
+        group_form = zip(permission, groups)
     # Modal window is not used with firefox, so we ask to submit the form in _parent in firefox case.
     target_parent = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
-    return render_to_response('ldt/ldt_utils/create_ldt.html', {'form':form, 'form_status': form_status, 'contents':contents, 'redirect_to': redirect_to, 'create_project_action':reverse("ldt.ldt_utils.views.create_project", args=[iri_id]), 'target_parent':target_parent}, context_instance=RequestContext(request))
+    return render_to_response('ldt/ldt_utils/create_ldt.html', {'form':form, 'form_status': form_status, 'contents':contents,                                                               'groups' : groups, 'group_form': group_form,
+                                                                'management_form': management_form, 'redirect_to': redirect_to, 'create_project_action':reverse("ldt.ldt_utils.views.create_project", args=[iri_id]), 'target_parent':target_parent}, context_instance=RequestContext(request))
 
 @login_required
 def update_project(request, ldt_id):
-
-    project = get_object_or_404(Project, ldt_id=ldt_id)
-    contents = project.contents.all()    
+    permission_formset = formset_factory(PermissionForm, extra=0)
+    project = get_object_or_404(Project.safe_objects, ldt_id=ldt_id)
+    contents = project.contents.all()
+    groups = request.user.groups.exclude(name=settings.PUBLIC_GROUP_NAME)
+    
+    management_form = None    
+        
     if request.method == "POST" :
         submit_action = request.REQUEST.get("submit_button", False)
         if submit_action == "prepare_delete":
@@ -805,10 +911,14 @@
                 project.delete()
             form_status = 'deleted'
             form = AddProjectForm()
+            group_form = permission_formset()
         else:
+            form_status = 'none' 
             form = AddProjectForm(request.POST)
-            form_status = "none"
-            if form.is_valid():
+            group_form = permission_formset(request.POST)
+            
+            if form.is_valid() and group_form.is_valid():
+                
                 if project.title != form.cleaned_data['title'] or project.description != form.cleaned_data['description']:
                     project.title = form.cleaned_data['title']
                     project.description = form.cleaned_data['description']
@@ -817,25 +927,46 @@
                     res[0].set("title", project.title)
                     res[0].set("abstract", project.description)
                     project.ldt = lxml.etree.tostring(ldt, pretty_print=True)
-                    project.save()
-                
-                form_status = 'saved'                
+                    project.save()                    
+                    
+                assign_object_to_groups(project, group_form.cleaned_data)
+                form_status = "saved"
     else:
         form = AddProjectForm({'title':unicode(project.title), 'description':unicode(project.get_description())})
+        
+        perm_list = [] 
+        for group in groups:
+            group_perms = get_perms(group, project)
+            share = False
+            perm = None
+            if 'view_project' in group_perms:
+                share = True
+                perm = 'read'
+            if 'change_project' in group_perms:
+                perm = 'write'
+                
+            perm_list.append({'share': share, 'perms': perm, 'group': group.id })
+        permission = permission_formset(initial=perm_list)    
+        management_form = permission.management_form
+        group_form = zip(permission, groups)
+
         form_status = 'none'
-        
-    return render_to_response('ldt/ldt_utils/create_ldt.html', {'form':form, 'form_status':form_status, 'ldt_id': ldt_id, 'contents':contents, 'create_project_action':reverse("ldt.ldt_utils.views.update_project", args=[ldt_id])}, context_instance=RequestContext(request))
-
+       
+    return render_to_response('ldt/ldt_utils/create_ldt.html', {'form':form, 'form_status':form_status, 'groups': groups,
+                              'ldt_id': ldt_id, 'contents':contents, 'group_form': group_form, 'management_form': management_form, 
+                              'create_project_action':reverse("ldt.ldt_utils.views.update_project", args=[ldt_id])}, context_instance=RequestContext(request))
 
 @login_required
-def copy_project(request, ldt_id):
+def copy_project(request, ldt_id, group_id=None): 
     
-    project = get_object_or_404(Project, ldt_id=ldt_id)
+    project = get_object_or_404(Project.safe_objects, ldt_id=ldt_id)
     if request.method == "POST" :
         form = CopyProjectForm(request.POST)
         if form.is_valid():
             user = request.user
-            project = project.copy_project(title=request.POST['title'], user=user)
+            group_id = form.cleaned_data['group']
+            group = Group.objects.get(id=group_id) if group_id else None
+            project = project.copy_project(title=form.cleaned_data['title'], user=user, group=group)
             is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
             if is_gecko:
                 return HttpResponseRedirect(reverse('index_project_full', args=[project.ldt_id]))
@@ -845,13 +976,13 @@
         form = CopyProjectForm
     # Modal window is not used with firefox, so we ask to submit the form in _parent in firefox case.
     target_parent = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
-    return render_to_response('ldt/ldt_utils/copy_ldt.html', {'form':form, 'project':project, 'target_parent':target_parent}, context_instance=RequestContext(request))
+    return render_to_response('ldt/ldt_utils/copy_ldt.html', {'form':form, 'project':project, 'group_id':group_id, 'target_parent':target_parent}, context_instance=RequestContext(request))
 
 
-def write_content_base(request, iri_id=None):
+def write_content_base(request, iri_id=None): 
 
     if iri_id:        
-        instance_content = Content.objects.get(iri_id=iri_id) #@UndefinedVariable
+        instance_content = Content.safe_objects.get(iri_id=iri_id) #@UndefinedVariable
         instance_media = instance_content.media_obj
         logging.debug("write_content_base : valid form: for instance : media -> " + repr(instance_media) + " content : for instance : " + repr(instance_content)) #@UndefinedVariable
     else:
@@ -886,15 +1017,19 @@
             content_instance_val[k] = value
             media_instance_val[k] = value
         
+        
+        permission_formset = formset_factory(PermissionForm, extra=0)        
         content_form = ContentForm(content_instance_val, prefix="content", instance=instance_content)
         media_form = MediaForm(media_instance_val, request.FILES, prefix="media", instance=instance_media)
+        group_form = permission_formset(request.POST)
         
         media_valid = media_form.is_valid()
         content_valid = content_form.is_valid()
+        group_valid = group_form.is_valid()
         
         logging.debug("write_content_base : valid form: for instance : " + repr(instance_media) + " -> media " + str(media_valid) + " content : for instance : " + repr(instance_content) + " : " + str(content_valid)) #@UndefinedVariable
         
-        if media_valid and content_valid :
+        if media_valid and content_valid and group_valid:
             
             # see if media must be created
             cleaned_data = {}
@@ -1011,14 +1146,17 @@
                     
                 media.save()
             
-            
-            if form_status != "error":
-                #try:
+            if form_status != "error":     
                 content_defaults = {}
                 content_defaults.update(content_form.cleaned_data)
                 content_defaults['media_obj'] = media
                 del content_defaults["media_input_type"]
-                content, created = Content.objects.get_or_create(iri_id=content_form.cleaned_data['iri_id'], defaults=content_defaults) #@UndefinedVariable
+                del content_defaults['groups']
+                content, created = Content.safe_objects.get_or_create(iri_id=content_form.cleaned_data['iri_id'], defaults=content_defaults) #@UndefinedVariable
+                
+                assign('change_content', request.user, content)
+                assign('view_content', request.user, content)
+                assign_object_to_groups(content, group_form.cleaned_data)                
                 if not created:
                     for attribute in ('iriurl', 'title', 'description', 'duration', 'content_creation_date', 'tags', 'media_obj'):
                         setattr(content, attribute, content_defaults[attribute])
@@ -1044,7 +1182,9 @@
 def write_content(request, iri_id=None):
     
     submit_action = request.REQUEST.get("submit_button", False) 
-
+    groups = request.user.groups.exclude(name=settings.PUBLIC_GROUP_NAME)
+    permission_formset = formset_factory(PermissionForm, extra=0)
+    
     if submit_action == "prepare_delete": 
         errors, titles = prepare_delete_content(request, iri_id)
         if errors and len(errors) > 0:
@@ -1059,8 +1199,27 @@
         form_status = "deleted"
         content_form = ContentForm()
         media_form = MediaForm()
+        management_form = group_form = None
     else:
         content_form, media_form, form_status = write_content_base(request, iri_id)
+        
+        perm_list = []
+        content = Content.safe_objects.get(iri_id=iri_id) if iri_id else None
+        
+        for group in groups:
+            group_perms = get_perms(group, content) if content else []
+            share = False
+            perm = None
+            if 'view_content' in group_perms:
+                share = True
+                perm = 'read'
+            if 'change_content' in group_perms:
+                perm = 'write'
+                
+            perm_list.append({'share': share, 'perms': perm, 'group': group.id })
+        permission = permission_formset(initial=perm_list)    
+        management_form = permission.management_form
+        group_form = zip(permission, groups)
 
     if iri_id:
         create_content_action = reverse('ldt.ldt_utils.views.write_content', kwargs={'iri_id':iri_id})
@@ -1070,17 +1229,18 @@
     session_key = request.COOKIES[settings.SESSION_COOKIE_NAME]
     cookie_name = settings.SESSION_COOKIE_NAME
     
-    return render_to_response('ldt/ldt_utils/create_content.html', {'content_form': content_form, 'media_form': media_form, 'form_status': form_status, 'create_content_action': create_content_action, 'iri_id': iri_id, 'session_key':session_key, 'cookie_name':cookie_name}, context_instance=RequestContext(request))
+    return render_to_response('ldt/ldt_utils/create_content.html', {'content_form': content_form, 'media_form': media_form, 'form_status': form_status, 'create_content_action': create_content_action,
+                                                                    'management_form': management_form, 'group_form': group_form, 'iri_id': iri_id, 'session_key':session_key, 'cookie_name':cookie_name}, context_instance=RequestContext(request))
 
 @login_required
-def prepare_delete_content(request, iri_id=None):
+def prepare_delete_content(request, iri_id=None): 
     errors = []
     titles = []
     if not iri_id:
         iri_id = request.REQUEST.get("iri_id", None)
         
     if iri_id:
-        for content in Content.objects.filter(iri_id=iri_id): #@UndefinedVariable
+        for content in Content.safe_objects.filter(iri_id=iri_id): 
             titles.append(unicode(content.title))
             projects = content.project_set.all()
             projects_nb = len(projects)
@@ -1098,7 +1258,7 @@
         iri_id = request.REQUEST.get("iri_id", None)
         
     if iri_id:
-        Content.objects.filter(iri_id=iri_id).delete() #@UndefinedVariable
+        Content.safe_objects.get(iri_id=iri_id).delete()
 
 
 def upload(request):
@@ -1157,13 +1317,120 @@
 
     # Get group, user and project_list
     grp = Group.objects.get(id=request.POST["id_group"])  #@UndefinedVariable
-    users = User.objects.filter(groups__in=[grp]) #@UndefinedVariable
-    project_list = Project.objects.filter(owner__in=users).extra(select={'lower_title': 'lower(title)'}).order_by('owner__username', 'lower_title')  #@UndefinedVariable
-
+    everyone = Group.objects.get(name=settings.PUBLIC_GROUP_NAME)
+    project_list = get_objects_for_group(grp, 'ldt_utils.view_project') | get_objects_for_group(everyone, 'ldt_utils.view_project').filter(owner__in=[grp])
+    project_list = add_change_attr(request.user, project_list)
+    
     is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
     
     # render list
     return render_to_response("ldt/ldt_utils/partial/projectslist.html",
                               {'projects': project_list, 'show_username':True,
-                               'is_gecko': is_gecko},
+                               'is_gecko': is_gecko, 'group_id': grp.id},
                               context_instance=RequestContext(request))
+
+@login_required
+def create_group(request):
+    if not request.user.is_regular:
+        return HttpResponseServerError('<h1>User can leave a group.</h1>')
+    user_list = User.objects.exclude(id=settings.ANONYMOUS_USER_ID).exclude(id=request.user.id)
+    form_status = ''
+    
+    if request.method == 'POST':
+        form = GroupAddForm(request.POST)
+        
+        if form.is_valid():            
+            name = form.cleaned_data['name']
+            members_list = form.cleaned_data['members_list']
+            admin_list = form.cleaned_data['admin_list']
+            
+            group = Group.objects.create(name=name)
+            group.save()
+            assign('change_group', request.user, group)
+            user_list = User.objects.filter(id__in=members_list)
+            
+            for user in user_list:
+                user.groups.add(group)
+                if user in admin_list:
+                    assign('change_group', user, group)
+            request.user.groups.add(group)             
+            form_status = 'saved' 
+            
+    else:
+        form = GroupAddForm()        
+    
+    return render_to_response("ldt/ldt_utils/create_group.html", {'form' : form, 'form_status' : form_status, 'user_list' : user_list, 'admin_list': user_list}, context_instance=RequestContext(request))
+
+@login_required
+def update_group(request, group_id):
+    if not request.user.is_regular:
+        return HttpResponseServerError('<h1>User can leave a group.</h1>')
+    
+    group = get_object_or_404(Group, id=group_id)    
+    user_list = User.objects.exclude(id=settings.ANONYMOUS_USER_ID).exclude(id=request.user.id)
+    members_list = User.objects.filter(groups__id=group_id)
+    form_status = ''    
+    
+    if not request.user.has_perm('change_group', group):
+        user_list = []
+        form_status = 'saved'
+        form = GroupAddForm()
+        return render_to_response("ldt/ldt_utils/create_group.html", {'group_id' : group_id, 'form' : form, 'form_status' : form_status, 'user_list' : user_list}, context_instance=RequestContext(request))
+
+    for u in user_list:
+        if u in members_list:
+            u.member = True
+        if u.has_perm('change_group', group):
+            u.admin = True
+            
+    if request.method == "POST":
+        form = GroupAddForm(request.POST, instance=group)
+        submit_action = request.REQUEST.get("submit_button", False)
+        
+        if submit_action == 'delete':
+            remove_perm('change_group', request.user, group)
+            group.delete()
+            form_status = 'deleted'
+        else:            
+            if form.is_valid():
+                name = form.cleaned_data['name']
+                members_list = form.cleaned_data['members_list']
+                admin_list = form.cleaned_data['admin_list']
+                group.name = name
+                
+                for user in User.objects.all().exclude(username=request.user.username):
+                    if user in members_list:                        
+                        group.user_set.add(user)
+                        if user in admin_list:
+                            assign('change_group', user, group)
+                        else:
+                            remove_perm('change_group', user, group)
+                    else:
+                        group.user_set.remove(user)
+                        remove_perm('change_group', user, group)
+                        
+                group.save()
+                form_status = 'saved'       
+                    
+    else:
+        form = GroupAddForm(initial={'name':unicode(group.name), 'members_list':members_list})    
+    
+    return render_to_response("ldt/ldt_utils/create_group.html", {'group_id' : group_id, 'form' : form, 'form_status' : form_status, 'user_list' : user_list}, context_instance=RequestContext(request))
+
+@login_required
+def leave_group(request, group_id, redirect=True):
+    if not request.user.is_regular:
+        return HttpResponseServerError('<h1>User can not leave a group.</h1>')
+    
+    group = get_object_or_404(Group, id=group_id)
+    redirect = boolean_convert(redirect)
+    
+    if not request.user.has_perm('change_group', group):
+        request.user.groups.remove(group)
+        
+    if redirect:        
+        return HttpResponseRedirect(reverse('ldt.ldt_utils.views.groups'))
+    else:
+        return HttpResponse(simplejson.dumps({'res':True}, ensure_ascii=False), mimetype='application/json')
+        
+
Binary file src/ldt/ldt/locale/en/LC_MESSAGES/django.mo has changed
--- a/src/ldt/ldt/locale/en/LC_MESSAGES/django.po	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/locale/en/LC_MESSAGES/django.po	Wed Nov 30 10:44:15 2011 +0100
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-07 12:22+0200\n"
+"POT-Creation-Date: 2011-11-28 15:39+0100\n"
 "PO-Revision-Date: 2010-02-17 03:53+0100\n"
 "Last-Translator: Yves-Marie Haussonne <ymh.work@gmail.com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -24,220 +24,219 @@
 msgid "Time"
 msgstr "Time"
 
-#: .\ldt_utils\forms.py:26
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:53
+#: .\ldt_utils\forms.py:34
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:52
 msgid "Search"
 msgstr "search"
 
-#: .\ldt_utils\forms.py:27
+#: .\ldt_utils\forms.py:35
 msgid "all"
 msgstr "all"
 
-#: .\ldt_utils\forms.py:27 .\ldt_utils\models.py:39
+#: .\ldt_utils\forms.py:35 .\ldt_utils\models.py:47
 #: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:69
 msgid "title"
 msgstr "title"
 
-#: .\ldt_utils\forms.py:27
+#: .\ldt_utils\forms.py:35
 msgid "resume"
 msgstr "resume"
 
-#: .\ldt_utils\forms.py:27
-#, fuzzy
+#: .\ldt_utils\forms.py:35
 msgid "tags"
-msgstr "Pages"
+msgstr "tags"
 
-#: .\ldt_utils\forms.py:27
+#: .\ldt_utils\forms.py:35
 msgid "Fields"
 msgstr "Fields"
 
-#: .\ldt_utils\forms.py:28
+#: .\ldt_utils\forms.py:36
 msgid "Display the results in Lignes De Temps"
 msgstr "Display the results in Lignes De Temps"
 
-#: .\ldt_utils\forms.py:42 .\ldt_utils\models.py:108
+#: .\ldt_utils\forms.py:50 .\ldt_utils\models.py:125
 msgid "content.content_creation_date"
 msgstr "content creation date"
 
-#: .\ldt_utils\forms.py:43
+#: .\ldt_utils\forms.py:51
 msgid "content.media_input_type"
 msgstr "Media source type"
 
-#: .\ldt_utils\forms.py:43
+#: .\ldt_utils\forms.py:51
 msgid "file_upload"
 msgstr "file upload"
 
-#: .\ldt_utils\forms.py:43
+#: .\ldt_utils\forms.py:51
 msgid "url"
 msgstr "url"
 
-#: .\ldt_utils\forms.py:43
+#: .\ldt_utils\forms.py:51
 msgid "existing_media"
 msgstr "existing media"
 
-#: .\ldt_utils\forms.py:43
+#: .\ldt_utils\forms.py:51
 msgid "create_media"
 msgstr "create media"
 
-#: .\ldt_utils\forms.py:43
+#: .\ldt_utils\forms.py:51
 msgid "none_media"
 msgstr "no media"
 
-#: .\ldt_utils\models.py:28
+#: .\ldt_utils\models.py:36
 msgid "media.external_id"
 msgstr "external id"
 
-#: .\ldt_utils\models.py:29
+#: .\ldt_utils\models.py:37
 msgid "media.external_permalink"
 msgstr "media permalink"
 
-#: .\ldt_utils\models.py:30
+#: .\ldt_utils\models.py:38
 msgid "media.external_publication_url"
 msgstr "media publication url"
 
-#: .\ldt_utils\models.py:31
+#: .\ldt_utils\models.py:39
 msgid "media.external_src_url"
 msgstr "media external source url"
 
-#: .\ldt_utils\models.py:32
+#: .\ldt_utils\models.py:40
 msgid "media.creation_date"
 msgstr "media object creation date"
 
-#: .\ldt_utils\models.py:33
+#: .\ldt_utils\models.py:41
 msgid "media.media_creation_date"
 msgstr "media creation date"
 
-#: .\ldt_utils\models.py:34
+#: .\ldt_utils\models.py:42
 msgid "media.update_date"
 msgstr "update date"
 
-#: .\ldt_utils\models.py:35
+#: .\ldt_utils\models.py:43
 msgid "media.videopath"
 msgstr "videopath"
 
-#: .\ldt_utils\models.py:36
+#: .\ldt_utils\models.py:44
 msgid "media.duration"
 msgstr "duration (ms)"
 
-#: .\ldt_utils\models.py:37
+#: .\ldt_utils\models.py:45
 msgid "media.creator"
 msgstr "media creator"
 
-#: .\ldt_utils\models.py:38
+#: .\ldt_utils\models.py:46
 msgid "description"
 msgstr "description"
 
-#: .\ldt_utils\models.py:40
+#: .\ldt_utils\models.py:48
 msgid "media.src"
 msgstr "media source"
 
-#: .\ldt_utils\models.py:41
+#: .\ldt_utils\models.py:49
 msgid "media.mimetype"
 msgstr "mimetype"
 
-#: .\ldt_utils\models.py:100
+#: .\ldt_utils\models.py:117
 msgid "content.iri_id"
 msgstr "iri id"
 
-#: .\ldt_utils\models.py:101
+#: .\ldt_utils\models.py:118
 msgid "content.iriurl"
 msgstr "iri url"
 
-#: .\ldt_utils\models.py:102
+#: .\ldt_utils\models.py:119
 msgid "content.creation_date"
 msgstr "content creation date"
 
-#: .\ldt_utils\models.py:103
+#: .\ldt_utils\models.py:120
 msgid "content.update_date"
 msgstr "content update date"
 
-#: .\ldt_utils\models.py:104
+#: .\ldt_utils\models.py:121
 msgid "content.title"
 msgstr "title"
 
-#: .\ldt_utils\models.py:105
+#: .\ldt_utils\models.py:122
 msgid "content.description"
 msgstr "description"
 
-#: .\ldt_utils\models.py:106
+#: .\ldt_utils\models.py:123
 msgid "content.authors"
 msgstr "authors"
 
-#: .\ldt_utils\models.py:107
+#: .\ldt_utils\models.py:124
 msgid "content.duration"
 msgstr "duration (ms)"
 
-#: .\ldt_utils\models.py:306
+#: .\ldt_utils\models.py:324
 msgid "created by"
 msgstr "created by"
 
-#: .\ldt_utils\models.py:307
+#: .\ldt_utils\models.py:325
 msgid "changed by"
 msgstr "changed by"
 
-#: .\ldt_utils\utils.py:195
+#: .\ldt_utils\utils.py:198
 msgid "Personal cutting"
 msgstr "Personal cutting"
 
-#: .\ldt_utils\views.py:151 .\ldt_utils\views.py:612 .\ldt_utils\views.py:658
+#: .\ldt_utils\views.py:121 .\ldt_utils\views.py:637 .\ldt_utils\views.py:683
 msgid "You can not access this project"
 msgstr "You can not access this project"
 
-#: .\ldt_utils\views.py:286 .\ldt_utils\views.py:304
+#: .\ldt_utils\views.py:298
 msgid "Please enter valid keywords."
 msgstr "Please enter valid keywords."
 
-#: .\ldt_utils\views.py:824
+#: .\ldt_utils\views.py:864
 #, python-format
 msgid "the project %(title)s is published. please unpublish before deleting."
 msgstr "the project %(title)s is published. please unpublish before deleting."
 
-#: .\ldt_utils\views.py:825
+#: .\ldt_utils\views.py:865
 msgid "can not delete the project. Please correct the following error"
 msgstr "can not delete the project. Please correct the following error"
 
-#: .\ldt_utils\views.py:826
+#: .\ldt_utils\views.py:866
 msgid "title error deleting project"
 msgstr "Error when deleting project"
 
-#: .\ldt_utils\views.py:828
+#: .\ldt_utils\views.py:868
 #, python-format
 msgid "please confirm deleting project %(title)s"
 msgstr "Please confirm deleting project %(title)s"
 
-#: .\ldt_utils\views.py:829
+#: .\ldt_utils\views.py:869
 msgid "confirm deletion"
 msgstr "Confirm deletion"
 
-#: .\ldt_utils\views.py:1006
+#: .\ldt_utils\views.py:1071
 msgid "Problem when downloading file from url : "
 msgstr "Problem when downloading file from url: "
 
-#: .\ldt_utils\views.py:1009
+#: .\ldt_utils\views.py:1074
 msgid "Problem when uploading file : "
 msgstr "Problem when uploading file: "
 
-#: .\ldt_utils\views.py:1078
+#: .\ldt_utils\views.py:1145
 #, python-format
 msgid "There is %(count)d error when deleting content"
 msgid_plural "There are %(count)d errors when deleting content"
 msgstr[0] "There is %(count)d error when deleting content"
 msgstr[1] "There are %(count)d errors when deleting content"
 
-#: .\ldt_utils\views.py:1079
+#: .\ldt_utils\views.py:1146
 msgid "title error deleting content"
 msgstr "Error when deleting content"
 
-#: .\ldt_utils\views.py:1081
+#: .\ldt_utils\views.py:1148
 #, python-format
 msgid "Confirm delete content %(titles)s"
 msgstr "Confirm delete content %(titles)s"
 
-#: .\ldt_utils\views.py:1082
+#: .\ldt_utils\views.py:1149
 msgid "confirm delete content"
 msgstr "Confirm delete content"
 
-#: .\ldt_utils\views.py:1116
+#: .\ldt_utils\views.py:1183
 #, python-format
 msgid ""
 "Content '%(title)s' is referenced by this project : %(project_titles)s. "
@@ -293,12 +292,12 @@
 msgid "Copy your project"
 msgstr "Copy your project"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:16
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:80
+#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:17
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:99
 msgid "Title"
 msgstr "Title"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:20
+#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:21
 msgid "Copy"
 msgstr "Copy"
 
@@ -345,7 +344,8 @@
 msgstr "media file is being processed please wait."
 
 #: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:124
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:115
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:111
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:139
 #: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:52
 msgid "close_cancel"
 msgstr "Close"
@@ -358,47 +358,94 @@
 msgid "write"
 msgstr "Write"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:37
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:30
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:25
 msgid "check all"
 msgstr "check all"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:38
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:31
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:26
 msgid "uncheck all"
 msgstr "uncheck all"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:76
-msgid "Update your project"
-msgstr "Create your project"
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:73
+msgid "Update a group"
+msgstr "Update a group"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:76
-msgid "Create your project"
-msgstr "Create your project"
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:73
+msgid "Create a group"
+msgstr "Create a group"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:82
-#, fuzzy
-msgid "Description :"
-msgstr "description"
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:77
+#: .\user\templates\ldt\user\change_profile.html.py:52
+msgid "Name"
+msgstr "Name"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:84
-msgid "List of contents"
-msgstr "List of contents"
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:82
+msgid "List of members"
+msgstr "Members list"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:97
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:93
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:120
 #: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:3
 #: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:3
 #: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:3
 msgid "name"
 msgstr "name"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:117
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:94
+msgid "admin"
+msgstr ""
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:99
+msgid "Check to include this user in the group"
+msgstr "Check to include this user in the group"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:101
+msgid "Check to give this user the right to change the group"
+msgstr "Check to give this user the right to change the group"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:113
+#, fuzzy
+msgid "update_group"
+msgstr "update project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:114
+#, fuzzy
+msgid "delete_group"
+msgstr "delete project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:116
+#, fuzzy
+msgid "create_group"
+msgstr "Create a group"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:95
+msgid "Update your project"
+msgstr "Create your project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:95
+msgid "Create your project"
+msgstr "Create your project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:102
+#, fuzzy
+msgid "Description :"
+msgstr "description"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:106
+msgid "List of contents"
+msgstr "List of contents"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:141
 msgid "delete_project"
 msgstr "delete project"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:118
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:142
 msgid "update_project"
 msgstr "update project"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:120
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:144
 msgid "create_project"
 msgstr "Create new project"
 
@@ -446,35 +493,30 @@
 msgid "do_delete"
 msgstr "Approve delete"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:75
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:80
 #: .\templates\ldt\ldt_base.html.py:112
-#, fuzzy
 msgid "My groups"
-msgstr "Groups"
+msgstr "My groups"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:79
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:83
 #, fuzzy
-msgid "Click on the line to see the group's projects"
-msgstr "clik here to see the project content"
+msgid "Create group"
+msgstr "Create new project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:93
+#, fuzzy
+msgid "The group's projects"
+msgstr "The group's project"
 
 #: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:95
-#, fuzzy
-msgid "The group's projects"
-msgstr "Copy your project"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:97
 #: .\ldt_utils\templates\ldt\ldt_utils\ldt_list.html.py:79
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:71
+#: .\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:68
 #: .\templates\ldt\ldt_base.html.py:123
 msgid "search"
 msgstr "search"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:105
-msgid "You do not belong to any group."
-msgstr "You do not belong to any group."
-
 #: .\ldt_utils\templates\ldt\ldt_utils\init_ldt_full.html.py:16
 msgid ""
 "Your current work is modified. Click Cancel and save it one last time before "
@@ -487,16 +529,16 @@
 msgid "project list"
 msgstr "Projects"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:63
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:62
 msgid "Submit"
 msgstr "Submit"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:68
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:67
 #: .\templates\ldt\ldt_base.html.py:113
 msgid "Published projects"
 msgstr "Published projects"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:69
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:68
 #: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:66
 msgid "Create project"
 msgstr "Create new project"
@@ -519,8 +561,10 @@
 msgstr "Result"
 
 #: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:76
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:12
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:14
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:13
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:15
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:12
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:14
 msgid "open ldt"
 msgstr "open ldt"
 
@@ -528,21 +572,21 @@
 msgid "No title"
 msgstr "No title"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:86
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:87
 #, fuzzy
 msgid "Tags"
 msgstr "Pages"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:100
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:101
 msgid "previous"
 msgstr "Previous"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:105
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:106
 #, python-format
 msgid "Page %(number)s of  %(num_pages)s"
 msgstr "Page %(number)s of  %(num_pages)s"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:110
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:111
 msgid "next"
 msgstr "Next"
 
@@ -558,28 +602,81 @@
 msgid "preview media"
 msgstr "preview media"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:17
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:12
+msgid "You can't edit this content"
+msgstr "You can not edit this content"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:4
+#, fuzzy
+msgid "Click on the line to see the group's projects"
+msgstr "clik here to see the project content"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:17
+#, fuzzy
+msgid "Change this group"
+msgstr "Create a group"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:20
+#, fuzzy
+msgid "Leave this group"
+msgstr "Create a group"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:59
+#, fuzzy
+msgid "group list"
+msgstr "Projects"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:72
+msgid "nom"
+msgstr ""
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:73
+#: .\user\admin.py:26
+msgid "Permissions"
+msgstr "Permissions"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:83
+msgid "This group can read the project"
+msgstr "This group can read the project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:83
+msgid "perm.read"
+msgstr "read"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:84
+msgid "This group can change the project"
+msgstr "You can change the project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:84
+msgid "perm.write"
+msgstr "write"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:18
 msgid "copy project"
 msgstr "Copy your project"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:18
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:12
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:19
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:17
 msgid "link json by id"
 msgstr "link json by id"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:21
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:22
 msgid "Project published, click to unpublish"
 msgstr "Project published, click to unpublish"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:23
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:35
+msgid "You are not allowed to change this project"
+msgstr "You are not allowed to change this project"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:24
 msgid "Project not published, click to publish"
 msgstr "Project not published, click to publish"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:11
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:16
 msgid "copy the project"
 msgstr "Copy your project"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:14
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:19
 msgid "Project published"
 msgstr " published"
 
@@ -821,9 +918,8 @@
 
 #: .\templates\ldt\ldt_base.html.py:92
 #: .\user\templates\ldt\user\change_profile.html.py:85
-#, fuzzy
 msgid "Profile change"
-msgstr "Mail change"
+msgstr "Profile change"
 
 #: .\templates\ldt\ldt_base.html.py:111 .\templates\ldt\ldt_base.html.py:112
 msgid "home"
@@ -905,19 +1001,15 @@
 msgid "annotation.update_date"
 msgstr "update date"
 
-#: .\user\admin.py:13
+#: .\user\admin.py:24
 msgid "User details"
 msgstr "User details"
 
-#: .\user\admin.py:14
+#: .\user\admin.py:25
 msgid "Groups"
 msgstr "Groups"
 
-#: .\user\admin.py:15
-msgid "Permissions"
-msgstr "Permissions"
-
-#: .\user\admin.py:25 .\user\templates\ldt\user\change_profile.html.py:95
+#: .\user\admin.py:37 .\user\templates\ldt\user\change_profile.html.py:95
 #: .\user\templates\ldt\user\login_form.html.py:61
 msgid "Password"
 msgstr "Password"
@@ -952,6 +1044,10 @@
 msgid "Language"
 msgstr "Language"
 
+#: .\user\models.py:38
+msgid "Designates whether the user can create and leave groups."
+msgstr ""
+
 #: .\user\views.py:29
 msgid "Your profile has been updated."
 msgstr "Your profile has been changed."
@@ -987,10 +1083,6 @@
 msgid "Username"
 msgstr "Username:"
 
-#: .\user\templates\ldt\user\change_profile.html.py:52
-msgid "Name"
-msgstr "Name"
-
 #: .\user\templates\ldt\user\change_profile.html.py:60
 msgid "Email"
 msgstr "E-mail"
@@ -1216,6 +1308,3 @@
 msgstr ""
 "We've e-mailed you instructions for activate your account to the e-mail "
 "address you submitted. You should be receiving it shortly."
-
-#~ msgid "Django site admin"
-#~ msgstr "Django administration"
Binary file src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo has changed
--- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po	Wed Nov 30 10:44:15 2011 +0100
@@ -1,1222 +1,1311 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-11-28 15:39+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"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: \n"
+
+#: .\forms\widgets.py:17
+msgid "Date"
+msgstr "Date"
+
+#: .\forms\widgets.py:17
+msgid "Time"
+msgstr "Heure"
+
+#: .\ldt_utils\forms.py:34
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:52
+msgid "Search"
+msgstr "Recherche"
+
+#: .\ldt_utils\forms.py:35
+msgid "all"
+msgstr "tous"
+
+#: .\ldt_utils\forms.py:35
+#: .\ldt_utils\models.py:47
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:69
+msgid "title"
+msgstr "titre"
+
+#: .\ldt_utils\forms.py:35
+msgid "resume"
+msgstr "description"
+
+#: .\ldt_utils\forms.py:35
+msgid "tags"
+msgstr "tags"
+
+#: .\ldt_utils\forms.py:35
+msgid "Fields"
+msgstr "Champs"
+
+#: .\ldt_utils\forms.py:36
+msgid "Display the results in Lignes De Temps"
+msgstr "Afficher les résultats dans Lignes De Temps"
+
+#: .\ldt_utils\forms.py:50
+#: .\ldt_utils\models.py:125
+msgid "content.content_creation_date"
+msgstr "Date de création du contenu"
+
+#: .\ldt_utils\forms.py:51
+msgid "content.media_input_type"
+msgstr "Source du média"
+
+#: .\ldt_utils\forms.py:51
+msgid "file_upload"
+msgstr "upload fichier"
+
+#: .\ldt_utils\forms.py:51
+msgid "url"
+msgstr "url"
+
+#: .\ldt_utils\forms.py:51
+msgid "existing_media"
+msgstr "média existant"
+
+#: .\ldt_utils\forms.py:51
+msgid "create_media"
+msgstr "source externe : fichier streamé, statique, url youtube..."
+
+#: .\ldt_utils\forms.py:51
+msgid "none_media"
+msgstr "Aucun"
+
+#: .\ldt_utils\models.py:36
+msgid "media.external_id"
+msgstr "id externe"
+
+#: .\ldt_utils\models.py:37
+msgid "media.external_permalink"
+msgstr "permalien externe"
+
+#: .\ldt_utils\models.py:38
+msgid "media.external_publication_url"
+msgstr "url de publication externe"
+
+#: .\ldt_utils\models.py:39
+msgid "media.external_src_url"
+msgstr "url source"
+
+#: .\ldt_utils\models.py:40
+msgid "media.creation_date"
+msgstr "Date de création"
+
+#: .\ldt_utils\models.py:41
+msgid "media.media_creation_date"
+msgstr "Date de création du média"
+
+#: .\ldt_utils\models.py:42
+msgid "media.update_date"
+msgstr "Date de maj"
+
+#: .\ldt_utils\models.py:43
+msgid "media.videopath"
+msgstr "videopath"
+
+#: .\ldt_utils\models.py:44
+msgid "media.duration"
+msgstr "Durée du contenu (ms)"
+
+#: .\ldt_utils\models.py:45
+msgid "media.creator"
+msgstr "Créateur"
+
+#: .\ldt_utils\models.py:46
+msgid "description"
+msgstr "description"
+
+#: .\ldt_utils\models.py:48
+msgid "media.src"
+msgstr "Sources"
+
+#: .\ldt_utils\models.py:49
+msgid "media.mimetype"
+msgstr "mimetype"
+
+#: .\ldt_utils\models.py:117
+msgid "content.iri_id"
+msgstr "iri id"
+
+#: .\ldt_utils\models.py:118
+msgid "content.iriurl"
+msgstr "iri url"
+
+#: .\ldt_utils\models.py:119
+msgid "content.creation_date"
+msgstr "date de création"
+
+#: .\ldt_utils\models.py:120
+msgid "content.update_date"
+msgstr "Date de maj"
+
+#: .\ldt_utils\models.py:121
+msgid "content.title"
+msgstr "titre"
+
+#: .\ldt_utils\models.py:122
+msgid "content.description"
+msgstr "Description"
+
+#: .\ldt_utils\models.py:123
+msgid "content.authors"
+msgstr "Auteurs"
+
+#: .\ldt_utils\models.py:124
+msgid "content.duration"
+msgstr "Durée (ms)"
+
+#: .\ldt_utils\models.py:324
+msgid "created by"
+msgstr "créé par"
+
+#: .\ldt_utils\models.py:325
+msgid "changed by"
+msgstr "modifié par"
+
+#: .\ldt_utils\utils.py:198
+msgid "Personal cutting"
+msgstr "Découpages personnels"
+
+#: .\ldt_utils\views.py:121
+#: .\ldt_utils\views.py:637
+#: .\ldt_utils\views.py:683
+msgid "You can not access this project"
+msgstr "vous n'avez pas l'autorisation d'accéder à ce projet"
+
+#: .\ldt_utils\views.py:298
+msgid "Please enter valid keywords."
+msgstr "Veuillez entrer des mots-clés valides."
+
+#: .\ldt_utils\views.py:864
+#, python-format
+msgid "the project %(title)s is published. please unpublish before deleting."
+msgstr "Le projet %(title)s est publié. Déplublier le avant de l'effacer."
+
+#: .\ldt_utils\views.py:865
+msgid "can not delete the project. Please correct the following error"
+msgstr "Le projet ne peut pas être effacé. Veuillez corriger les erreurs suivantes."
+
+#: .\ldt_utils\views.py:866
+msgid "title error deleting project"
+msgstr "Erreur lors de l'effacement du projet"
+
+#: .\ldt_utils\views.py:868
+#, python-format
+msgid "please confirm deleting project %(title)s"
+msgstr "Confirmer l'effacement du projet intitulé %(title)s"
+
+#: .\ldt_utils\views.py:869
+msgid "confirm deletion"
+msgstr "Confirmation d'effacement"
+
+#: .\ldt_utils\views.py:1071
+msgid "Problem when downloading file from url : "
+msgstr "Problème lors du téléchargement du fichier : "
+
+#: .\ldt_utils\views.py:1074
+msgid "Problem when uploading file : "
+msgstr "Problème lors de l'upload du fichier : "
+
+#: .\ldt_utils\views.py:1145
+#, 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.py:1146
+msgid "title error deleting content"
+msgstr "Erreur lors de l'effacement du contenu"
+
+#: .\ldt_utils\views.py:1148
+#, python-format
+msgid "Confirm delete content %(titles)s"
+msgstr "Veuillez confirmer l'effacement du contenu %(titles)s"
+
+#: .\ldt_utils\views.py:1149
+msgid "confirm delete content"
+msgstr "Confirmation effacement contenu"
+
+#: .\ldt_utils\views.py:1183
+#, python-format
 msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-07 12:22+0200\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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: \n"
-
-#: .\forms\widgets.py:17
-msgid "Date"
-msgstr "Date"
-
-#: .\forms\widgets.py:17
-msgid "Time"
-msgstr "Heure"
-
-#: .\ldt_utils\forms.py:26
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:53
-msgid "Search"
-msgstr "Recherche"
-
-#: .\ldt_utils\forms.py:27
-msgid "all"
-msgstr "tous"
-
-#: .\ldt_utils\forms.py:27 .\ldt_utils\models.py:39
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:69
-msgid "title"
-msgstr "titre"
-
-#: .\ldt_utils\forms.py:27
-msgid "resume"
-msgstr "description"
-
-#: .\ldt_utils\forms.py:27
-msgid "tags"
-msgstr "tags"
-
-#: .\ldt_utils\forms.py:27
-msgid "Fields"
-msgstr "Champs"
-
-#: .\ldt_utils\forms.py:28
-msgid "Display the results in Lignes De Temps"
-msgstr "Afficher les résultats dans Lignes De Temps"
-
-#: .\ldt_utils\forms.py:42 .\ldt_utils\models.py:108
-msgid "content.content_creation_date"
-msgstr "Date de création du contenu"
-
-#: .\ldt_utils\forms.py:43
-msgid "content.media_input_type"
-msgstr "Source du média"
-
-#: .\ldt_utils\forms.py:43
-msgid "file_upload"
-msgstr "upload fichier"
-
-#: .\ldt_utils\forms.py:43
-msgid "url"
-msgstr "url"
-
-#: .\ldt_utils\forms.py:43
-msgid "existing_media"
-msgstr "média existant"
-
-#: .\ldt_utils\forms.py:43
-msgid "create_media"
-msgstr "source externe : fichier streamé, statique, url youtube..."
-
-#: .\ldt_utils\forms.py:43
-msgid "none_media"
-msgstr "Aucun"
-
-#: .\ldt_utils\models.py:28
-msgid "media.external_id"
-msgstr "id externe"
-
-#: .\ldt_utils\models.py:29
-msgid "media.external_permalink"
-msgstr "permalien externe"
-
-#: .\ldt_utils\models.py:30
-msgid "media.external_publication_url"
-msgstr "url de publication externe"
-
-#: .\ldt_utils\models.py:31
-msgid "media.external_src_url"
-msgstr "url source"
-
-#: .\ldt_utils\models.py:32
-msgid "media.creation_date"
-msgstr "Date de création"
-
-#: .\ldt_utils\models.py:33
-msgid "media.media_creation_date"
-msgstr "Date de création du média"
-
-#: .\ldt_utils\models.py:34
-msgid "media.update_date"
-msgstr "Date de maj"
-
-#: .\ldt_utils\models.py:35
-msgid "media.videopath"
-msgstr "videopath"
-
-#: .\ldt_utils\models.py:36
-msgid "media.duration"
-msgstr "Durée du contenu (ms)"
-
-#: .\ldt_utils\models.py:37
-msgid "media.creator"
-msgstr "Créateur"
-
-#: .\ldt_utils\models.py:38
-msgid "description"
-msgstr "description"
-
-#: .\ldt_utils\models.py:40
-msgid "media.src"
-msgstr "Sources"
-
-#: .\ldt_utils\models.py:41
-msgid "media.mimetype"
-msgstr "mimetype"
-
-#: .\ldt_utils\models.py:100
-msgid "content.iri_id"
-msgstr "iri id"
-
-#: .\ldt_utils\models.py:101
-msgid "content.iriurl"
-msgstr "iri url"
-
-#: .\ldt_utils\models.py:102
-msgid "content.creation_date"
-msgstr "date de création"
-
-#: .\ldt_utils\models.py:103
-msgid "content.update_date"
-msgstr "Date de maj"
-
-#: .\ldt_utils\models.py:104
-msgid "content.title"
-msgstr "titre"
-
-#: .\ldt_utils\models.py:105
-msgid "content.description"
-msgstr "Description"
-
-#: .\ldt_utils\models.py:106
-msgid "content.authors"
-msgstr "Auteurs"
-
-#: .\ldt_utils\models.py:107
-msgid "content.duration"
-msgstr "Durée (ms)"
-
-#: .\ldt_utils\models.py:306
-msgid "created by"
-msgstr "créé par"
-
-#: .\ldt_utils\models.py:307
-msgid "changed by"
-msgstr "modifié par"
-
-#: .\ldt_utils\utils.py:195
-msgid "Personal cutting"
-msgstr "Découpages personnels"
-
-#: .\ldt_utils\views.py:151 .\ldt_utils\views.py:612 .\ldt_utils\views.py:658
-msgid "You can not access this project"
-msgstr "vous n'avez pas l'autorisation d'accéder à ce projet"
-
-#: .\ldt_utils\views.py:286 .\ldt_utils\views.py:304
-msgid "Please enter valid keywords."
-msgstr "Veuillez entrer des mots-clés valides."
-
-#: .\ldt_utils\views.py:824
-#, python-format
-msgid "the project %(title)s is published. please unpublish before deleting."
-msgstr "Le projet %(title)s est publié. Déplublier le avant de l'effacer."
-
-#: .\ldt_utils\views.py:825
-msgid "can not delete the project. Please correct the following error"
-msgstr ""
-"Le projet ne peut pas être effacé. Veuillez corriger les erreurs suivantes."
-
-#: .\ldt_utils\views.py:826
-msgid "title error deleting project"
-msgstr "Erreur lors de l'effacement du projet"
-
-#: .\ldt_utils\views.py:828
-#, python-format
-msgid "please confirm deleting project %(title)s"
-msgstr "Confirmer l'effacement du projet intitulé %(title)s"
-
-#: .\ldt_utils\views.py:829
-msgid "confirm deletion"
-msgstr "Confirmation d'effacement"
-
-#: .\ldt_utils\views.py:1006
-msgid "Problem when downloading file from url : "
-msgstr "Problème lors du téléchargement du fichier : "
-
-#: .\ldt_utils\views.py:1009
-msgid "Problem when uploading file : "
-msgstr "Problème lors de l'upload du fichier : "
-
-#: .\ldt_utils\views.py:1078
-#, 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.py:1079
-msgid "title error deleting content"
-msgstr "Erreur lors de l'effacement du contenu"
-
-#: .\ldt_utils\views.py:1081
-#, python-format
-msgid "Confirm delete content %(titles)s"
-msgstr "Veuillez confirmer l'effacement du contenu %(titles)s"
-
-#: .\ldt_utils\views.py:1082
-msgid "confirm delete content"
-msgstr "Confirmation effacement contenu"
-
-#: .\ldt_utils\views.py:1116
-#, python-format
+"Content '%(title)s' is referenced by this project : %(project_titles)s. "
+"Please delete it beforehand."
+msgid_plural ""
+"Content '%(title)s' is referenced by %(count)d projects: %(project_titles)s." 
+"Please delete them beforehand."
+msgstr[0] ""
+"Le contenu '%(title)s' est référencé par le projet '%(project_titles)s'."
+"Veuillez l'effacer préalablement."
+msgstr[1] ""
+"Le contenu '%(title)s' est référencé par les projets suivants : '%"
+"(project_titles)s'.Veuillez les effacer préalablement."
+
+#: .\ldt_utils\templates\admin\ldt_utils\app_action.html.py:4
+#: .\templates\admin\cms_change_list.html.py:7
+#: .\templates\admin\page_app_index.html.py:8
+#: .\templates\admin\page_change_form.html.py:17
+#: .\templates\admin\page_change_list.html.py:25
+#: .\user\templates\registration\logged_out.html.py:4
+msgid "Home"
+msgstr "Accueil"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:55
+#: .\templates\admin\page_base.html.py:19
+#: .\user\templates\ldt\user\login_form.html.py:33
+msgid "Space"
+msgstr "Esp. perso"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:56
+msgid "Ldt Project"
+msgstr "Projet lignes de temps"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:59
+msgid "Contents"
+msgstr "Liste des contenus"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:63
+msgid "Create new content"
+msgstr "Créer un nouveau contenu"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:66
+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:10
+msgid "create project"
+msgstr "Créer un nouveau projet d'indexation"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:12
+msgid "Copy your project"
+msgstr "Copier votre projet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:17
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:99
+msgid "Title"
+msgstr "Titre"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:21
+msgid "Copy"
+msgstr "Copier"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:41
+msgid "Browse"
+msgstr "Parcourir"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:42
+msgid "File uploaded"
+msgstr "Fichier téléversé"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:43
+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:44
+msgid "Cancel upload"
+msgstr "Annuler le téléversement"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:56
+msgid ""
+"The operation could not be performed because one or more error(s) occurred."
+"<br />Please resubmit the content form after making the following changes:"
+msgstr "Opération impossible à cause d'une ou plusieurs erreurs.<br />Veuillez "
+"resoumettre le formulaire contenu après avoir fait les changements suivants:"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:66
 msgid ""
-"Content '%(title)s' is referenced by this project : %(project_titles)s. "
-"Please delete it beforehand."
-msgid_plural ""
-"Content '%(title)s' is referenced by %(count)d projects: %(project_titles)s. "
-"Please delete them beforehand."
-msgstr[0] ""
-"Le contenu '%(title)s' est référencé par le projet '%(project_titles)s'."
-"Veuillez l'effacer préalablement."
-msgstr[1] ""
-"Le contenu '%(title)s' est référencé par les projets suivants : '%"
-"(project_titles)s'.Veuillez les effacer préalablement."
-
-#: .\ldt_utils\templates\admin\ldt_utils\app_action.html.py:4
-#: .\templates\admin\cms_change_list.html.py:7
-#: .\templates\admin\page_app_index.html.py:8
-#: .\templates\admin\page_change_form.html.py:17
-#: .\templates\admin\page_change_list.html.py:25
-#: .\user\templates\registration\logged_out.html.py:4
-msgid "Home"
-msgstr "Accueil"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:55
-#: .\templates\admin\page_base.html.py:19
-#: .\user\templates\ldt\user\login_form.html.py:33
-msgid "Space"
-msgstr "Esp. perso"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:56
-msgid "Ldt Project"
-msgstr "Projet lignes de temps"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:59
-msgid "Contents"
-msgstr "Liste des contenus"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:63
-msgid "Create new content"
-msgstr "Créer un nouveau contenu"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:66
-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:10
-msgid "create project"
-msgstr "Créer un nouveau projet d'indexation"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:12
-msgid "Copy your project"
-msgstr "Copier votre projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:16
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:80
-msgid "Title"
-msgstr "Titre"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:20
-msgid "Copy"
-msgstr "Copier"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:41
-msgid "Browse"
-msgstr "Parcourir"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:42
-msgid "File uploaded"
-msgstr "Fichier téléversé"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:43
-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:44
-msgid "Cancel upload"
-msgstr "Annuler le téléversement"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:56
-msgid ""
-"The operation could not be performed because one or more error(s) occurred."
-"<br />Please resubmit the content form after making the following changes:"
-msgstr ""
-"Opération impossible à cause d'une ou plusieurs erreurs.<br />Veuillez "
-"resoumettre le formulaire contenu après avoir fait les changements suivants:"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:66
-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:"
-msgstr ""
-"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:76
-#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:54
-msgid "Create content"
-msgstr "Créer un contenu"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:120
-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:124
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:115
-#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:52
-msgid "close_cancel"
-msgstr "Fermer"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:125
-msgid "delete"
-msgstr "Effacer"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:126
-msgid "write"
-msgstr "Enregistrer"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:37
-msgid "check all"
-msgstr "Tout cocher"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:38
-msgid "uncheck all"
-msgstr "Tout décocher"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:76
-msgid "Update your project"
-msgstr "Mettre à jour votre projet Lignes de Temps"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:76
-msgid "Create your project"
-msgstr "Créer votre projet Lignes de Temps"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:82
-#, fuzzy
-msgid "Description :"
-msgstr "description"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:84
-msgid "List of contents"
-msgstr "Liste de contenus"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:97
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:3
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:3
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:3
-msgid "name"
-msgstr "Nom"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:117
-msgid "delete_project"
-msgstr "Effacer"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:118
-msgid "update_project"
-msgstr "Mettre à jour"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:120
-msgid "create_project"
-msgstr "Créer un nouveau projet Ligne de Temps"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:56
-msgid "project id"
-msgstr "Identifiant du projet "
-
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:57
-msgid "copy to clipboard"
-msgstr "Copier l'id dans le presse-papiers"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
-msgid "popup_player"
-msgstr "Code Lecteur métadata"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
-msgid "popup_seo_body"
-msgstr "Code SEO"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
-msgid "popup_seo_meta"
-msgstr "Code balise meta en-tête"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
-msgid "popup_links"
-msgstr "Liste de liens"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:80
-msgid "clik here to see the project content"
-msgstr "cliquer ici pour voir le contenu du projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:33
-msgid "error"
-msgstr "Erreur"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:33
-msgid "confirm"
-msgstr "Confirmation d'effacement"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:48
-msgid "close_error"
-msgstr "Fermer"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:53
-msgid "do_delete"
-msgstr "Effacer"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:75
-#: .\templates\ldt\ldt_base.html.py:112
-msgid "My groups"
-msgstr "Groupes"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:79
-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\groups.html.py:95
-msgid "The group's projects"
-msgstr "projets du groupe"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:97
-#: .\ldt_utils\templates\ldt\ldt_utils\ldt_list.html.py:79
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:71
-#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:56
-#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:68
-#: .\templates\ldt\ldt_base.html.py:123
-msgid "search"
-msgstr "Recherche"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:105
-msgid "You do not belong to any group."
-msgstr "Vous ne faites partie d'aucun groupe."
-
-#: .\ldt_utils\templates\ldt\ldt_utils\init_ldt_full.html.py:16
+"The operation could not be performed because one or more error(s) occurred."
+"<br />Please resubmit the media form after making the following changes:"
+msgstr "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:76
+#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:54
+msgid "Create content"
+msgstr "Créer un contenu"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:120
+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:124
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:111
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:139
+#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:52
+msgid "close_cancel"
+msgstr "Fermer"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:125
+msgid "delete"
+msgstr "Effacer"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:126
+msgid "write"
+msgstr "Enregistrer"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:30
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:25
+msgid "check all"
+msgstr "Tout cocher"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:31
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:26
+msgid "uncheck all"
+msgstr "Tout décocher"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:73
+msgid "Update a group"
+msgstr "Mettre à jour votre groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:73
+msgid "Create a group"
+msgstr "Créer un groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:77
+#: .\user\templates\ldt\user\change_profile.html.py:52
+msgid "Name"
+msgstr "Nom"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:82
+msgid "List of members"
+msgstr "Liste des membres"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:93
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:120
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:3
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:3
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:3
+msgid "name"
+msgstr "Nom"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:94
+msgid "admin"
+msgstr "Administrateur"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:99
+msgid "Check to include this user in the group"
+msgstr "Cocher pour inclure cet utilisateur dans le groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:101
+msgid "Check to give this user the right to change the group"
+msgstr "Cocher pour donner à cet utilisateur le droit de modifier le groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:113
+msgid "update_group"
+msgstr "Mettre à jour le groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:114
+msgid "delete_group"
+msgstr "Effacer le groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:116
+msgid "create_group"
+msgstr "Créer un nouveau groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:95
+msgid "Update your project"
+msgstr "Mettre à jour votre projet Lignes de Temps"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:95
+msgid "Create your project"
+msgstr "Créer votre projet Lignes de Temps"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:102
+msgid "Description :"
+msgstr "Description :"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:106
+msgid "List of contents"
+msgstr "Liste de contenus"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:141
+msgid "delete_project"
+msgstr "Effacer"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:142
+msgid "update_project"
+msgstr "Mettre à jour"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:144
+msgid "create_project"
+msgstr "Créer un nouveau projet Ligne de Temps"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:56
+msgid "project id"
+msgstr "Identifiant du projet "
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:57
+msgid "copy to clipboard"
+msgstr "Copier l'id dans le presse-papiers"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
+msgid "popup_player"
+msgstr "Code Lecteur métadata"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
+msgid "popup_seo_body"
+msgstr "Code SEO"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
+msgid "popup_seo_meta"
+msgstr "Code balise meta en-tête"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
+msgid "popup_links"
+msgstr "Liste de liens"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:80
+msgid "clik here to see the project content"
+msgstr "cliquer ici pour voir le contenu du projet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:33
+msgid "error"
+msgstr "Erreur"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:33
+msgid "confirm"
+msgstr "Confirmation d'effacement"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:48
+msgid "close_error"
+msgstr "Fermer"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:53
+msgid "do_delete"
+msgstr "Effacer"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:80
+#: .\templates\ldt\ldt_base.html.py:112
+msgid "My groups"
+msgstr "Groupes"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:83
+msgid "Create group"
+msgstr "Créer un nouveau groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:93
+msgid "The group's projects"
+msgstr "projets du groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:95
+#: .\ldt_utils\templates\ldt\ldt_utils\ldt_list.html.py:79
+#: .\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:68
+#: .\templates\ldt\ldt_base.html.py:123
+msgid "search"
+msgstr "Recherche"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\init_ldt_full.html.py:16
 msgid ""
-"Your current work is modified. Click Cancel and save it one last time before "
-"leaving. Click OK to leave without saving."
-msgstr ""
-"Vous avez un travail en cours. Cliquez sur Annuler et sauvegardez votre "
-"travail une dernière fois. Cliquez sur OK pour quitter sans sauvegarder."
-
-#: .\ldt_utils\templates\ldt\ldt_utils\ldt_list.html.py:77
-msgid "project list"
-msgstr "Liste des projets"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:63
-msgid "Submit"
-msgstr "Chercher"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:68
-#: .\templates\ldt\ldt_base.html.py:113
-msgid "Published projects"
-msgstr "Projets publiés"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:69
-#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:66
-msgid "Create project"
-msgstr "Créer un nouveau projet d'indexation"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_form.html.py:10
-msgid "The search field can not be empty."
-msgstr "Le champ de recherche ne peut pas être vide."
-
-#: .\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\ldt\ldt_utils\search_results.html.py:62
-msgid "Results for "
-msgstr "Résultats pour "
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:62
-msgid "Result"
-msgstr "Résultat"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:76
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:12
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:14
-msgid "open ldt"
-msgstr "Ouvrir sous Lignes de Temps"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:80
-msgid "No title"
-msgstr "Sans titre"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:86
-#, fuzzy
-msgid "Tags"
-msgstr "tags"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:100
-msgid "previous"
-msgstr "Précedent"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:105
-#, python-format
-msgid "Page %(number)s of  %(num_pages)s"
-msgstr "Page %(number)s de  %(num_pages)s"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:110
-msgid "next"
-msgstr "Suivant"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:53
-msgid "content list"
-msgstr "Liste des contenus"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:65
-msgid "My projects"
-msgstr "Mes projets"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:11
-msgid "preview media"
-msgstr "Aperçu"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:17
-msgid "copy project"
-msgstr "Copier votre projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:18
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:12
-msgid "link json by id"
-msgstr "Ouvrir le lecteur de métadata"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:21
-msgid "Project published, click to unpublish"
-msgstr "Projet publié, cliquer pour de-publier"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:23
-msgid "Project not published, click to publish"
-msgstr "Projet non publié, cliquer pour publier"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:11
-msgid "copy the project"
-msgstr "Copier le projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:14
-msgid "Project published"
-msgstr "Projet publié"
-
-#: .\templates\admin\cms_change_form.html.py:30
-msgid "Approve page deletion"
-msgstr "Accepter l'effacement de la page"
-
-#: .\templates\admin\cms_change_form.html.py:36
-#, python-format
-msgid "(requires approvement at %(moderation_level)s level)"
-msgstr "(Demande l'approbation au niveau %(moderation_level)s)"
-
-#: .\templates\admin\cms_change_form.html.py:37
-msgid "(you can perform actions on this page directly)"
-msgstr "(Vous pouvez agir sur cette page directement)"
-
-#: .\templates\admin\cms_change_form.html.py:50
-msgid "Remove delete request"
-msgstr "Effacer la requête d'affacement"
-
-#: .\templates\admin\cms_change_form.html.py:52
-msgid "Approve delete"
-msgstr "Accepter l'effacement"
-
-#: .\templates\admin\cms_change_form.html.py:52
-msgid "Approve"
-msgstr "Accepter"
-
-#: .\templates\admin\cms_change_form.html.py:52
-#: .\templates\admin\cms_change_form.html.py:53
-msgid "draft"
-msgstr "brouillon"
-
-#: .\templates\admin\cms_change_form.html.py:53
-msgid "Preview"
-msgstr "Aperçu"
-
-#: .\templates\admin\cms_change_form.html.py:56
-#: .\templates\admin\page_change_form.html.py:27
-msgid "History"
-msgstr "Histoire"
-
-#: .\templates\admin\cms_change_form.html.py:57
-#: .\templates\admin\page_change_form.html.py:28
-msgid "View on site"
-msgstr "Voir sur le site"
-
-#: .\templates\admin\cms_change_form.html.py:87
-#: .\templates\admin\page_change_form.html.py:38
-#: .\templates\admin\page_change_list.html.py:54
-#: .\templates\cms\admin\cms\page\change_form.html.py:24
-msgid "Please correct the error below."
-msgid_plural "Please correct the errors below."
-msgstr[0] "Veuillez corriger l'erreur ci-dessous"
-msgstr[1] "Veuillez corriger les erreurs ci-dessous"
-
-#: .\templates\admin\cms_change_form.html.py:107
-msgid "All permissions"
-msgstr "Toutes le parmissions"
-
-#: .\templates\admin\cms_change_form.html.py:108
-#: .\templates\admin\cms_change_form.html.py:120
-msgid "Loading..."
-msgstr "Chargement..."
-
-#: .\templates\admin\cms_change_form.html.py:119
-msgid "Page states"
-msgstr "Etat de la page"
-
-#: .\templates\admin\cms_change_form.html.py:142
-#, python-format
+"Your current work is modified. Click Cancel and save it one last time before "
+"leaving. Click OK to leave without saving."
+msgstr "Vous avez un travail en cours. Cliquez sur Annuler et sauvegardez votre "
+"travail une dernière fois. Cliquez sur OK pour quitter sans sauvegarder."
+
+#: .\ldt_utils\templates\ldt\ldt_utils\ldt_list.html.py:77
+msgid "project list"
+msgstr "Liste des projets"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:62
+msgid "Submit"
+msgstr "Chercher"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:67
+#: .\templates\ldt\ldt_base.html.py:113
+msgid "Published projects"
+msgstr "Projets publiés"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:68
+#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:66
+msgid "Create project"
+msgstr "Créer un nouveau projet d'indexation"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_form.html.py:10
+msgid "The search field can not be empty."
+msgstr "Le champ de recherche ne peut pas être vide."
+
+#: .\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\ldt\ldt_utils\search_results.html.py:62
+msgid "Results for "
+msgstr "Résultats pour "
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:62
+msgid "Result"
+msgstr "Résultat"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:76
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:13
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:15
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:12
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:14
+msgid "open ldt"
+msgstr "Ouvrir sous Lignes de Temps"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:80
+msgid "No title"
+msgstr "Sans titre"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:87
+#, fuzzy
+msgid "Tags"
+msgstr "tags"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:101
+msgid "previous"
+msgstr "Précedent"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:106
+#, python-format
+msgid "Page %(number)s of  %(num_pages)s"
+msgstr "Page %(number)s de  %(num_pages)s"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\search_results.html.py:111
+msgid "next"
+msgstr "Suivant"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:53
+msgid "content list"
+msgstr "Liste des contenus"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:65
+msgid "My projects"
+msgstr "Mes projets"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:11
+msgid "preview media"
+msgstr "Aperçu"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:12
+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:4
+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:17
+msgid "Change this group"
+msgstr "Modifier ce groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\groupslist.html.py:20
+msgid "Leave this group"
+msgstr "Quitter ce groupe"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:59
+msgid "group list"
+msgstr "Liste des groupes"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:72
+msgid "nom"
+msgstr "nom"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:73
+#: .\user\admin.py:26
+msgid "Permissions"
+msgstr "Permissions"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:83
+msgid "This group can read the project"
+msgstr "Ce groupe peut lire le projet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:83
+msgid "perm.read"
+msgstr "lecture"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:84
+msgid "This group can change the project"
+msgstr "Ce groupe peut changer le projet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:84
+msgid "perm.write"
+msgstr "écriture"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:18
+msgid "copy project"
+msgstr "Copier votre projet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:19
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:17
+msgid "link json by id"
+msgstr "Ouvrir le lecteur de métadata"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:22
+msgid "Project published, click to unpublish"
+msgstr "Projet publié, cliquer pour de-publier"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:35
+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:24
+msgid "Project not published, click to publish"
+msgstr "Projet non publié, cliquer pour publier"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:16
+msgid "copy the project"
+msgstr "Copier le projet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:19
+msgid "Project published"
+msgstr "Projet publié"
+
+#: .\templates\admin\cms_change_form.html.py:30
+msgid "Approve page deletion"
+msgstr "Accepter l'effacement de la page"
+
+#: .\templates\admin\cms_change_form.html.py:36
+#, python-format
+msgid "(requires approvement at %(moderation_level)s level)"
+msgstr "(Demande l'approbation au niveau %(moderation_level)s)"
+
+#: .\templates\admin\cms_change_form.html.py:37
+msgid "(you can perform actions on this page directly)"
+msgstr "(Vous pouvez agir sur cette page directement)"
+
+#: .\templates\admin\cms_change_form.html.py:50
+msgid "Remove delete request"
+msgstr "Effacer la requête d'affacement"
+
+#: .\templates\admin\cms_change_form.html.py:52
+msgid "Approve delete"
+msgstr "Accepter l'effacement"
+
+#: .\templates\admin\cms_change_form.html.py:52
+msgid "Approve"
+msgstr "Accepter"
+
+#: .\templates\admin\cms_change_form.html.py:52
+#: .\templates\admin\cms_change_form.html.py:53
+msgid "draft"
+msgstr "brouillon"
+
+#: .\templates\admin\cms_change_form.html.py:53
+msgid "Preview"
+msgstr "Aperçu"
+
+#: .\templates\admin\cms_change_form.html.py:56
+#: .\templates\admin\page_change_form.html.py:27
+msgid "History"
+msgstr "Histoire"
+
+#: .\templates\admin\cms_change_form.html.py:57
+#: .\templates\admin\page_change_form.html.py:28
+msgid "View on site"
+msgstr "Voir sur le site"
+
+#: .\templates\admin\cms_change_form.html.py:87
+#: .\templates\admin\page_change_form.html.py:38
+#: .\templates\admin\page_change_list.html.py:54
+#: .\templates\cms\admin\cms\page\change_form.html.py:24
+msgid "Please correct the error below."
+msgid_plural "Please correct the errors below."
+msgstr[0] "Veuillez corriger l'erreur ci-dessous"
+msgstr[1] "Veuillez corriger les erreurs ci-dessous"
+
+#: .\templates\admin\cms_change_form.html.py:107
+msgid "All permissions"
+msgstr "Toutes le parmissions"
+
+#: .\templates\admin\cms_change_form.html.py:108
+#: .\templates\admin\cms_change_form.html.py:120
+msgid "Loading..."
+msgstr "Chargement..."
+
+#: .\templates\admin\cms_change_form.html.py:119
+msgid "Page states"
+msgstr "Etat de la page"
+
+#: .\templates\admin\cms_change_form.html.py:142
+#, python-format
 msgid ""
-"This page must be moderated at level %(moderation_level)s, post a message "
-"for moderator."
-msgstr ""
-"Le niveau nécessaire pour modérer cette page est le niveau %"
-"(moderation_level)s, laisser un message pour le modérateur"
-
-#: .\templates\admin\cms_change_form.html.py:144
-msgid "Request approvemet"
-msgstr "Demander l'approbation"
-
-#: .\templates\admin\cms_change_form.html.py:234
-#: .\user\templates\registration\registration_form.html.py:16
-msgid "Save"
-msgstr "Enregistrer"
-
-#: .\templates\admin\cms_change_form.html.py:235
-msgid "Save and continue editing"
-msgstr "Sauver et continuer l'édition"
-
-#: .\templates\admin\cms_change_list.html.py:51
-msgid "Successfully moved"
-msgstr "Déplacement réussi"
-
-#: .\templates\admin\cms_change_list.html.py:76
-#, python-format
-msgid "Recover deleted %(name)s"
-msgstr "Récupérer %(name)s effacé"
-
-#: .\templates\admin\cms_change_list.html.py:79
-#: .\templates\admin\page_change_list.html.py:46
-#, python-format
-msgid "Add %(name)s"
-msgstr "Ajouter %(name)s"
-
-#: .\templates\admin\cms_change_list.html.py:91
-msgid "Pages on:"
-msgstr "Pages sur:"
-
-#: .\templates\admin\cms_change_list.html.py:108
-msgid "on"
-msgstr "on"
-
-#: .\templates\admin\cms_change_list.html.py:108
-msgid "off"
-msgstr "off"
-
-#: .\templates\admin\cms_change_list.html.py:110
-#: .\templates\admin\page_change_list.html.py:65
-msgid "Filter"
-msgstr "Filtre"
-
-#: .\templates\admin\index.html.py:18 .\templates\admin\page_index.html.py:18
-#, python-format
-msgid "Models available in the %(name)s application."
-msgstr "Le modèle disponible dans l'application %(name)s."
-
-#: .\templates\admin\index.html.py:19
-#: .\templates\admin\page_app_index.html.py:10
-#: .\templates\admin\page_index.html.py:19
-#, python-format
-msgid "%(name)s"
-msgstr "%(name)s"
-
-#: .\templates\admin\index.html.py:29
-#: .\templates\admin\page_change_form.html.py:20
-#: .\templates\admin\page_index.html.py:29
-msgid "Add"
-msgstr "Ajouter"
-
-#: .\templates\admin\index.html.py:35 .\templates\admin\page_index.html.py:35
-msgid "Change"
-msgstr "modifié par"
-
-#: .\templates\admin\index.html.py:64 .\templates\admin\page_index.html.py:45
-msgid "You don't have permission to edit anything."
-msgstr "Vous n'aver pas l'autorisation d'éditer quoi que ce soit."
-
-#: .\templates\admin\index.html.py:72 .\templates\admin\page_index.html.py:53
-msgid "Recent Actions"
-msgstr "Actions récentes"
-
-#: .\templates\admin\index.html.py:73 .\templates\admin\page_index.html.py:54
-msgid "My Actions"
-msgstr "Mes actions"
-
-#: .\templates\admin\index.html.py:77 .\templates\admin\page_index.html.py:58
-msgid "None available"
-msgstr "Aucune disponible"
-
-#: .\templates\admin\index.html.py:91 .\templates\admin\page_index.html.py:72
-msgid "Unknown content"
-msgstr "Contenu inconnu"
-
-#: .\templates\admin\page_base.html.py:20
-#: .\templates\admin\page_index.html.py:11
-msgid "Pages"
-msgstr "Pages"
-
-#: .\templates\admin\page_base_site.html.py:7
-msgid "Django administration"
-msgstr "Administration de Django"
-
-#: .\templates\admin\page_login.html.py:8
-msgid "Connexion"
-msgstr "Connexion"
-
-#: .\templates\admin\page_login.html.py:20
-msgid "Username:"
-msgstr "Nom de utilisateur :"
-
-#: .\templates\admin\page_login.html.py:24
-msgid "Password:"
-msgstr "Mot de passe :"
-
-#: .\templates\admin\page_login.html.py:29
-#: .\user\templates\registration\login.html.py:39
-msgid "Create an account"
-msgstr "Créer un compte"
-
-#: .\templates\admin\page_login.html.py:30
-#: .\user\templates\registration\login.html.py:40
-msgid "Forget password?"
-msgstr "Oubliez le mot de passe?"
-
-#: .\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\registration\password_reset_complete.html.py:14
-msgid "Log in"
-msgstr "Connexion"
-
-#: .\templates\cms\admin\cms\page\change_form.html.py:11
-msgid "Documentation"
-msgstr "Documentation"
-
-#: .\templates\cms\admin\cms\page\change_form.html.py:11
-msgid "Change password"
-msgstr "Modifier le mot de passe"
-
-#: .\templates\cms\admin\cms\page\change_form.html.py:11
-#: .\templates\ldt\ldt_base.html.py:92
-#: .\user\templates\ldt\user\login_form.html.py:34
-msgid "Log out"
-msgstr "Déconnexion"
-
-#: .\templates\cms\admin\cms\page\change_form.html.py:42
-msgid "Ordering"
-msgstr "Ordre"
-
-#: .\templates\cms\admin\cms\page\change_form.html.py:45
-msgid "Order:"
-msgstr "Ordre :"
-
-#: .\templates\ldt\ldt_base.html.py:85
-msgid "header_title"
-msgstr "Plateforme&nbsp;Ldt"
-
-#: .\templates\ldt\ldt_base.html.py:89
-msgid "Link to admin"
-msgstr "Administration"
-
-#: .\templates\ldt\ldt_base.html.py:89
-msgid "Staff"
-msgstr "admin"
-
-#: .\templates\ldt\ldt_base.html.py:92
-#: .\user\templates\ldt\user\change_profile.html.py:85
-msgid "Profile change"
-msgstr "Modification du profil"
-
-#: .\templates\ldt\ldt_base.html.py:111 .\templates\ldt\ldt_base.html.py:112
-msgid "home"
-msgstr "accueil"
-
-#: .\templates\ldt\ldt_base.html.py:114
-msgid "contents"
-msgstr "Liste des contenus"
-
-#: .\templates\ldt\ldt_base.html.py:115
-msgid "indexation projects"
-msgstr "Projets d'indexation"
-
-#: .\templates\ldt\ldt_base.html.py:116
-msgid "accounts"
-msgstr "Comptes"
-
-#: .\templates\ldt\ldt_base.html.py:117
-#: .\user\templates\ldt\user\login_form.html.py:32
-#: .\user\templates\registration\password_change_done.html.py:7
-#: .\user\templates\registration\password_change_form.html.py:13
-msgid "Profiles"
-msgstr "Mon profil"
-
-#: .\templates\ldt\ldt_base.html.py:145
-msgid "Version number"
-msgstr "Numéro de version"
-
-#: .\templates\ldt\ldt_base.html.py:145
-#, 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:13
-msgid "page_title"
-msgstr "Plateforme Ldt"
-
-#: .\text\models.py:17
-msgid "annotation.external_id"
-msgstr "id externe"
-
-#: .\text\models.py:18
-msgid "annotation.uri"
-msgstr "uri"
-
-#: .\text\models.py:19
-msgid "annotation.tags"
-msgstr "tags"
-
-#: .\text\models.py:20
-msgid "annotation.title"
-msgstr "titre"
-
-#: .\text\models.py:21
-msgid "annotation.description"
-msgstr "Description"
-
-#: .\text\models.py:22
-msgid "annotation.text"
-msgstr "texte d'annotation"
-
-#: .\text\models.py:23
-msgid "annotation.color"
-msgstr "couleur d'annotation"
-
-#: .\text\models.py:24
-msgid "creator.title"
-msgstr "titre"
-
-#: .\text\models.py:25
-msgid "contributor.title"
-msgstr "titre"
-
-#: .\text\models.py:26
-msgid "annotation.creation_date"
-msgstr "date de création"
-
-#: .\text\models.py:27
-msgid "annotation.update_date"
-msgstr "Date de maj"
-
-#: .\user\admin.py:13
-msgid "User details"
-msgstr "Détail utilisateur"
-
-#: .\user\admin.py:14
-msgid "Groups"
-msgstr "Groupes"
-
-#: .\user\admin.py:15
-msgid "Permissions"
-msgstr "Permissions"
-
-#: .\user\admin.py:25 .\user\templates\ldt\user\change_profile.html.py:95
-#: .\user\templates\ldt\user\login_form.html.py:61
-msgid "Password"
-msgstr "Mot de passe"
-
-#: .\user\forms.py:27 .\user\templates\ldt\user\change_password.html.py:40
-#: .\user\templates\ldt\user\change_profile.html.py:108
-msgid "New password"
-msgstr "Nouveau mot de passe"
-
-#: .\user\forms.py:29 .\user\templates\ldt\user\change_password.html.py:50
-#: .\user\templates\ldt\user\change_profile.html.py:121
-msgid "New password confirmation"
-msgstr "Confirmation du nouveau mot de passe"
-
-#: .\user\forms.py:58 .\user\forms.py:59
-msgid "E-mail"
-msgstr "E-mail"
-
-#: .\user\forms.py:70
-msgid "The two emails didn't match."
-msgstr "les deux emails ne correspondent pas"
-
-#: .\user\forms.py:81 .\user\templates\ldt\user\change_profile.html.py:44
-msgid "First name"
-msgstr "Prénom"
-
-#: .\user\forms.py:82
-msgid "Last name"
-msgstr "Nom :"
-
-#: .\user\forms.py:109 .\user\templates\ldt\user\change_profile.html.py:73
-msgid "Language"
-msgstr "Langue"
-
-#: .\user\views.py:29
-msgid "Your profile has been updated."
-msgstr "Votre profil a été modifié"
-
-#: .\user\views.py:53
-msgid "Your password has been updated."
-msgstr "Votre mot de passe a été changeé."
-
-#: .\user\views.py:73 .\user\templates\registration\login.html.py:24
-msgid "Sorry, that's not a valid username or password."
-msgstr "Saisissez un nom d'utilisateur et un mot de passe valide."
-
-#: .\user\templates\ldt\user\change_password.html.py:31
-msgid "Old password"
-msgstr "Ancien mot de passe"
-
-#: .\user\templates\ldt\user\change_password.html.py:44
-msgid "passwords don't match"
-msgstr "Changement de mot de passe"
-
-#: .\user\templates\ldt\user\change_password.html.py:57
-#: .\user\templates\ldt\user\change_profile.html.py:134
-#: .\user\templates\registration\password_change_form.html.py:14
-#: .\user\templates\registration\password_change_form.html.py:17
-msgid "Password change"
-msgstr "Modification du mot de passe"
-
-#: .\user\templates\ldt\user\change_password.html.py:61
-msgid "Your new password has been saved."
-msgstr "Votre mot de passe a été changeé."
-
-#: .\user\templates\ldt\user\change_profile.html.py:33
-msgid "Username"
-msgstr "Nom d'utilisateur :"
-
-#: .\user\templates\ldt\user\change_profile.html.py:52
-#, fuzzy
-msgid "Name"
-msgstr "Nom"
-
-#: .\user\templates\ldt\user\change_profile.html.py:60
-#, fuzzy
-msgid "Email"
-msgstr "E-mail"
-
-#: .\user\templates\ldt\user\login_form.html.py:50
-msgid "create account"
-msgstr "Créer un compte"
-
-#: .\user\templates\ldt\user\login_form.html.py:54
-msgid "Pseudo"
-msgstr "Pseudo"
-
-#: .\user\templates\ldt\user\login_form.html.py:57
-#: .\user\templates\ldt\user\login_form.html.py:64
-msgid "this field is compulsory"
-msgstr "Ce champs est obligatoire"
-
-#: .\user\templates\ldt\user\login_form.html.py:68
-msgid "reset password"
-msgstr "Réinitialiser le mot de passe"
-
-#: .\user\templates\ldt\user\login_form.html.py:71
-msgid "Connection"
-msgstr "Connexion"
-
-#: .\user\templates\registration\activate.html.py:6
-#: .\user\templates\registration\activate.html.py:9
-msgid "Activate account"
-msgstr "Activer le compte"
-
-#: .\user\templates\registration\activate.html.py:12
-msgid "You have activated your account"
-msgstr "Vous avez bien activé votre compte."
-
-#: .\user\templates\registration\activate.html.py:13
-msgid "Go back to login page"
-msgstr "Retourner à la page de connexion"
-
-#: .\user\templates\registration\activation_complete.html.py:4
-#: .\user\templates\registration\registration_complete.html.py:8
-msgid "Sign up successfully"
-msgstr "Création de compte avec succès"
-
-#: .\user\templates\registration\activation_complete.html.py:6
-msgid "activation completed"
-msgstr "Activation terminée"
-
-#: .\user\templates\registration\logged_out.html.py:8
-msgid "Thanks for spending some quality time with the Web site today."
-msgstr "Merci de votre visite."
-
-#: .\user\templates\registration\logged_out.html.py:10
-msgid "Log in again"
-msgstr "Se reconnecter"
-
-#: .\user\templates\registration\login.html.py:46
-msgid "login"
-msgstr "Connexion"
-
-#: .\user\templates\registration\password_change_done.html.py:3
-#: .\user\templates\registration\password_change_done.html.py:11
-msgid "password change successful"
-msgstr "Changement de mot de passe réussi"
-
-#: .\user\templates\registration\password_change_done.html.py:8
-msgid "password change"
-msgstr "Changement de mot de passe"
-
-#: .\user\templates\registration\password_change_done.html.py:14
-msgid "Your password has been changed."
-msgstr "Votre mot de passe a été changeé."
-
-#: .\user\templates\registration\password_change_done.html.py:15
-msgid "Go back to profiles"
-msgstr "Retourner à la page de mon profil"
-
-#: .\user\templates\registration\password_change_form.html.py:20
+"This page must be moderated at level %(moderation_level)s, post a message "
+"for moderator."
+msgstr "Le niveau nécessaire pour modérer cette page est le niveau %"
+"(moderation_level)s, laisser un message pour le modérateur"
+
+#: .\templates\admin\cms_change_form.html.py:144
+msgid "Request approvemet"
+msgstr "Demander l'approbation"
+
+#: .\templates\admin\cms_change_form.html.py:234
+#: .\user\templates\registration\registration_form.html.py:16
+msgid "Save"
+msgstr "Enregistrer"
+
+#: .\templates\admin\cms_change_form.html.py:235
+msgid "Save and continue editing"
+msgstr "Sauver et continuer l'édition"
+
+#: .\templates\admin\cms_change_list.html.py:51
+msgid "Successfully moved"
+msgstr "Déplacement réussi"
+
+#: .\templates\admin\cms_change_list.html.py:76
+#, python-format
+msgid "Recover deleted %(name)s"
+msgstr "Récupérer %(name)s effacé"
+
+#: .\templates\admin\cms_change_list.html.py:79
+#: .\templates\admin\page_change_list.html.py:46
+#, python-format
+msgid "Add %(name)s"
+msgstr "Ajouter %(name)s"
+
+#: .\templates\admin\cms_change_list.html.py:91
+msgid "Pages on:"
+msgstr "Pages sur:"
+
+#: .\templates\admin\cms_change_list.html.py:108
+msgid "on"
+msgstr "on"
+
+#: .\templates\admin\cms_change_list.html.py:108
+msgid "off"
+msgstr "off"
+
+#: .\templates\admin\cms_change_list.html.py:110
+#: .\templates\admin\page_change_list.html.py:65
+msgid "Filter"
+msgstr "Filtre"
+
+#: .\templates\admin\index.html.py:18
+#: .\templates\admin\page_index.html.py:18
+#, python-format
+msgid "Models available in the %(name)s application."
+msgstr "Le modèle disponible dans l'application %(name)s."
+
+#: .\templates\admin\index.html.py:19
+#: .\templates\admin\page_app_index.html.py:10
+#: .\templates\admin\page_index.html.py:19
+#, python-format
+msgid "%(name)s"
+msgstr "%(name)s"
+
+#: .\templates\admin\index.html.py:29
+#: .\templates\admin\page_change_form.html.py:20
+#: .\templates\admin\page_index.html.py:29
+msgid "Add"
+msgstr "Ajouter"
+
+#: .\templates\admin\index.html.py:35
+#: .\templates\admin\page_index.html.py:35
+msgid "Change"
+msgstr "modifié par"
+
+#: .\templates\admin\index.html.py:64
+#: .\templates\admin\page_index.html.py:45
+msgid "You don't have permission to edit anything."
+msgstr "Vous n'aver pas l'autorisation d'éditer quoi que ce soit."
+
+#: .\templates\admin\index.html.py:72
+#: .\templates\admin\page_index.html.py:53
+msgid "Recent Actions"
+msgstr "Actions récentes"
+
+#: .\templates\admin\index.html.py:73
+#: .\templates\admin\page_index.html.py:54
+msgid "My Actions"
+msgstr "Mes actions"
+
+#: .\templates\admin\index.html.py:77
+#: .\templates\admin\page_index.html.py:58
+msgid "None available"
+msgstr "Aucune disponible"
+
+#: .\templates\admin\index.html.py:91
+#: .\templates\admin\page_index.html.py:72
+msgid "Unknown content"
+msgstr "Contenu inconnu"
+
+#: .\templates\admin\page_base.html.py:20
+#: .\templates\admin\page_index.html.py:11
+msgid "Pages"
+msgstr "Pages"
+
+#: .\templates\admin\page_base_site.html.py:7
+msgid "Django administration"
+msgstr "Administration de Django"
+
+#: .\templates\admin\page_login.html.py:8
+msgid "Connexion"
+msgstr "Connexion"
+
+#: .\templates\admin\page_login.html.py:20
+msgid "Username:"
+msgstr "Nom de utilisateur :"
+
+#: .\templates\admin\page_login.html.py:24
+msgid "Password:"
+msgstr "Mot de passe :"
+
+#: .\templates\admin\page_login.html.py:29
+#: .\user\templates\registration\login.html.py:39
+msgid "Create an account"
+msgstr "Créer un compte"
+
+#: .\templates\admin\page_login.html.py:30
+#: .\user\templates\registration\login.html.py:40
+msgid "Forget password?"
+msgstr "Oubliez le mot de passe?"
+
+#: .\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\registration\password_reset_complete.html.py:14
+msgid "Log in"
+msgstr "Connexion"
+
+#: .\templates\cms\admin\cms\page\change_form.html.py:11
+msgid "Documentation"
+msgstr "Documentation"
+
+#: .\templates\cms\admin\cms\page\change_form.html.py:11
+msgid "Change password"
+msgstr "Modifier le mot de passe"
+
+#: .\templates\cms\admin\cms\page\change_form.html.py:11
+#: .\templates\ldt\ldt_base.html.py:92
+#: .\user\templates\ldt\user\login_form.html.py:34
+msgid "Log out"
+msgstr "Déconnexion"
+
+#: .\templates\cms\admin\cms\page\change_form.html.py:42
+msgid "Ordering"
+msgstr "Ordre"
+
+#: .\templates\cms\admin\cms\page\change_form.html.py:45
+msgid "Order:"
+msgstr "Ordre :"
+
+#: .\templates\ldt\ldt_base.html.py:85
+msgid "header_title"
+msgstr "Plateforme&nbsp;Ldt"
+
+#: .\templates\ldt\ldt_base.html.py:89
+msgid "Link to admin"
+msgstr "Administration"
+
+#: .\templates\ldt\ldt_base.html.py:89
+msgid "Staff"
+msgstr "admin"
+
+#: .\templates\ldt\ldt_base.html.py:92
+#: .\user\templates\ldt\user\change_profile.html.py:85
+msgid "Profile change"
+msgstr "Modification du profil"
+
+#: .\templates\ldt\ldt_base.html.py:111
+#: .\templates\ldt\ldt_base.html.py:112
+msgid "home"
+msgstr "accueil"
+
+#: .\templates\ldt\ldt_base.html.py:114
+msgid "contents"
+msgstr "Liste des contenus"
+
+#: .\templates\ldt\ldt_base.html.py:115
+msgid "indexation projects"
+msgstr "Projets d'indexation"
+
+#: .\templates\ldt\ldt_base.html.py:116
+msgid "accounts"
+msgstr "Comptes"
+
+#: .\templates\ldt\ldt_base.html.py:117
+#: .\user\templates\ldt\user\login_form.html.py:32
+#: .\user\templates\registration\password_change_done.html.py:7
+#: .\user\templates\registration\password_change_form.html.py:13
+msgid "Profiles"
+msgstr "Mon profil"
+
+#: .\templates\ldt\ldt_base.html.py:145
+msgid "Version number"
+msgstr "Numéro de version"
+
+#: .\templates\ldt\ldt_base.html.py:145
+#, 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:13
+msgid "page_title"
+msgstr "Plateforme Ldt"
+
+#: .\text\models.py:17
+msgid "annotation.external_id"
+msgstr "id externe"
+
+#: .\text\models.py:18
+msgid "annotation.uri"
+msgstr "uri"
+
+#: .\text\models.py:19
+msgid "annotation.tags"
+msgstr "tags"
+
+#: .\text\models.py:20
+msgid "annotation.title"
+msgstr "titre"
+
+#: .\text\models.py:21
+msgid "annotation.description"
+msgstr "Description"
+
+#: .\text\models.py:22
+msgid "annotation.text"
+msgstr "texte d'annotation"
+
+#: .\text\models.py:23
+msgid "annotation.color"
+msgstr "couleur d'annotation"
+
+#: .\text\models.py:24
+msgid "creator.title"
+msgstr "titre"
+
+#: .\text\models.py:25
+msgid "contributor.title"
+msgstr "titre"
+
+#: .\text\models.py:26
+msgid "annotation.creation_date"
+msgstr "date de création"
+
+#: .\text\models.py:27
+msgid "annotation.update_date"
+msgstr "Date de maj"
+
+#: .\user\admin.py:24
+msgid "User details"
+msgstr "Détail utilisateur"
+
+#: .\user\admin.py:25
+msgid "Groups"
+msgstr "Groupes"
+
+#: .\user\admin.py:37
+#: .\user\templates\ldt\user\change_profile.html.py:95
+#: .\user\templates\ldt\user\login_form.html.py:61
+msgid "Password"
+msgstr "Mot de passe"
+
+#: .\user\forms.py:27
+#: .\user\templates\ldt\user\change_password.html.py:40
+#: .\user\templates\ldt\user\change_profile.html.py:108
+msgid "New password"
+msgstr "Nouveau mot de passe"
+
+#: .\user\forms.py:29
+#: .\user\templates\ldt\user\change_password.html.py:50
+#: .\user\templates\ldt\user\change_profile.html.py:121
+msgid "New password confirmation"
+msgstr "Confirmation du nouveau mot de passe"
+
+#: .\user\forms.py:58
+#: .\user\forms.py:59
+msgid "E-mail"
+msgstr "E-mail"
+
+#: .\user\forms.py:70
+msgid "The two emails didn't match."
+msgstr "les deux emails ne correspondent pas"
+
+#: .\user\forms.py:81
+#: .\user\templates\ldt\user\change_profile.html.py:44
+msgid "First name"
+msgstr "Prénom"
+
+#: .\user\forms.py:82
+msgid "Last name"
+msgstr "Nom :"
+
+#: .\user\forms.py:109
+#: .\user\templates\ldt\user\change_profile.html.py:73
+msgid "Language"
+msgstr "Langue"
+
+#: .\user\models.py:38
+msgid "Designates whether the user can create and leave groups."
+msgstr "Précise si cet utilisateur peut créer et quitter des groupes."
+
+#: .\user\views.py:29
+msgid "Your profile has been updated."
+msgstr "Votre profil a été modifié"
+
+#: .\user\views.py:53
+msgid "Your password has been updated."
+msgstr "Votre mot de passe a été changeé."
+
+#: .\user\views.py:73
+#: .\user\templates\registration\login.html.py:24
+msgid "Sorry, that's not a valid username or password."
+msgstr "Saisissez un nom d'utilisateur et un mot de passe valide."
+
+#: .\user\templates\ldt\user\change_password.html.py:31
+msgid "Old password"
+msgstr "Ancien mot de passe"
+
+#: .\user\templates\ldt\user\change_password.html.py:44
+msgid "passwords don't match"
+msgstr "Changement de mot de passe"
+
+#: .\user\templates\ldt\user\change_password.html.py:57
+#: .\user\templates\ldt\user\change_profile.html.py:134
+#: .\user\templates\registration\password_change_form.html.py:14
+#: .\user\templates\registration\password_change_form.html.py:17
+msgid "Password change"
+msgstr "Modification du mot de passe"
+
+#: .\user\templates\ldt\user\change_password.html.py:61
+msgid "Your new password has been saved."
+msgstr "Votre mot de passe a été changeé."
+
+#: .\user\templates\ldt\user\change_profile.html.py:33
+msgid "Username"
+msgstr "Nom d'utilisateur :"
+
+#: .\user\templates\ldt\user\change_profile.html.py:60
+#, fuzzy
+msgid "Email"
+msgstr "E-mail"
+
+#: .\user\templates\ldt\user\login_form.html.py:50
+msgid "create account"
+msgstr "Créer un compte"
+
+#: .\user\templates\ldt\user\login_form.html.py:54
+msgid "Pseudo"
+msgstr "Pseudo"
+
+#: .\user\templates\ldt\user\login_form.html.py:57
+#: .\user\templates\ldt\user\login_form.html.py:64
+msgid "this field is compulsory"
+msgstr "Ce champs est obligatoire"
+
+#: .\user\templates\ldt\user\login_form.html.py:68
+msgid "reset password"
+msgstr "Réinitialiser le mot de passe"
+
+#: .\user\templates\ldt\user\login_form.html.py:71
+msgid "Connection"
+msgstr "Connexion"
+
+#: .\user\templates\registration\activate.html.py:6
+#: .\user\templates\registration\activate.html.py:9
+msgid "Activate account"
+msgstr "Activer le compte"
+
+#: .\user\templates\registration\activate.html.py:12
+msgid "You have activated your account"
+msgstr "Vous avez bien activé votre compte."
+
+#: .\user\templates\registration\activate.html.py:13
+msgid "Go back to login page"
+msgstr "Retourner à la page de connexion"
+
+#: .\user\templates\registration\activation_complete.html.py:4
+#: .\user\templates\registration\registration_complete.html.py:8
+msgid "Sign up successfully"
+msgstr "Création de compte avec succès"
+
+#: .\user\templates\registration\activation_complete.html.py:6
+msgid "activation completed"
+msgstr "Activation terminée"
+
+#: .\user\templates\registration\logged_out.html.py:8
+msgid "Thanks for spending some quality time with the Web site today."
+msgstr "Merci de votre visite."
+
+#: .\user\templates\registration\logged_out.html.py:10
+msgid "Log in again"
+msgstr "Se reconnecter"
+
+#: .\user\templates\registration\login.html.py:46
+msgid "login"
+msgstr "Connexion"
+
+#: .\user\templates\registration\password_change_done.html.py:3
+#: .\user\templates\registration\password_change_done.html.py:11
+msgid "password change successful"
+msgstr "Changement de mot de passe réussi"
+
+#: .\user\templates\registration\password_change_done.html.py:8
+msgid "password change"
+msgstr "Changement de mot de passe"
+
+#: .\user\templates\registration\password_change_done.html.py:14
+msgid "Your password has been changed."
+msgstr "Votre mot de passe a été changeé."
+
+#: .\user\templates\registration\password_change_done.html.py:15
+msgid "Go back to profiles"
+msgstr "Retourner à la page de mon profil"
+
+#: .\user\templates\registration\password_change_form.html.py:20
 msgid ""
-"Please enter your old password, for security's sake, and then enter your new "
-"password twice so we can verify you typed it in correctly."
-msgstr ""
-"Par sécurité, veuillez enter votre ancien mot de passe puis le nouveau a "
-"deux reprise afin de savoir si vous l'avez taper correctement "
-
-#: .\user\templates\registration\password_change_form.html.py:26
-msgid "Old password:"
-msgstr "Ancien mot de passe :"
-
-#: .\user\templates\registration\password_change_form.html.py:32
-#: .\user\templates\registration\password_reset_confirm.html.py:19
-msgid "New password:"
-msgstr "Nouveau mot de passe :"
-
-#: .\user\templates\registration\password_change_form.html.py:38
-#: .\user\templates\registration\password_reset_confirm.html.py:21
-msgid "Confirm password:"
-msgstr "Confirmer le mot de passe :"
-
-#: .\user\templates\registration\password_change_form.html.py:44
-#: .\user\templates\registration\password_reset_confirm.html.py:22
-msgid "Change my password"
-msgstr "Modifier mon mot de passe"
-
-#: .\user\templates\registration\password_reset_complete.html.py:6
-#: .\user\templates\registration\password_reset_confirm.html.py:6
-#: .\user\templates\registration\password_reset_confirm.html.py:9
-#: .\user\templates\registration\password_reset_done.html.py:6
-#: .\user\templates\registration\password_reset_form.html.py:13
-#: .\user\templates\registration\password_reset_form.html.py:15
-#: .\user\templates\registration\password_reset_form.html.py:18
-msgid "Password reset"
-msgstr "réinitialiser e mot de passe"
-
-#: .\user\templates\registration\password_reset_complete.html.py:9
-msgid "Password reset complete"
-msgstr "Réinitialisation du mot de passe terminée"
-
-#: .\user\templates\registration\password_reset_complete.html.py:12
-msgid "Your password has been set.  You may go ahead and log in now."
-msgstr "Votre mot de passe a été fixé. vous pouvez vous connecter maintenant."
-
-#: .\user\templates\registration\password_reset_confirm.html.py:15
+"Please enter your old password, for security's sake, and then enter your new "
+"password twice so we can verify you typed it in correctly."
+msgstr "Par sécurité, veuillez enter votre ancien mot de passe puis le nouveau a "
+"deux reprise afin de savoir si vous l'avez taper correctement "
+
+#: .\user\templates\registration\password_change_form.html.py:26
+msgid "Old password:"
+msgstr "Ancien mot de passe :"
+
+#: .\user\templates\registration\password_change_form.html.py:32
+#: .\user\templates\registration\password_reset_confirm.html.py:19
+msgid "New password:"
+msgstr "Nouveau mot de passe :"
+
+#: .\user\templates\registration\password_change_form.html.py:38
+#: .\user\templates\registration\password_reset_confirm.html.py:21
+msgid "Confirm password:"
+msgstr "Confirmer le mot de passe :"
+
+#: .\user\templates\registration\password_change_form.html.py:44
+#: .\user\templates\registration\password_reset_confirm.html.py:22
+msgid "Change my password"
+msgstr "Modifier mon mot de passe"
+
+#: .\user\templates\registration\password_reset_complete.html.py:6
+#: .\user\templates\registration\password_reset_confirm.html.py:6
+#: .\user\templates\registration\password_reset_confirm.html.py:9
+#: .\user\templates\registration\password_reset_done.html.py:6
+#: .\user\templates\registration\password_reset_form.html.py:13
+#: .\user\templates\registration\password_reset_form.html.py:15
+#: .\user\templates\registration\password_reset_form.html.py:18
+msgid "Password reset"
+msgstr "réinitialiser e mot de passe"
+
+#: .\user\templates\registration\password_reset_complete.html.py:9
+msgid "Password reset complete"
+msgstr "Réinitialisation du mot de passe terminée"
+
+#: .\user\templates\registration\password_reset_complete.html.py:12
+msgid "Your password has been set.  You may go ahead and log in now."
+msgstr "Votre mot de passe a été fixé. vous pouvez vous connecter maintenant."
+
+#: .\user\templates\registration\password_reset_confirm.html.py:15
 msgid ""
-"Please enter your new password twice so we can verify you typed it in "
-"correctly."
-msgstr ""
-"veuillez enter votre nouveau mot de pass deux fois afin de le vérifier."
-
-#: .\user\templates\registration\password_reset_confirm.html.py:27
-msgid "Password reset unsuccessful"
-msgstr "Reinitialisation du mot de pass a échoué"
-
-#: .\user\templates\registration\password_reset_confirm.html.py:29
+"Please enter your new password twice so we can verify you typed it in "
+"correctly."
+msgstr "veuillez enter votre nouveau mot de pass deux fois afin de le vérifier."
+
+#: .\user\templates\registration\password_reset_confirm.html.py:27
+msgid "Password reset unsuccessful"
+msgstr "Reinitialisation du mot de pass a échoué"
+
+#: .\user\templates\registration\password_reset_confirm.html.py:29
 msgid ""
-"The password reset link was invalid, possibly because it has already been "
-"used.  Please request a new password reset."
-msgstr ""
-"Le lien de réinitialisation du mot de passe n'est pas valide, certainement "
-"car il a déjà été utilisé. veuiller demander une nouvelle réinitialisation."
-
-#: .\user\templates\registration\password_reset_done.html.py:8
-msgid "Password reset successful"
-msgstr "Réinitialisation du mot de passe réussie"
-
-#: .\user\templates\registration\password_reset_done.html.py:12
+"The password reset link was invalid, possibly because it has already been "
+"used.  Please request a new password reset."
+msgstr "Le lien de réinitialisation du mot de passe n'est pas valide, certainement "
+"car il a déjà été utilisé. veuiller demander une nouvelle réinitialisation."
+
+#: .\user\templates\registration\password_reset_done.html.py:8
+msgid "Password reset successful"
+msgstr "Réinitialisation du mot de passe réussie"
+
+#: .\user\templates\registration\password_reset_done.html.py:12
 msgid ""
-"We've e-mailed you instructions for setting your password to the e-mail "
-"address you submitted. You should be receiving it shortly."
-msgstr ""
-"Nous vous avons envoyer les instructions de reinitialisation de votre mot de "
-"passe à l'adresse email que vous nous avez fournie. vous devriez les "
-"recevoir bientôt."
-
-#: .\user\templates\registration\password_reset_email.html.py:2
-msgid "You're receiving this e-mail because you requested a password reset"
-msgstr ""
-"Vous recevez ce mail car vous avez damender la réinitialisation du mot de "
-"passe"
-
-#: .\user\templates\registration\password_reset_email.html.py:3
-#, python-format
-msgid "for your user account at %(site_name)s"
-msgstr "Pour votre compte sur le site %(site_name)s"
-
-#: .\user\templates\registration\password_reset_email.html.py:5
-msgid "Please go to the following page and choose a new password:"
-msgstr ""
-"veuillez aller à la page suivante et choisissez un nouveau mot de passe :"
-
-#: .\user\templates\registration\password_reset_email.html.py:9
-msgid "Your username, in case you've forgotten:"
-msgstr "Pour rappel votre nom d'autilisateur :"
-
-#: .\user\templates\registration\password_reset_email.html.py:11
-msgid "Thanks for using our site!"
-msgstr "Merci de votre visite."
-
-#: .\user\templates\registration\password_reset_email.html.py:13
-#, python-format
-msgid "The %(site_name)s team"
-msgstr "L'équipe du site %(site_name)s"
-
-#: .\user\templates\registration\password_reset_form.html.py:22
+"We've e-mailed you instructions for setting your password to the e-mail "
+"address you submitted. You should be receiving it shortly."
+msgstr "Nous vous avons envoyer les instructions de reinitialisation de votre mot de "
+"passe à l'adresse email que vous nous avez fournie. vous devriez les "
+"recevoir bientôt."
+
+#: .\user\templates\registration\password_reset_email.html.py:2
+msgid "You're receiving this e-mail because you requested a password reset"
+msgstr "Vous recevez ce mail car vous avez damender la réinitialisation du mot de "
+"passe"
+
+#: .\user\templates\registration\password_reset_email.html.py:3
+#, python-format
+msgid "for your user account at %(site_name)s"
+msgstr "Pour votre compte sur le site %(site_name)s"
+
+#: .\user\templates\registration\password_reset_email.html.py:5
+msgid "Please go to the following page and choose a new password:"
+msgstr "veuillez aller à la page suivante et choisissez un nouveau mot de passe :"
+
+#: .\user\templates\registration\password_reset_email.html.py:9
+msgid "Your username, in case you've forgotten:"
+msgstr "Pour rappel votre nom d'autilisateur :"
+
+#: .\user\templates\registration\password_reset_email.html.py:11
+msgid "Thanks for using our site!"
+msgstr "Merci de votre visite."
+
+#: .\user\templates\registration\password_reset_email.html.py:13
+#, python-format
+msgid "The %(site_name)s team"
+msgstr "L'équipe du site %(site_name)s"
+
+#: .\user\templates\registration\password_reset_form.html.py:22
 msgid ""
-"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
-"instructions for setting a new one."
-msgstr ""
-"Mot de passe oublié ? Entrez votre adresse email ci-dessous pour recevoir "
-"les instructions pour en entrer un nouveau."
-
-#: .\user\templates\registration\password_reset_form.html.py:27
-#, fuzzy
-msgid "Adresse émail"
-msgstr "Adresse email"
-
-#: .\user\templates\registration\password_reset_form.html.py:32
-msgid "Reset my password"
-msgstr "Reinitialiser mon mot de passe"
-
-#: .\user\templates\registration\registration_active.html.py:5
-#: .\user\templates\registration\registration_active.html.py:7
-msgid "Activate the account"
-msgstr "Activer le compte"
-
-#: .\user\templates\registration\registration_active.html.py:9
-#, fuzzy
+"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
+"instructions for setting a new one."
+msgstr "Mot de passe oublié ? Entrez votre adresse email ci-dessous pour recevoir "
+"les instructions pour en entrer un nouveau."
+
+#: .\user\templates\registration\password_reset_form.html.py:27
+#, fuzzy
+msgid "Adresse émail"
+msgstr "Adresse email"
+
+#: .\user\templates\registration\password_reset_form.html.py:32
+msgid "Reset my password"
+msgstr "Reinitialiser mon mot de passe"
+
+#: .\user\templates\registration\registration_active.html.py:5
+#: .\user\templates\registration\registration_active.html.py:7
+msgid "Activate the account"
+msgstr "Activer le compte"
+
+#: .\user\templates\registration\registration_active.html.py:9
+#, fuzzy
 msgid ""
-"Vous avez bien activé votre compte, vous pouvez accedez à votre espace "
-"personnel."
-msgstr ""
-"Vous avez bien activé votre compte, vous pouvez accedez à votre espace "
-"personnel."
-
-#: .\user\templates\registration\registration_active.html.py:10
-#, fuzzy
-msgid "retourner à la page de connexion"
-msgstr "retourner à la page de connexion"
-
-#: .\user\templates\registration\registration_complete.html.py:6
-#: .\user\templates\registration\registration_form.html.py:11
-msgid "Sign up"
-msgstr "Création d'un compte"
-
-#: .\user\templates\registration\registration_complete.html.py:10
+"Vous avez bien activé votre compte, vous pouvez accedez à votre espace "
+"personnel."
+msgstr "Vous avez bien activé votre compte, vous pouvez accedez à votre espace "
+"personnel."
+
+#: .\user\templates\registration\registration_active.html.py:10
+#, fuzzy
+msgid "retourner à la page de connexion"
+msgstr "retourner à la page de connexion"
+
+#: .\user\templates\registration\registration_complete.html.py:6
+#: .\user\templates\registration\registration_form.html.py:11
+msgid "Sign up"
+msgstr "Création d'un compte"
+
+#: .\user\templates\registration\registration_complete.html.py:10
 msgid ""
-"We've e-mailed you instructions for activate your account to the e-mail "
-"address you submitted. You should be receiving it shortly."
-msgstr ""
-"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 "Django site admin"
-#~ msgstr "Administration de Django"
+"We've e-mailed you instructions for activate your account to the e-mail "
+"address you submitted. You should be receiving it shortly."
+msgstr "Nous vous avons envoyé par courriel les instructions pour activer le compte "
+"à l'adresse que vous avez indiquée. Vous devriez le recevoir rapidement."
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/security/manager.py	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,27 @@
+from django.db.models import Manager
+from guardian.shortcuts import get_objects_for_user
+from utils import get_current_user
+
+class SafeManager(Manager):
+    use_for_related_fields = True
+    
+    def __init__(self, user=None, check_perm=False):
+        super(SafeManager, self).__init__()
+        self.user = user
+        self.check_perm = check_perm
+
+    def get_query_set(self):
+        if not self.check_perm:
+            return super(SafeManager, self).get_query_set()   
+                       
+        if not self.user:
+            self.user = get_current_user()
+            
+        if not self.user:
+            raise AttributeError("No user is attached to the current thread.")
+        
+        perm_name = '%s.view_%s' % (self.model._meta.app_label, self.model.__name__.lower()) 
+        
+        user_objects = get_objects_for_user(self.user, perm_name, klass=self.model.objects) 
+            
+        return user_objects
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/security/middleware.py	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,23 @@
+from django.conf import settings
+from django.core.exceptions import MiddlewareNotUsed
+from ldt.security.utils import protect_models, unprotect_models, _thread_locals
+
+class SecurityMiddleware(object):
+    
+    def __init__(self):
+        if not hasattr(settings, 'USE_GROUP_PERMISSIONS') or not settings.USE_GROUP_PERMISSIONS:
+            raise MiddlewareNotUsed()
+
+    def process_request(self, request):
+        if not hasattr(_thread_locals, 'user'):
+            _thread_locals.user = request.user
+            protect_models()
+    
+    def process_response(self, request, response):
+        unprotect_models()
+        
+        if hasattr(_thread_locals, 'user'):
+            del _thread_locals.user
+                
+        return response
+    
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/security/models.py	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,9 @@
+from django.db import models
+from manager import SafeManager
+
+class SafeModel(models.Model):
+    objects = SafeManager()
+    safe_objects = SafeManager(check_perm=True)
+    
+    class Meta:
+        abstract = True
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/security/utils.py	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,115 @@
+from django.conf import settings
+from django.contrib.contenttypes.models import ContentType
+from django.contrib.auth.models import Group
+from guardian.core import ObjectPermissionChecker
+from guardian.shortcuts import assign, remove_perm
+
+try:
+    from threading import local
+except ImportError:
+    from django.utils._threading_local import local
+    
+_thread_locals = local()
+
+def get_current_user():
+    return getattr(_thread_locals, 'user', None)
+
+def protect_models():
+    user = get_current_user()
+    for cls in ToProtect.get_models():
+            protect_model(cls, user)
+    
+def unprotect_models():
+    for cls in ToProtect.get_models():
+            unprotect_model(cls)
+
+class ToProtect(object):
+    
+    @staticmethod
+    def get_models():
+        if hasattr(ToProtect, 'cls_list'):
+            return ToProtect.cls_list
+        
+        cls_list = []
+        for cls_name in settings.USE_GROUP_PERMISSIONS:
+            cls_type = ContentType.objects.get(model=cls_name.lower())
+            cls_list.append(cls_type.model_class())
+        ToProtect.cls_list = cls_list
+        
+        return cls_list
+
+def protect_model(cls, user):   
+    cls.safe_objects.user = user
+    
+    cls.old_save = cls.save
+    cls.old_delete = cls.delete
+    class_name = cls.__name__.lower()
+    cls.save = change_security(user, class_name)(cls.save)
+    cls.delete = change_security(user, class_name)(cls.delete)    
+    
+def unprotect_model(cls): 
+    if hasattr(cls, 'old_save'):
+        cls.save = cls.old_save 
+        cls.delete = cls.old_delete 
+        del cls.old_save    
+        del cls.old_delete
+        cls.safe_objects.user = None 
+        
+def change_security(user, cls_name):
+    def wrapper(func):
+        def wrapped(self, *args, **kwargs):                      
+                        
+            if self.pk and not user.has_perm('change_%s' % cls_name, self):
+                raise AttributeError('User %s is not allowed to change object %s' % (user, self))
+      
+            return func(self, *args, **kwargs)
+        return wrapped    
+    return wrapper
+
+def set_forbidden_stream(xml, user):
+    cls = ContentType.objects.get(model='content')
+    cls = cls.model_class()
+    
+    old_user = cls.safe_objects.user
+    obj_list = cls.safe_objects.all()
+    
+    for elem in xml.xpath('/iri/medias/media'):
+        if not obj_list.filter(iri_id=elem.get('id')):
+            elem.set('video', settings.FORBIDDEN_STREAM_URL)
+    
+    cls.safe_objects.user = old_user 
+    
+    return xml
+
+def add_change_attr(user, obj_list):
+    if len(obj_list) == 0:
+        return []
+    
+    model_name = obj_list[0].__class__.__name__.lower()
+    ctype = ContentType.objects.get(model=model_name)
+    cls = ctype.model_class()
+    
+    checker = ObjectPermissionChecker(user)
+    perm_name = "%s.change_%s" % (cls._meta.app_label, model_name)
+        
+    for obj in obj_list:
+        if checker.has_perm(perm_name, obj):
+            obj.change = True
+        else:
+            obj.change = False
+            
+    return obj_list
+        
+
+def assign_object_to_groups(object, permissions):
+    name = object.__class__.__name__.lower()
+    for elem in permissions:
+        group = Group.objects.get(id=elem['group'])
+        if elem['share']:
+            assign('view_%s' % name, group, object)
+            if elem['perms'] == 'write':
+                assign('change_%s' % name, group, object)
+        else:
+            remove_perm('view_%s' % name, group, object)
+            remove_perm('change_%s' % name, group, object) 
+            
\ No newline at end of file
--- a/src/ldt/ldt/settings.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/settings.py	Wed Nov 30 10:44:15 2011 +0100
@@ -31,6 +31,7 @@
     'piston',
     'social_auth',
     'south',
+    'guardian',
 )
 
 MIDDLEWARE_CLASSES = (
@@ -80,5 +81,8 @@
 AUTO_INDEX_AFTER_SAVE = getattr(settings, 'AUTO_INDEX_AFTER_SAVE', True)
 
 WEB_VERSION = getattr(settings, 'WEB_VERSION', '')
+ANONYOUS_USER_ID = -1
+USE_GROUP_PERMISSIONS = ['Project', 'Content'] 
+PUBLIC_GROUP_NAME = 'everyone'
 
 
--- a/src/ldt/ldt/static/ldt/css/ldtform.css	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/static/ldt/css/ldtform.css	Wed Nov 30 10:44:15 2011 +0100
@@ -8,7 +8,6 @@
 	padding: 10px;	
 }
 
-
 #add_content input, #add_content textarea, #add_content select,
 #add_contribution input, #add_contribution textarea, #add_contribution select
 {
@@ -20,6 +19,9 @@
 	width: auto;
 }
 
+#add_content input[type="checkbox"] {
+	width: 15px;
+}
 
 #add_content textarea {
 	height : 125px;
@@ -29,13 +31,17 @@
 	list-style: none;
 }
 
+#add_content td, #add_content th {
+	vertical-align: baseline;
+	border: none;
+}
 
 label {
 	display: block;
 	margin-top: 0.5em;
 }
 
-#add_content .vDateField,#add_content .vTimeField {
+#add_content .vDateField, #add_content .vTimeField {
 	width: 90px;
 	float: left;
 }
@@ -65,12 +71,10 @@
 	display: none;
 }
 
-
 #submitcontent-loader-msg {
 	padding-left: 6px;
 }
 
-
 #submitcontent-buttons input[type="submit"], #submitcontent-buttons button, #submitcontent-buttons-login input[type="submit"], #submitcontent-buttons-login button {
 	background-color: #656565;
 	color: white;
--- a/src/ldt/ldt/static/ldt/css/style.css	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/static/ldt/css/style.css	Wed Nov 30 10:44:15 2011 +0100
@@ -223,11 +223,28 @@
     text-decoration:underline;
 }
 
-.errorlist
-{
+#lefttable {
+	float: left;
+}
+
+.bold {
+	font-weight: bold;
+}
+
+.perm_read, .perm_write {
+	text-decoration: none;
+    color: black;
+}
+
+.pointer {
+	cursor: pointer;
+}
+
+.errorlist {
     color: red;
     font-size:12px
 }
+
 .ui-tooltip-dark .ui-tooltip-content {
  	font-size: 1.1em;
 	border-width: 0px;
--- a/src/ldt/ldt/static/ldt/css/workspace.css	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/static/ldt/css/workspace.css	Wed Nov 30 10:44:15 2011 +0100
@@ -100,7 +100,7 @@
 .projectscontentsheader  {
 	background: #b5b5b5;
 	padding: 1px 2px;
-	text-align: left;	
+	text-align: left;
 }
 .projectcontentsheadertitle {
 	font-weight: bold;
@@ -137,7 +137,6 @@
 	color: #4F5155;
 }
 
-
 .projecttitle {
 	width: 367px;
 	padding: 2px 10px 2px 5px;	
@@ -163,6 +162,9 @@
 	padding-right: 16px;
 }
 
+.permissionscol {
+}
+
 .cellimg {
 	width: 18px;
 	text-align: center;
@@ -201,6 +203,6 @@
     margin-top: 20px;
 }
 
-.next_icon {
+.next_icon, .grouplink {
 	display: none;
 }
--- a/src/ldt/ldt/static/ldt/js/jquery.nyroModal.min.js	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/static/ldt/js/jquery.nyroModal.min.js	Wed Nov 30 10:44:15 2011 +0100
@@ -2,6 +2,7 @@
  * nyroModal v2.0.0
  * Core
  *
+ * Commit b12752ee7dcdb1836c2e (09/26/2011) * 
  * 
  * Included parts:
  * - anims.fade
@@ -9,6 +10,7 @@
  * - filters.gallery
  * - filters.link
  * - filters.dom
+ * - filters.data
  * - filters.image
  * - filters.swf
  * - filters.form
@@ -17,16 +19,12 @@
  * - filters.iframeForm
  * - filters.embedly
  */
- jQuery(function($,undefined){var $w=$(window),$d=$(document),$b=$('body'),baseHref=$('base').attr('href'),_nmObj={filters:[],callbacks:{},loadFilter:undefined,modal:false,closeOnEscape:true,closeOnClick:true,useKeyHandler:false,showCloseButton:true,closeButton:'<a href="#" class="nyroModalClose nyroModalCloseButton nmReposition" title="close">Close</a>',stack:false,header:undefined,footer:undefined,galleryLoop:true,galleryCounts:true,ltr:true,imageRegex:'[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$',selIndicator:'nyroModalSel',swf:{allowFullScreen:'true',allowscriptaccess:'always',wmode:'transparent'},store:{},errorMsg:'An error occured',elts:{all:undefined,bg:undefined,load:undefined,cont:undefined,hidden:undefined},sizes:{initW:undefined,initH:undefined,w:undefined,h:undefined,minW:undefined,minH:undefined,wMargin:undefined,hMargin:undefined},anim:{def:undefined,showBg:undefined,hideBg:undefined,showLoad:undefined,hideLoad:undefined,showCont:undefined,hideCont:undefined,showTrans:undefined,hideTrans:undefined,resize:undefined},_open:false,_bgReady:false,_opened:false,_loading:false,_animated:false,_transition:false,_nmOpener:undefined,_nbContentLoading:0,_scripts:'',_scriptsShown:'',saveObj:function(){this.opener.data('nmObj',this);},open:function(){this.getInternal()._pushStack(this.opener);this._opened=false;this._bgReady=false;this._open=true;this._initElts();this._load();this._nbContentLoading=0;this._callAnim('showBg',$.proxy(function(){this._bgReady=true;if(this._nmOpener){this._nmOpener._close();this._nmOpener._bgReady=false;this._nmOpener._loading=false;this._nmOpener._animated=false;this._nmOpener._opened=false;this._nmOpener._open=false;this._nmOpener.elts.cont=this._nmOpener.elts.hidden=this._nmOpener.elts.load=this._nmOpener.elts.bg=this._nmOpener.elts.all=undefined;this._nmOpener.saveObj();this._nmOpener=undefined;}this._contentLoading();},this));},resize:function(){this.sizes.w=this.sizes.initW;this.sizes.h=this.sizes.initH;this._unreposition();this.size();this._callAnim('resize',$.proxy(function(){this._reposition();},this));},size:function(){var maxHeight=this.getInternal().fullSize.viewH-this.sizes.hMargin,maxWidth=this.getInternal().fullSize.viewW-this.sizes.wMargin;if(this.sizes.minW&&this.sizes.minW>this.sizes.w)this.sizes.w=this.sizes.minW;if(this.sizes.minH&&this.sizes.minH>this.sizes.h)this.sizes.h=this.sizes.minH;if(this.sizes.h>maxHeight||this.sizes.w>maxWidth){this.sizes.h=Math.min(this.sizes.h,maxHeight);this.sizes.w=Math.min(this.sizes.w,maxWidth);}this._callFilters('size');},getForNewLinks:function(){var ret;if(this.stack){ret=$.extend(true,{},this);ret._nmOpener=undefined;ret.elts.all=undefined;}else{ret=$.extend({},this);ret._nmOpener=this;}ret.filters=[];ret.opener=undefined;ret._open=false;return ret;},keyHandle:function(e){this.keyEvent=e;this._callFilters('keyHandle');this.keyEvent=undefined;delete(this.keyEvent);},getInternal:function(){return _internal;},_close:function(){this.getInternal()._removeStack(this.opener);this._opened=false;this._open=false;this._callFilters('close');},close:function(){this._close();this._callFilters('beforeClose');var self=this;this._unreposition();self._callAnim('hideCont',function(){self._callAnim('hideLoad',function(){self._callAnim('hideBg',function(){self._callFilters('afterClose');self.elts.cont.remove();self.elts.hidden.remove();self.elts.load.remove();self.elts.bg.remove();self.elts.all.remove();self.elts.cont=self.elts.hidden=self.elts.load=self.elts.bg=self.elts.all=undefined;});});});},_initElts:function(){if(!this.stack&&this.getInternal().stack.length>1)this.elts=$(_internal.stack[_internal.stack.length-2]).data('nmObj').elts;if(!this.elts.all||this.elts.all.closest('body').length==0)this.elts.all=this.elts.bg=this.elts.cont=this.elts.hidden=this.elts.load=undefined;if(!this.elts.all)this.elts.all=$('<div />').appendTo(this.getInternal()._container);if(!this.elts.bg)this.elts.bg=$('<div />').hide().appendTo(this.elts.all);if(!this.elts.cont)this.elts.cont=$('<div />').hide().appendTo(this.elts.all);if(!this.elts.hidden)this.elts.hidden=$('<div />').hide().appendTo(this.elts.all);this.elts.hidden.empty();if(!this.elts.load)this.elts.load=$('<div />').hide().appendTo(this.elts.all);this._callFilters('initElts');},_error:function(){this._callFilters('error');},_setCont:function(html,selector){if(selector){var tmp=[],i=0;html=html .replace(/\r\n/gi,'nyroModalLN').replace(/<script(.|\s)*?\/script>/gi,function(x){tmp[i]=x;return '<pre class=nyroModalScript rel="'+(i++)+'"></pre>';});var cur=$('<div>'+html+'</div>').find(selector);if(cur.length){html=cur.html().replace(/<pre class="?nyroModalScript"? rel="?(.?)"?><\/pre>/gi,function(x,y,z){return tmp[y];}).replace(/nyroModalLN/gi,"\r\n");}else{this._error();return;}}this.elts.hidden .append(this._filterScripts(html)).prepend(this.header).append(this.footer).wrapInner('<div class="nyroModal'+ucfirst(this.loadFilter)+'" />');this.sizes.initW=this.sizes.w=this.elts.hidden.width();this.sizes.initH=this.sizes.h=this.elts.hidden.height();var outer=this.getInternal()._getOuter(this.elts.cont);this.sizes.hMargin=outer.h.total;this.sizes.wMargin=outer.w.total;this.size();this.loading=false;this._callFilters('filledContent');this._contentLoading();},_filterScripts:function(data){if(typeof data!='string')return data;this._scripts=[];this._scriptsShown=[];var start=0,stStart='<script',stEnd='</script>',endLn=stEnd.length,pos,pos2,tmp;while((pos=data.indexOf(stStart,start))>-1){pos2=data.indexOf(stEnd)+endLn;tmp=$(data.substring(pos,pos2));if(!tmp.attr('src')||tmp.attr('rel')=='forceLoad'){if(tmp.attr('rev')=='shown')this._scriptsShown.push(tmp.get(0));else this._scripts.push(tmp.get(0));}data=data.substring(0,pos)+data.substr(pos2);start=pos;}return data;},_hasFilter:function(filter){var ret=false;$.each(this.filters,function(i,f){ret=ret||f==filter;});return ret;},_delFilter:function(filter){this.filters=$.map(this.filters,function(v){if(v!=filter)return v;});},_callFilters:function(fct){this.getInternal()._debug(fct);var ret=[],self=this;$.each(this.filters,function(i,f){ret[f]=self._callFilter(f,fct);});if(this.callbacks[fct]&&$.isFunction(this.callbacks[fct]))this.callbacks[fct](this);return ret;},_callFilter:function(f,fct){if(_filters[f]&&_filters[f][fct]&&$.isFunction(_filters[f][fct]))return _filters[f][fct](this);return undefined;},_callAnim:function(fct,clb){this.getInternal()._debug(fct);this._callFilters('before'+ucfirst(fct));if(!this._animated){this._animated=true;if(!$.isFunction(clb))clb=$.noop;var set=this.anim[fct]||this.anim.def||'basic';if(!_animations[set]||!_animations[set][fct]||!$.isFunction(_animations[set][fct]))set='basic';_animations[set][fct](this,$.proxy(function(){this._animated=false;this._callFilters('after'+ucfirst(fct));clb();},this));}},_load:function(){this.getInternal()._debug('_load');if(!this.loading&&this.loadFilter){this.loading=true;this._callFilter(this.loadFilter,'load');}},_contentLoading:function(){if(!this._animated&&this._bgReady){if(!this._transition&&this.elts.cont.html().length>0)this._transition=true;this._nbContentLoading++;if(!this.loading){if(!this._opened){this._opened=true;if(this._transition){var fct=$.proxy(function(){this._writeContent();this._callFilters('beforeShowCont');this._callAnim('hideTrans',$.proxy(function(){this._transition=false;this.elts.cont.append(this._scriptsShown);this._reposition();this._callFilters('afterShowCont');},this));},this);if(this._nbContentLoading==1){this._unreposition();this._callAnim('showTrans',fct);}else{fct();}}else{this._callAnim('hideLoad',$.proxy(function(){this._writeContent();this._callAnim('showCont',$.proxy(function(){this.elts.cont.append(this._scriptsShown);this._reposition();},this));},this));}}}else if(this._nbContentLoading==1){var outer=this.getInternal()._getOuter(this.elts.load);this.elts.load .css({position:'fixed',top:(this.getInternal().fullSize.viewH-this.elts.load.height()-outer.h.margin)/2,left:(this.getInternal().fullSize.viewW-this.elts.load.width()-outer.w.margin)/2});if(this._transition){this._unreposition();this._callAnim('showTrans',$.proxy(function(){this._contentLoading();},this));}else{this._callAnim('showLoad',$.proxy(function(){this._contentLoading();},this));}}}},_writeContent:function(){this.elts.cont .empty().append(this.elts.hidden.contents()).append(this._scripts).append(this.showCloseButton?this.closeButton:'').css({position:'fixed',width:this.sizes.w,height:this.sizes.h,top:(this.getInternal().fullSize.viewH-this.sizes.h-this.sizes.hMargin)/2,left:(this.getInternal().fullSize.viewW-this.sizes.w-this.sizes.wMargin)/2});},_reposition:function(){var elts=this.elts.cont.find('.nmReposition');if(elts.length){var space=this.getInternal()._getSpaceReposition();elts.each(function(){var me=$(this),offset=me.offset();me.css({position:'fixed',top:offset.top-space.top,left:offset.left-space.left});});this.elts.cont.after(elts);}this.elts.cont.css('overflow','auto');},_unreposition:function(){this.elts.cont.css('overflow','');var elts=this.elts.all.find('.nmReposition');if(elts.length)this.elts.cont.append(elts.removeAttr('style'));}},_internal={firstInit:true,stack:[],fullSize:{w:0,h:0,wW:0,wH:0,viewW:0,viewH:0},nyroModal:function(opts,fullObj){if(_internal.firstInit){_internal._container=$('<div />').appendTo($b);$w.smartresize($.proxy(_internal._resize,_internal));$d.bind('keydown.nyroModal',$.proxy(_internal._keyHandler,_internal));_internal._calculateFullSize();_internal.firstInit=false;}return this.nmInit(opts,fullObj).each(function(){_internal._init($(this).data('nmObj'));});},nmInit:function(opts,fullObj){return this.each(function(){var me=$(this);if(fullObj)me.data('nmObj',$.extend(true,{opener:me},opts));else me.data('nmObj',me.data('nmObj')?$.extend(true,me.data('nmObj'),opts):$.extend(true,{opener:me},_nmObj,opts));});},nmCall:function(){return this.trigger('nyroModal');},nmManual:function(url,opts){$('<a />',{href:url}).nyroModal(opts).trigger('nyroModal');},nmObj:function(opts){$.extend(true,_nmObj,opts);},nmInternal:function(opts){$.extend(true,_internal,opts);},nmAnims:function(opts){$.extend(true,_animations,opts);},nmFilters:function(opts){$.extend(true,_filters,opts);},nmTop:function(){if(_internal.stack.length)return $(_internal.stack[_internal.stack.length-1]).data('nmObj');return undefined;},_debug:function(msg){if(window.console&&window.console.log)window.console.log(msg);},_container:undefined,_init:function(nm){nm.filters=[];$.each(_filters,function(f,obj){if($.isFunction(obj.is)&&obj.is(nm)){nm.filters.push(f);}});nm._callFilters('init');nm.opener .unbind('nyroModal.nyroModal nmClose.nyroModal nmResize.nyroModal').bind({'nyroModal.nyroModal':function(e){nm.open();return false;},'nmClose.nyroModal':function(){nm.close();return false;},'nmResize.nyroModal':function(){nm.resize();return false;}});},_scrollWidth:(function(){var scrollbarWidth;if($.browser.msie){var $textarea1=$('<textarea cols="10" rows="2"></textarea>').css({position:'absolute',top:-1000,left:-1000}).appendTo($b),$textarea2=$('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:'absolute',top:-1000,left:-1000}).appendTo($b);scrollbarWidth=$textarea1.width()-$textarea2.width();$textarea1.add($textarea2).remove();}else{var $div=$('<div />').css({width:100,height:100,overflow:'auto',position:'absolute',top:-1000,left:-1000}).prependTo($b).append('<div />').find('div').css({width:'100%',height:200});scrollbarWidth=100-$div.width();$div.parent().remove();}return scrollbarWidth;})(),_selNyroModal:function(obj){return $(obj).data('nmObj')?true:false;},_selNyroModalOpen:function(obj){var me=$(obj);return me.data('nmObj')?me.data('nmObj')._open:false;},_keyHandler:function(e){var nmTop=$.nmTop();if(nmTop&&nmTop.useKeyHandler){return nmTop.keyHandle(e);}},_pushStack:function(obj){this.stack=$.map(this.stack,function(elA){if(elA!=obj.get(0))return elA;});this.stack.push(obj.get(0));},_removeStack:function(obj){this.stack=$.map(this.stack,function(elA){if(elA!=obj.get(0))return elA;});},_resize:function(){var opens=$(':nmOpen').each(function(){$(this).data('nmObj')._unreposition();});this._calculateFullSize();opens.trigger('nmResize');},_calculateFullSize:function(){this.fullSize={w:$d.width(),h:$d.height(),wW:$w.width(),wH:$w.height()};this.fullSize.viewW=Math.min(this.fullSize.w,this.fullSize.wW);this.fullSize.viewH=Math.min(this.fullSize.h,this.fullSize.wH);},_getCurCSS:function(elm,name){var ret=parseInt($.curCSS(elm,name,true));return isNaN(ret)?0:ret;},_getOuter:function(elm){elm=elm.get(0);var ret={h:{margin:this._getCurCSS(elm,'marginTop')+this._getCurCSS(elm,'marginBottom'),border:this._getCurCSS(elm,'borderTopWidth')+this._getCurCSS(elm,'borderBottomWidth'),padding:this._getCurCSS(elm,'paddingTop')+this._getCurCSS(elm,'paddingBottom')},w:{margin:this._getCurCSS(elm,'marginLeft')+this._getCurCSS(elm,'marginRight'),border:this._getCurCSS(elm,'borderLeftWidth')+this._getCurCSS(elm,'borderRightWidth'),padding:this._getCurCSS(elm,'paddingLeft')+this._getCurCSS(elm,'paddingRight')}};ret.h.outer=ret.h.margin+ret.h.border;ret.w.outer=ret.w.margin+ret.w.border;ret.h.inner=ret.h.padding+ret.h.border;ret.w.inner=ret.w.padding+ret.w.border;ret.h.total=ret.h.outer+ret.h.padding;ret.w.total=ret.w.outer+ret.w.padding;return ret;},_getSpaceReposition:function(){var outer=this._getOuter($b),ie7=$.browser.msie&&$.browser.version<8&&!(screen.height<=$w.height()+23);return{top:$w.scrollTop()-(!ie7?outer.h.border/2:0),left:$w.scrollLeft()-(!ie7?outer.w.border/2:0)};},_getHash:function(url){if(typeof url=='string'){var hashPos=url.indexOf('#');if(hashPos>-1)return url.substring(hashPos);}return '';},_extractUrl:function(url){var ret={url:undefined,sel:undefined};if(url){var hash=this._getHash(url),hashLoc=this._getHash(window.location.href),curLoc=window.location.href.substring(0,window.location.href.length-hashLoc.length),req=url.substring(0,url.length-hash.length);ret.sel=hash;if(req!=curLoc&&req!=baseHref)ret.url=req;}return ret;}},_animations={basic:{showBg:function(nm,clb){nm.elts.bg.css({opacity:0.7}).show();clb();},hideBg:function(nm,clb){nm.elts.bg.hide();clb();},showLoad:function(nm,clb){nm.elts.load.show();clb();},hideLoad:function(nm,clb){nm.elts.load.hide();clb();},showCont:function(nm,clb){nm.elts.cont.show();clb();},hideCont:function(nm,clb){nm.elts.cont.hide();clb();},showTrans:function(nm,clb){nm.elts.cont.hide();nm.elts.load.show();clb();},hideTrans:function(nm,clb){nm.elts.cont.show();nm.elts.load.hide();clb();},resize:function(nm,clb){nm.elts.cont.css({width:nm.sizes.w,height:nm.sizes.h,top:(nm.getInternal().fullSize.viewH-nm.sizes.h-nm.sizes.hMargin)/2,left:(nm.getInternal().fullSize.viewW-nm.sizes.w-nm.sizes.wMargin)/2});clb();}}},_filters={basic:{is:function(nm){return true;},init:function(nm){if(nm.opener.attr('rev')=='modal')nm.modal=true;if(nm.modal)nm.closeOnEscape=nm.closeOnClick=nm.showCloseButton=false;if(nm.closeOnEscape)nm.useKeyHandler=true;},initElts:function(nm){nm.elts.bg.addClass('nyroModalBg');if(nm.closeOnClick)nm.elts.bg.unbind('click.nyroModal').bind('click.nyroModal',function(e){e.preventDefault();nm.close();});nm.elts.cont.addClass('nyroModalCont');nm.elts.hidden.addClass('nyroModalCont nyroModalHidden');nm.elts.load.addClass('nyroModalCont nyroModalLoad');},error:function(nm){nm.elts.hidden.addClass('nyroModalError');nm.elts.cont.addClass('nyroModalError');nm._setCont(nm.errorMsg);},beforeShowCont:function(nm){nm.elts.cont .find('.nyroModal').nyroModal(nm.getForNewLinks(),true).end().find('.nyroModalClose').bind('click.nyroModal',function(e){e.preventDefault();nm.close();});},keyHandle:function(nm){if(nm.keyEvent.keyCode==27&&nm.closeOnEscape){nm.keyEvent.preventDefault();nm.close();}}},custom:{is:function(nm){return true;}}};$.fn.extend({nm:_internal.nyroModal,nyroModal:_internal.nyroModal,nmInit:_internal.nmInit,nmCall:_internal.nmCall});$.extend({nmManual:_internal.nmManual,nmObj:_internal.nmObj,nmInternal:_internal.nmInternal,nmAnims:_internal.nmAnims,nmFilters:_internal.nmFilters,nmTop:_internal.nmTop});$.expr[':'].nyroModal=$.expr[':'].nm=_internal._selNyroModal;$.expr[':'].nmOpen=_internal._selNyroModalOpen;});(function($,sr){var debounce=function(func,threshold,execAsap){var timeout;return function debounced(){var obj=this,args=arguments;function delayed(){if(!execAsap)func.apply(obj,args);timeout=null;};if(timeout)clearTimeout(timeout);else if(execAsap)func.apply(obj,args);timeout=setTimeout(delayed,threshold||100);};};jQuery.fn[sr]=function(fn){return fn?this.bind('resize',debounce(fn)):this.trigger(sr);};})(jQuery,'smartresize');function ucfirst(str){str+='';var f=str.charAt(0).toUpperCase();return f+str.substr(1);};
- jQuery(function($,undefined){$.nmAnims({fade:{showBg:function(nm,clb){nm.elts.bg.fadeTo(250,0.7,clb);},hideBg:function(nm,clb){nm.elts.bg.fadeOut(clb);},showLoad:function(nm,clb){nm.elts.load.fadeIn(clb);},hideLoad:function(nm,clb){nm.elts.load.fadeOut(clb);},showCont:function(nm,clb){nm.elts.cont.fadeIn(clb);},hideCont:function(nm,clb){nm.elts.cont.css('overflow','hidden').fadeOut(clb);},showTrans:function(nm,clb){nm.elts.load .css({position:nm.elts.cont.css('position'),top:nm.elts.cont.css('top'),left:nm.elts.cont.css('left'),width:nm.elts.cont.css('width'),height:nm.elts.cont.css('height'),marginTop:nm.elts.cont.css('marginTop'),marginLeft:nm.elts.cont.css('marginLeft')}).fadeIn(function(){nm.elts.cont.hide();clb();});},hideTrans:function(nm,clb){nm.elts.cont.css('visibility','hidden').show();nm.elts.load .css('position',nm.elts.cont.css('position')).animate({top:nm.elts.cont.css('top'),left:nm.elts.cont.css('left'),width:nm.elts.cont.css('width'),height:nm.elts.cont.css('height'),marginTop:nm.elts.cont.css('marginTop'),marginLeft:nm.elts.cont.css('marginLeft')},function(){nm.elts.cont.css('visibility','');nm.elts.load.fadeOut(clb);});},resize:function(nm,clb){nm.elts.cont.animate({width:nm.sizes.w,height:nm.sizes.h,top:(nm.getInternal().fullSize.viewH-nm.sizes.h-nm.sizes.hMargin)/2,left:(nm.getInternal().fullSize.viewW-nm.sizes.w-nm.sizes.wMargin)/2},clb);}}});$.nmObj({anim:{def:'fade'}});});;
- jQuery(function($,undefined){$.nmFilters({title:{is:function(nm){return nm.opener.is('[title]');},beforeShowCont:function(nm){var offset=nm.elts.cont.offset();nm.store.title=$('<h1 />',{text:nm.opener.attr('title')}).addClass('nyroModalTitle nmReposition');nm.elts.cont.prepend(nm.store.title);},close:function(nm){if(nm.store.title){nm.store.title.remove();nm.store.title=undefined;delete(nm.store.title);}}}});});;
- jQuery(function($,undefined){$.nmFilters({gallery:{is:function(nm){var ret=nm.opener.is('[rel]:not([rel=external], [rel=nofollow])');if(ret&&nm.galleryCounts&&!nm._hasFilter('title'))nm.filters.push('title');return ret;},init:function(nm){nm.useKeyHandler=true;},keyHandle:function(nm){if(!nm._animated&&nm._opened){if(nm.keyEvent.keyCode==39||nm.keyEvent.keyCode==40){nm.keyEvent.preventDefault();nm._callFilters('galleryNext');}else if(nm.keyEvent.keyCode==37||nm.keyEvent.keyCode==38){nm.keyEvent.preventDefault();nm._callFilters('galleryPrev');}}},initElts:function(nm){var rel=nm.opener.attr('rel'),indexSpace=rel.indexOf(' ');nm.store.gallery=indexSpace>0?rel.substr(0,indexSpace):rel;nm.store.galleryLinks=$('[href][rel="'+nm.store.gallery+'"], [href][rel^="'+nm.store.gallery+' "]');nm.store.galleryIndex=nm.store.galleryLinks.index(nm.opener);},beforeShowCont:function(nm){if(nm.galleryCounts&&nm.store.title&&nm.store.galleryLinks.length>1){var curTitle=nm.store.title.html();nm.store.title.html((curTitle.length?curTitle+' - ':'')+(nm.store.galleryIndex+1)+'/'+nm.store.galleryLinks.length);}},filledContent:function(nm){var link=this._getGalleryLink(nm,-1),append=nm.elts.hidden.find(' > div');if(link){$('<a />',{text:'previous',href:'#'}).addClass('nyroModalPrev').bind('click',function(e){e.preventDefault();nm._callFilters('galleryPrev');}).appendTo(append);}link=this._getGalleryLink(nm,1);if(link){$('<a />',{text:'next',href:'#'}).addClass('nyroModalNext').bind('click',function(e){e.preventDefault();nm._callFilters('galleryNext');}).appendTo(append);}},close:function(nm){nm.store.gallery=undefined;nm.store.galleryLinks=undefined;nm.store.galleryIndex=undefined;delete(nm.store.gallery);delete(nm.store.galleryLinks);delete(nm.store.galleryIndex);if(nm.elts.cont)nm.elts.cont.find('.nyroModalNext, .nyroModalPrev').remove();},galleryNext:function(nm){this._getGalleryLink(nm,1).nyroModal(nm.getForNewLinks(),true).click();},galleryPrev:function(nm){this._getGalleryLink(nm,-1).nyroModal(nm.getForNewLinks(),true).click();},_getGalleryLink:function(nm,dir){if(nm.store.gallery){if(!nm.ltr)dir *=-1;var index=nm.store.galleryIndex+dir;if(index>=0&&index<nm.store.galleryLinks.length)return nm.store.galleryLinks.eq(index);else if(nm.galleryLoop)return nm.store.galleryLinks.eq(index<0?nm.store.galleryLinks.length-1:0);}return undefined;}}});});;
- jQuery(function($,undefined){$.nmFilters({link:{is:function(nm){var ret=nm.opener.is('[href]');if(ret)nm.store.link=nm.getInternal()._extractUrl(nm.opener.attr('href'));return ret;},init:function(nm){nm.loadFilter='link';nm.opener.unbind('click.nyroModal').bind('click.nyroModal',function(e){e.preventDefault();nm.opener.trigger('nyroModal');});},load:function(nm){$.ajax({url:nm.store.link.url,data:nm.store.link.sel?[{name:nm.selIndicator,value:nm.store.link.sel.substring(1)}]:undefined,success:function(data){nm._setCont(data,nm.store.link.sel);},error:function(){nm._error();}});}}});});;
- jQuery(function($,undefined){$.nmFilters({dom:{is:function(nm){return nm._hasFilter('link')&&!nm.store.link.url&&nm.store.link.sel;},init:function(nm){nm.loadFilter='dom';},load:function(nm){nm.store.domEl=$(nm.store.link.sel);if(nm.store.domEl.length)nm._setCont(nm.store.domEl.contents());else nm._error();},close:function(nm){if(nm.store.domEl&&nm.elts.cont)nm.store.domEl.append(nm.elts.cont.find('.nyroModalDom').contents());}}});});;
- jQuery(function($,undefined){$.nmFilters({image:{is:function(nm){return(new RegExp(nm.imageRegex,'i')).test(nm.opener.attr('href'));},init:function(nm){nm.loadFilter='image';},load:function(nm){var url=nm.opener.attr('href');$('<img />').load(function(){nm.elts.cont.addClass('nyroModalImg');nm.elts.hidden.addClass('nyroModalImg');nm._setCont(this);}).error(function(){nm._error();}).attr('src',url);},size:function(nm){if(nm.sizes.w!=nm.sizes.initW||nm.sizes.h!=nm.sizes.initH){var ratio=Math.min(nm.sizes.w/nm.sizes.initW,nm.sizes.h/nm.sizes.initH);nm.sizes.w=nm.sizes.initW * ratio;nm.sizes.h=nm.sizes.initH * ratio;}var img=nm.loading?nm.elts.hidden.find('img'):nm.elts.cont.find('img');img.attr({width:nm.sizes.w,height:nm.sizes.h});},close:function(nm){if(nm.elts.cont){nm.elts.cont.removeClass('nyroModalImg');nm.elts.hidden.removeClass('nyroModalImg');}}}});});;
- jQuery(function($,undefined){$.nmFilters({swf:{is:function(nm){return nm._hasFilter('link')&&nm.opener.is('[href$=.swf]');},init:function(nm){nm.loadFilter='swf';},load:function(nm){var url=nm.store.link.url,cont='<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+nm.sizes.w+'" height="'+nm.sizes.h+'"><param name="movie" value="'+url+'"></param>',tmp='';$.each(nm.swf,function(name,val){cont+='<param name="'+name+'" value="'+val+'"></param>';tmp+=' '+name+'="'+val+'"';});cont+='<embed src="'+url+'" type="application/x-shockwave-flash" width="'+nm.sizes.w+'" height="'+nm.sizes.h+'"'+tmp+'></embed></object></div>';nm._setCont(cont);}}});});;
- jQuery(function($,undefined){$.nmFilters({form:{is:function(nm){var ret=nm.opener.is('form');if(ret)nm.store.form=nm.getInternal()._extractUrl(nm.opener.attr('action'));return ret;},init:function(nm){nm.loadFilter='form';nm.opener.unbind('submit.nyroModal').bind('submit.nyroModal',function(e){e.preventDefault();nm.opener.trigger('nyroModal');});},load:function(nm){var data=nm.opener.serializeArray();if(nm.store.form.sel)data.push({name:nm.selIndicator,value:nm.store.form.sel.substring(1)});$.ajax({url:nm.store.form.url,data:data,type:nm.opener.attr('method')?nm.opener.attr('method'):'get',success:function(data){nm._setCont(data,nm.store.form.sel);},error:function(){nm._error();}});}}});});;
- jQuery(function($,undefined){$.nmFilters({formFile:{is:function(nm){var ret=nm.opener.is('form[enctype="multipart/form-data"]');if(ret){nm._delFilter('form');if(!nm.store.form)nm.store.form=nm.getInternal()._extractUrl(nm.opener.attr('action'));}return ret;},init:function(nm){nm.loadFilter='formFile';nm.store.formFileLoading=false;nm.opener.unbind('submit.nyroModal').bind('submit.nyroModal',function(e){if(!nm.store.formFileIframe){e.preventDefault();nm.opener.trigger('nyroModal');}else{nm.store.formFileLoading=true;}});},initElts:function(nm){var inputSel;if(nm.store.form.sel)inputSel=$('<input />',{'type':'hidden',name:nm.selIndicator,value:nm.store.form.sel.substring(1)}).appendTo(nm.opener);function rmFormFileElts(){if(inputSel){inputSel.remove();inputSel=undefined;delete(inputSel);}nm.store.formFileIframe.attr('src','about:blank').remove();nm.store.formFileIframe=undefined;delete(nm.store.formFileIframe);}nm.store.formFileIframe=$('<iframe name="nyroModalFormFile" src="javascript:\'\';"></iframe>').hide().load(function(){if(nm.store.formFileLoading){nm.store.formFileLoading=false;var content=nm.store.formFileIframe .unbind('load error').contents().find('body').not('script[src]');if(content&&content.html()&&content.html().length){rmFormFileElts();nm._setCont(content.html(),nm.store.form.sel);}else{var nbTry=0;fct=function(){nbTry++;var content=nm.store.formFileIframe .unbind('load error').contents().find('body').not('script[src]');if(content&&content.html()&&content.html().length){nm._setCont(content.html(),nm.store.form.sel);rmFormFileElts();}else if(nbTry<5){setTimeout(fct,25);}else{rmFormFileElts();nm._error();}};setTimeout(fct,25);}}}).error(function(){rmIframe();nm._error();});nm.elts.all.append(nm.store.formFileIframe);nm.opener .attr('target','nyroModalFormFile').submit();},close:function(nm){nm.store.formFileLoading=false;if(nm.store.formFileIframe){nm.store.formFileIframe.remove();nm.store.formFileIframe=undefined;delete(nm.store.formFileIframe);}}}});});;
- jQuery(function($,undefined){$.nmFilters({iframe:{is:function(nm){var target=nm.opener.attr('target')||'',rel=nm.opener.attr('rel')||'',opener=nm.opener.get(0);return!nm._hasFilter('image')&&(target.toLowerCase()=='_blank'||rel.toLowerCase().indexOf('external')>-1||(opener.hostname&&opener.hostname.replace(/:\d*$/,'')!=window.location.hostname.replace(/:\d*$/,'')));},init:function(nm){nm.loadFilter='iframe';},load:function(nm){nm.store.iframe=$('<iframe src="javascript:\'\';"></iframe>');nm._setCont(nm.store.iframe);},afterShowCont:function(nm){nm.store.iframe.attr('src',nm.opener.attr('href'));},close:function(nm){if(nm.store.iframe){nm.store.iframe.remove();nm.store.iframe=undefined;delete(nm.store.iframe);}}}});});;
- jQuery(function($,undefined){$.nmFilters({iframeForm:{is:function(nm){var ret=nm._hasFilter('iframe')&&nm.opener.is('form');if(ret){nm._delFilter('iframe');nm._delFilter('form');}return ret;},init:function(nm){nm.loadFilter='iframeForm';nm.store.iframeFormLoading=false;nm.store.iframeFormOrgTarget=nm.opener.attr('target');nm.opener.unbind('submit.nyroModal').bind('submit.nyroModal',function(e){if(!nm.store.iframeFormIframe){e.preventDefault();nm.opener.trigger('nyroModal');}else{nm.store.iframeFormLoading=true;}});},load:function(nm){nm.store.iframeFormIframe=$('<iframe name="nyroModalIframeForm" src="javascript:\'\';"></iframe>');nm._setCont(nm.store.iframeFormIframe);},afterShowCont:function(nm){nm.opener .attr('target','nyroModalIframeForm').submit();},close:function(nm){nm.store.iframeFormOrgTarget?nm.opener.attr('target',nm.store.iframeFormOrgTarget):nm.opener.removeAttr('target');delete(nm.store.formFileLoading);delete(nm.store.iframeFormOrgTarget);if(nm.store.iframeFormIframe){nm.store.iframeFormIframe.remove();nm.store.iframeFormIframe=undefined;delete(nm.store.iframeFormIframe);}}}});});;
- jQuery(function($,undefined){$.nmFilters({embedly:{is:function(nm){var embedlyReg= /http:\/\/(.*youtube\.com\/watch.*|.*\.youtube\.com\/v\/.*|youtu\.be\/.*|.*\.youtube\.com\/user\/.*|.*\.youtube\.com\/.*#.*\/.*|m\.youtube\.com\/watch.*|m\.youtube\.com\/index.*|.*\.youtube\.com\/profile.*|.*justin\.tv\/.*|.*justin\.tv\/.*\/b\/.*|.*justin\.tv\/.*\/w\/.*|www\.ustream\.tv\/recorded\/.*|www\.ustream\.tv\/channel\/.*|www\.ustream\.tv\/.*|qik\.com\/video\/.*|qik\.com\/.*|qik\.ly\/.*|.*revision3\.com\/.*|.*\.dailymotion\.com\/video\/.*|.*\.dailymotion\.com\/.*\/video\/.*|www\.collegehumor\.com\/video:.*|.*twitvid\.com\/.*|www\.break\.com\/.*\/.*|vids\.myspace\.com\/index\.cfm\?fuseaction=vids\.individual&videoid.*|www\.myspace\.com\/index\.cfm\?fuseaction=.*&videoid.*|www\.metacafe\.com\/watch\/.*|www\.metacafe\.com\/w\/.*|blip\.tv\/file\/.*|.*\.blip\.tv\/file\/.*|video\.google\.com\/videoplay\?.*|.*revver\.com\/video\/.*|video\.yahoo\.com\/watch\/.*\/.*|video\.yahoo\.com\/network\/.*|.*viddler\.com\/explore\/.*\/videos\/.*|liveleak\.com\/view\?.*|www\.liveleak\.com\/view\?.*|animoto\.com\/play\/.*|dotsub\.com\/view\/.*|www\.overstream\.net\/view\.php\?oid=.*|www\.livestream\.com\/.*|www\.worldstarhiphop\.com\/videos\/video.*\.php\?v=.*|worldstarhiphop\.com\/videos\/video.*\.php\?v=.*|teachertube\.com\/viewVideo\.php.*|www\.teachertube\.com\/viewVideo\.php.*|www1\.teachertube\.com\/viewVideo\.php.*|www2\.teachertube\.com\/viewVideo\.php.*|bambuser\.com\/v\/.*|bambuser\.com\/channel\/.*|bambuser\.com\/channel\/.*\/broadcast\/.*|www\.schooltube\.com\/video\/.*\/.*|bigthink\.com\/ideas\/.*|bigthink\.com\/series\/.*|sendables\.jibjab\.com\/view\/.*|sendables\.jibjab\.com\/originals\/.*|www\.xtranormal\.com\/watch\/.*|dipdive\.com\/media\/.*|dipdive\.com\/member\/.*\/media\/.*|dipdive\.com\/v\/.*|.*\.dipdive\.com\/media\/.*|.*\.dipdive\.com\/v\/.*|.*yfrog\..*\/.*|tweetphoto\.com\/.*|www\.flickr\.com\/photos\/.*|flic\.kr\/.*|twitpic\.com\/.*|www\.twitpic\.com\/.*|twitpic\.com\/photos\/.*|www\.twitpic\.com\/photos\/.*|.*imgur\.com\/.*|.*\.posterous\.com\/.*|post\.ly\/.*|twitgoo\.com\/.*|i.*\.photobucket\.com\/albums\/.*|s.*\.photobucket\.com\/albums\/.*|phodroid\.com\/.*\/.*\/.*|www\.mobypicture\.com\/user\/.*\/view\/.*|moby\.to\/.*|xkcd\.com\/.*|www\.xkcd\.com\/.*|imgs\.xkcd\.com\/.*|www\.asofterworld\.com\/index\.php\?id=.*|www\.asofterworld\.com\/.*\.jpg|asofterworld\.com\/.*\.jpg|www\.qwantz\.com\/index\.php\?comic=.*|23hq\.com\/.*\/photo\/.*|www\.23hq\.com\/.*\/photo\/.*|.*dribbble\.com\/shots\/.*|drbl\.in\/.*|.*\.smugmug\.com\/.*|.*\.smugmug\.com\/.*#.*|emberapp\.com\/.*\/images\/.*|emberapp\.com\/.*\/images\/.*\/sizes\/.*|emberapp\.com\/.*\/collections\/.*\/.*|emberapp\.com\/.*\/categories\/.*\/.*\/.*|embr\.it\/.*|picasaweb\.google\.com.*\/.*\/.*#.*|picasaweb\.google\.com.*\/lh\/photo\/.*|picasaweb\.google\.com.*\/.*\/.*|dailybooth\.com\/.*\/.*|brizzly\.com\/pic\/.*|pics\.brizzly\.com\/.*\.jpg|img\.ly\/.*|www\.tinypic\.com\/view\.php.*|tinypic\.com\/view\.php.*|www\.tinypic\.com\/player\.php.*|tinypic\.com\/player\.php.*|www\.tinypic\.com\/r\/.*\/.*|tinypic\.com\/r\/.*\/.*|.*\.tinypic\.com\/.*\.jpg|.*\.tinypic\.com\/.*\.png|meadd\.com\/.*\/.*|meadd\.com\/.*|.*\.deviantart\.com\/art\/.*|.*\.deviantart\.com\/gallery\/.*|.*\.deviantart\.com\/#\/.*|fav\.me\/.*|.*\.deviantart\.com|.*\.deviantart\.com\/gallery|.*\.deviantart\.com\/.*\/.*\.jpg|.*\.deviantart\.com\/.*\/.*\.gif|.*\.deviantart\.net\/.*\/.*\.jpg|.*\.deviantart\.net\/.*\/.*\.gif|plixi\.com\/p\/.*|plixi\.com\/profile\/home\/.*|plixi\.com\/.*|www\.fotopedia\.com\/.*\/.*|fotopedia\.com\/.*\/.*|photozou\.jp\/photo\/show\/.*\/.*|photozou\.jp\/photo\/photo_only\/.*\/.*|instagr\.am\/p\/.*|skitch\.com\/.*\/.*\/.*|img\.skitch\.com\/.*|https:\/\/skitch\.com\/.*\/.*\/.*|https:\/\/img\.skitch\.com\/.*|share\.ovi\.com\/media\/.*\/.*|www\.questionablecontent\.net\/|questionablecontent\.net\/|www\.questionablecontent\.net\/view\.php.*|questionablecontent\.net\/view\.php.*|questionablecontent\.net\/comics\/.*\.png|www\.questionablecontent\.net\/comics\/.*\.png|picplz\.com\/user\/.*\/pic\/.*\/|twitrpix\.com\/.*|.*\.twitrpix\.com\/.*|www\.someecards\.com\/.*\/.*|someecards\.com\/.*\/.*|some\.ly\/.*|www\.some\.ly\/.*|pikchur\.com\/.*|achewood\.com\/.*|www\.achewood\.com\/.*|achewood\.com\/index\.php.*|www\.achewood\.com\/index\.php.*|www\.whitehouse\.gov\/photos-and-video\/video\/.*|www\.whitehouse\.gov\/video\/.*|wh\.gov\/photos-and-video\/video\/.*|wh\.gov\/video\/.*|www\.hulu\.com\/watch.*|www\.hulu\.com\/w\/.*|hulu\.com\/watch.*|hulu\.com\/w\/.*|.*crackle\.com\/c\/.*|www\.fancast\.com\/.*\/videos|www\.funnyordie\.com\/videos\/.*|www\.funnyordie\.com\/m\/.*|funnyordie\.com\/videos\/.*|funnyordie\.com\/m\/.*|www\.vimeo\.com\/groups\/.*\/videos\/.*|www\.vimeo\.com\/.*|vimeo\.com\/m\/#\/featured\/.*|vimeo\.com\/groups\/.*\/videos\/.*|vimeo\.com\/.*|vimeo\.com\/m\/#\/featured\/.*|www\.ted\.com\/talks\/.*\.html.*|www\.ted\.com\/talks\/lang\/.*\/.*\.html.*|www\.ted\.com\/index\.php\/talks\/.*\.html.*|www\.ted\.com\/index\.php\/talks\/lang\/.*\/.*\.html.*|.*nfb\.ca\/film\/.*|www\.thedailyshow\.com\/watch\/.*|www\.thedailyshow\.com\/full-episodes\/.*|www\.thedailyshow\.com\/collection\/.*\/.*\/.*|movies\.yahoo\.com\/movie\/.*\/video\/.*|movies\.yahoo\.com\/movie\/.*\/trailer|movies\.yahoo\.com\/movie\/.*\/video|www\.colbertnation\.com\/the-colbert-report-collections\/.*|www\.colbertnation\.com\/full-episodes\/.*|www\.colbertnation\.com\/the-colbert-report-videos\/.*|www\.comedycentral\.com\/videos\/index\.jhtml\?.*|www\.theonion\.com\/video\/.*|theonion\.com\/video\/.*|wordpress\.tv\/.*\/.*\/.*\/.*\/|www\.traileraddict\.com\/trailer\/.*|www\.traileraddict\.com\/clip\/.*|www\.traileraddict\.com\/poster\/.*|www\.escapistmagazine\.com\/videos\/.*|www\.trailerspy\.com\/trailer\/.*\/.*|www\.trailerspy\.com\/trailer\/.*|www\.trailerspy\.com\/view_video\.php.*|www\.atom\.com\/.*\/.*\/|fora\.tv\/.*\/.*\/.*\/.*|www\.spike\.com\/video\/.*|www\.gametrailers\.com\/video\/.*|gametrailers\.com\/video\/.*|www\.koldcast\.tv\/video\/.*|www\.koldcast\.tv\/#video:.*|techcrunch\.tv\/watch.*|techcrunch\.tv\/.*\/watch.*|mixergy\.com\/.*|video\.pbs\.org\/video\/.*|www\.zapiks\.com\/.*|tv\.digg\.com\/diggnation\/.*|tv\.digg\.com\/diggreel\/.*|tv\.digg\.com\/diggdialogg\/.*|www\.trutv\.com\/video\/.*|www\.nzonscreen\.com\/title\/.*|nzonscreen\.com\/title\/.*|app\.wistia\.com\/embed\/medias\/.*|https:\/\/app\.wistia\.com\/embed\/medias\/.*|www\.godtube\.com\/featured\/video\/.*|godtube\.com\/featured\/video\/.*|www\.godtube\.com\/watch\/.*|godtube\.com\/watch\/.*|www\.tangle\.com\/view_video.*|mediamatters\.org\/mmtv\/.*|www\.clikthrough\.com\/theater\/video\/.*|soundcloud\.com\/.*|soundcloud\.com\/.*\/.*|soundcloud\.com\/.*\/sets\/.*|soundcloud\.com\/groups\/.*|snd\.sc\/.*|www\.last\.fm\/music\/.*|www\.last\.fm\/music\/+videos\/.*|www\.last\.fm\/music\/+images\/.*|www\.last\.fm\/music\/.*\/_\/.*|www\.last\.fm\/music\/.*\/.*|www\.mixcloud\.com\/.*\/.*\/|www\.radionomy\.com\/.*\/radio\/.*|radionomy\.com\/.*\/radio\/.*|www\.entertonement\.com\/clips\/.*|www\.rdio\.com\/#\/artist\/.*\/album\/.*|www\.rdio\.com\/artist\/.*\/album\/.*|www\.zero-inch\.com\/.*|.*\.bandcamp\.com\/|.*\.bandcamp\.com\/track\/.*|.*\.bandcamp\.com\/album\/.*|freemusicarchive\.org\/music\/.*|www\.freemusicarchive\.org\/music\/.*|freemusicarchive\.org\/curator\/.*|www\.freemusicarchive\.org\/curator\/.*|www\.npr\.org\/.*\/.*\/.*\/.*\/.*|www\.npr\.org\/.*\/.*\/.*\/.*\/.*\/.*|www\.npr\.org\/.*\/.*\/.*\/.*\/.*\/.*\/.*|www\.npr\.org\/templates\/story\/story\.php.*|huffduffer\.com\/.*\/.*|www\.audioboo\.fm\/boos\/.*|audioboo\.fm\/boos\/.*|boo\.fm\/b.*|www\.xiami\.com\/song\/.*|xiami\.com\/song\/.*|espn\.go\.com\/video\/clip.*|espn\.go\.com\/.*\/story.*|abcnews\.com\/.*\/video\/.*|abcnews\.com\/video\/playerIndex.*|washingtonpost\.com\/wp-dyn\/.*\/video\/.*\/.*\/.*\/.*|www\.washingtonpost\.com\/wp-dyn\/.*\/video\/.*\/.*\/.*\/.*|www\.boston\.com\/video.*|boston\.com\/video.*|www\.facebook\.com\/photo\.php.*|www\.facebook\.com\/video\/video\.php.*|www\.facebook\.com\/v\/.*|cnbc\.com\/id\/.*\?.*video.*|www\.cnbc\.com\/id\/.*\?.*video.*|cnbc\.com\/id\/.*\/play\/1\/video\/.*|www\.cnbc\.com\/id\/.*\/play\/1\/video\/.*|cbsnews\.com\/video\/watch\/.*|www\.google\.com\/buzz\/.*\/.*\/.*|www\.google\.com\/buzz\/.*|www\.google\.com\/profiles\/.*|google\.com\/buzz\/.*\/.*\/.*|google\.com\/buzz\/.*|google\.com\/profiles\/.*|www\.cnn\.com\/video\/.*|edition\.cnn\.com\/video\/.*|money\.cnn\.com\/video\/.*|today\.msnbc\.msn\.com\/id\/.*\/vp\/.*|www\.msnbc\.msn\.com\/id\/.*\/vp\/.*|www\.msnbc\.msn\.com\/id\/.*\/ns\/.*|today\.msnbc\.msn\.com\/id\/.*\/ns\/.*|multimedia\.foxsports\.com\/m\/video\/.*\/.*|msn\.foxsports\.com\/video.*|www\.globalpost\.com\/video\/.*|www\.globalpost\.com\/dispatch\/.*|.*amazon\..*\/gp\/product\/.*|.*amazon\..*\/.*\/dp\/.*|.*amazon\..*\/dp\/.*|.*amazon\..*\/o\/ASIN\/.*|.*amazon\..*\/gp\/offer-listing\/.*|.*amazon\..*\/.*\/ASIN\/.*|.*amazon\..*\/gp\/product\/images\/.*|www\.amzn\.com\/.*|amzn\.com\/.*|www\.shopstyle\.com\/browse.*|www\.shopstyle\.com\/action\/apiVisitRetailer.*|www\.shopstyle\.com\/action\/viewLook.*|gist\.github\.com\/.*|twitter\.com\/.*\/status\/.*|twitter\.com\/.*\/statuses\/.*|mobile\.twitter\.com\/.*\/status\/.*|mobile\.twitter\.com\/.*\/statuses\/.*|www\.crunchbase\.com\/.*\/.*|crunchbase\.com\/.*\/.*|www\.slideshare\.net\/.*\/.*|www\.slideshare\.net\/mobile\/.*\/.*|.*\.scribd\.com\/doc\/.*|screenr\.com\/.*|polldaddy\.com\/community\/poll\/.*|polldaddy\.com\/poll\/.*|answers\.polldaddy\.com\/poll\/.*|www\.5min\.com\/Video\/.*|www\.howcast\.com\/videos\/.*|www\.screencast\.com\/.*\/media\/.*|screencast\.com\/.*\/media\/.*|www\.screencast\.com\/t\/.*|screencast\.com\/t\/.*|issuu\.com\/.*\/docs\/.*|www\.kickstarter\.com\/projects\/.*\/.*|www\.scrapblog\.com\/viewer\/viewer\.aspx.*|ping\.fm\/p\/.*|chart\.ly\/.*|maps\.google\.com\/maps\?.*|maps\.google\.com\/\?.*|maps\.google\.com\/maps\/ms\?.*|.*\.craigslist\.org\/.*\/.*|my\.opera\.com\/.*\/albums\/show\.dml\?id=.*|my\.opera\.com\/.*\/albums\/showpic\.dml\?album=.*&picture=.*|tumblr\.com\/.*|.*\.tumblr\.com\/post\/.*|www\.polleverywhere\.com\/polls\/.*|www\.polleverywhere\.com\/multiple_choice_polls\/.*|www\.polleverywhere\.com\/free_text_polls\/.*|www\.quantcast\.com\/wd:.*|www\.quantcast\.com\/.*|siteanalytics\.compete\.com\/.*|statsheet\.com\/statplot\/charts\/.*\/.*\/.*\/.*|statsheet\.com\/statplot\/charts\/e\/.*|statsheet\.com\/.*\/teams\/.*\/.*|statsheet\.com\/tools\/chartlets\?chart=.*|.*\.status\.net\/notice\/.*|identi\.ca\/notice\/.*|brainbird\.net\/notice\/.*|shitmydadsays\.com\/notice\/.*|www\.studivz\.net\/Profile\/.*|www\.studivz\.net\/l\/.*|www\.studivz\.net\/Groups\/Overview\/.*|www\.studivz\.net\/Gadgets\/Info\/.*|www\.studivz\.net\/Gadgets\/Install\/.*|www\.studivz\.net\/.*|www\.meinvz\.net\/Profile\/.*|www\.meinvz\.net\/l\/.*|www\.meinvz\.net\/Groups\/Overview\/.*|www\.meinvz\.net\/Gadgets\/Info\/.*|www\.meinvz\.net\/Gadgets\/Install\/.*|www\.meinvz\.net\/.*|www\.schuelervz\.net\/Profile\/.*|www\.schuelervz\.net\/l\/.*|www\.schuelervz\.net\/Groups\/Overview\/.*|www\.schuelervz\.net\/Gadgets\/Info\/.*|www\.schuelervz\.net\/Gadgets\/Install\/.*|www\.schuelervz\.net\/.*|myloc\.me\/.*|pastebin\.com\/.*|pastie\.org\/.*|www\.pastie\.org\/.*|redux\.com\/stream\/item\/.*\/.*|redux\.com\/f\/.*\/.*|www\.redux\.com\/stream\/item\/.*\/.*|www\.redux\.com\/f\/.*\/.*|cl\.ly\/.*|cl\.ly\/.*\/content|speakerdeck\.com\/u\/.*\/p\/.*|www\.kiva\.org\/lend\/.*|www\.timetoast\.com\/timelines\/.*|storify\.com\/.*\/.*|.*meetup\.com\/.*|meetu\.ps\/.*|www\.dailymile\.com\/people\/.*\/entries\/.*|.*\.kinomap\.com\/.*|www\.metacdn\.com\/api\/users\/.*\/content\/.*|www\.metacdn\.com\/api\/users\/.*\/media\/.*|prezi\.com\/.*\/.*|.*\.uservoice\.com\/.*\/suggestions\/.*)/i;var ret=nm._hasFilter('link')&&nm.opener.attr('href')&&nm.opener.attr('href').match(embedlyReg)!==null;if(ret)nm._delFilter('iframe');return ret;},init:function(nm){nm.loadFilter='embedly';nm.store.embedly={};},load:function(nm){$.ajax({url:'http://api.embed.ly/1/oembed',dataType:'jsonp',data:'wmode=transparent&url='+nm.opener.attr('href'),success:function(data){if(data.type=='error')nm._error();else if(data.type=='photo'){nm.filters.push('image');$('<img />').load(function(){nm.elts.cont.addClass('nyroModalImg');nm.elts.hidden.addClass('nyroModalImg');nm._setCont(this);}).error(function(){nm._error();}).attr('src',data.url);}else{nm.store.embedly.w=data.width;nm.store.embedly.h=data.height;nm._setCont('<div>'+data.html+'</div>');}}});},size:function(nm){if(nm.store.embedly.w&&!nm.sizes.h){nm.sizes.w=nm.store.embedly.w;nm.sizes.h=nm.store.embedly.h;}}}});});;
+/*
+ * nyroModal v2.0.0
+ * Core
+ *
+ */
+jQuery(function($,undefined){var $w=$(window),$d=$(document),$b=$('body'),baseHref=$('base').attr('href'),_nmObj={filters:[],callbacks:{},loadFilter:undefined,modal:false,closeOnEscape:true,closeOnClick:true,useKeyHandler:false,showCloseButton:true,closeButton:'<a href="#" class="nyroModalClose nyroModalCloseButton nmReposition" title="close">Close</a>',stack:false,nonStackable:'form',header:undefined,footer:undefined,galleryLoop:true,galleryCounts:true,ltr:true,imageRegex:'[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$',selIndicator:'nyroModalSel',swfObjectId:undefined,swf:{allowFullScreen:'true',allowscriptaccess:'always',wmode:'transparent'},store:{},errorMsg:'An error occured',elts:{all:undefined,bg:undefined,load:undefined,cont:undefined,hidden:undefined},sizes:{initW:undefined,initH:undefined,w:undefined,h:undefined,minW:undefined,minH:undefined,wMargin:undefined,hMargin:undefined},anim:{def:undefined,showBg:undefined,hideBg:undefined,showLoad:undefined,hideLoad:undefined,showCont:undefined,hideCont:undefined,showTrans:undefined,hideTrans:undefined,resize:undefined},_open:false,_bgReady:false,_opened:false,_loading:false,_animated:false,_transition:false,_nmOpener:undefined,_nbContentLoading:0,_scripts:'',_scriptsShown:'',saveObj:function(){this.opener.data('nmObj',this);},open:function(){if(this._nmOpener)this._nmOpener._close();this.getInternal()._pushStack(this.opener);this._opened=false;this._bgReady=false;this._open=true;this._initElts();this._load();this._nbContentLoading=0;this._callAnim('showBg',$.proxy(function(){this._bgReady=true;if(this._nmOpener){this._nmOpener._bgReady=false;this._nmOpener._loading=false;this._nmOpener._animated=false;this._nmOpener._opened=false;this._nmOpener._open=false;this._nmOpener.elts.cont=this._nmOpener.elts.hidden=this._nmOpener.elts.load=this._nmOpener.elts.bg=this._nmOpener.elts.all=undefined;this._nmOpener.saveObj();this._nmOpener=undefined;}this._contentLoading();},this));},resize:function(recalc){if(recalc){this.elts.hidden.append(this.elts.cont.children().first().clone());this.sizes.initW=this.sizes.w=this.elts.hidden.width();this.sizes.initH=this.sizes.h=this.elts.hidden.height();this.elts.hidden.empty();}else{this.sizes.w=this.sizes.initW;this.sizes.h=this.sizes.initH;}this._unreposition();this.size();this._callAnim('resize',$.proxy(function(){this._reposition();},this));},size:function(){var maxHeight=this.getInternal().fullSize.viewH-this.sizes.hMargin,maxWidth=this.getInternal().fullSize.viewW-this.sizes.wMargin;if(this.sizes.minW&&this.sizes.minW>this.sizes.w)this.sizes.w=this.sizes.minW;if(this.sizes.minH&&this.sizes.minH>this.sizes.h)this.sizes.h=this.sizes.minH;if(this.sizes.h>maxHeight||this.sizes.w>maxWidth){this.sizes.h=Math.min(this.sizes.h,maxHeight);this.sizes.w=Math.min(this.sizes.w,maxWidth);}this._callFilters('size');},getForNewLinks:function(elt){var ret;if(this.stack&&(!elt||this.isStackable(elt))){ret=$.extend(true,{},this);ret._nmOpener=undefined;ret.elts.all=undefined;}else{ret=$.extend({},this);ret._nmOpener=this;}ret.filters=[];ret.opener=undefined;ret._open=false;return ret;},isStackable:function(elt){return!elt.is(this.nonStackable);},keyHandle:function(e){this.keyEvent=e;this._callFilters('keyHandle');this.keyEvent=undefined;delete(this.keyEvent);},getInternal:function(){return _internal;},_close:function(){this.getInternal()._removeStack(this.opener);this._opened=false;this._open=false;this._callFilters('close');},close:function(){this._close();this._callFilters('beforeClose');var self=this;this._unreposition();self._callAnim('hideCont',function(){self._callAnim('hideLoad',function(){self._callAnim('hideBg',function(){self._callFilters('afterClose');self.elts.cont.remove();self.elts.hidden.remove();self.elts.load.remove();self.elts.bg.remove();self.elts.all.remove();self.elts.cont=self.elts.hidden=self.elts.load=self.elts.bg=self.elts.all=undefined;});});});},_initElts:function(){if(!this.stack&&this.getInternal().stack.length>1)this.elts=this.getInternal().stack[this.getInternal().stack.length-2]['nmObj'].elts;if(!this.elts.all||this.elts.all.closest('body').length==0)this.elts.all=this.elts.bg=this.elts.cont=this.elts.hidden=this.elts.load=undefined;if(!this.elts.all)this.elts.all=$('<div />').appendTo(this.getInternal()._container);if(!this.elts.bg)this.elts.bg=$('<div />').hide().appendTo(this.elts.all);if(!this.elts.cont)this.elts.cont=$('<div />').hide().appendTo(this.elts.all);if(!this.elts.hidden)this.elts.hidden=$('<div />').hide().appendTo(this.elts.all);this.elts.hidden.empty();if(!this.elts.load)this.elts.load=$('<div />').hide().appendTo(this.elts.all);this._callFilters('initElts');},_error:function(){this._callFilters('error');},_setCont:function(html,selector){if(selector){var tmp=[],i=0;html=html.replace(/\r\n/gi,'nyroModalLN').replace(/<script(.|\s)*?\/script>/gi,function(x){tmp[i]=x;return'<pre class=nyroModalScript rel="'+(i++)+'"></pre>';});var cur=$('<div>'+html+'</div>').find(selector);if(cur.length){html=cur.html().replace(/<pre class="?nyroModalScript"? rel="?(.?)"?><\/pre>/gi,function(x,y,z){return tmp[y];}).replace(/nyroModalLN/gi,"\r\n");}else{this._error();return;}}this.elts.hidden.append(this._filterScripts(html)).prepend(this.header).append(this.footer).wrapInner('<div class="nyroModal'+ucfirst(this.loadFilter)+'" />');this.sizes.initW=this.sizes.w=this.elts.hidden.width();this.sizes.initH=this.sizes.h=this.elts.hidden.height();var outer=this.getInternal()._getOuter(this.elts.cont);this.sizes.hMargin=outer.h.total;this.sizes.wMargin=outer.w.total;this.size();this.loading=false;this._callFilters('filledContent');this._contentLoading();},_filterScripts:function(data){if(typeof data!='string')return data;this._scripts=[];this._scriptsShown=[];var start=0,stStart='<script',stEnd='</script>',endLn=stEnd.length,pos,pos2,tmp;while((pos=data.indexOf(stStart,start))>-1){pos2=data.indexOf(stEnd)+endLn;tmp=$(data.substring(pos,pos2));if(!tmp.attr('src')||tmp.attr('rel')=='forceLoad'){if(tmp.attr('rev')=='shown')this._scriptsShown.push(tmp.get(0));else
+this._scripts.push(tmp.get(0));}data=data.substring(0,pos)+data.substr(pos2);start=pos;}return data;},_hasFilter:function(filter){var ret=false;$.each(this.filters,function(i,f){ret=ret||f==filter;});return ret;},_delFilter:function(filter){this.filters=$.map(this.filters,function(v){if(v!=filter)return v;});},_callFilters:function(fct){this.getInternal()._debug(fct);var ret=[],self=this;$.each(this.filters,function(i,f){ret[f]=self._callFilter(f,fct);});if(this.callbacks[fct]&&$.isFunction(this.callbacks[fct]))this.callbacks[fct](this);return ret;},_callFilter:function(f,fct){if(_filters[f]&&_filters[f][fct]&&$.isFunction(_filters[f][fct]))return _filters[f][fct](this);return undefined;},_callAnim:function(fct,clb){this.getInternal()._debug(fct);this._callFilters('before'+ucfirst(fct));if(!this._animated){this._animated=true;if(!$.isFunction(clb))clb=$.noop;var set=this.anim[fct]||this.anim.def||'basic';if(!_animations[set]||!_animations[set][fct]||!$.isFunction(_animations[set][fct]))set='basic';_animations[set][fct](this,$.proxy(function(){this._animated=false;this._callFilters('after'+ucfirst(fct));clb();},this));}},_load:function(){this.getInternal()._debug('_load');if(!this.loading&&this.loadFilter){this.loading=true;this._callFilter(this.loadFilter,'load');}},_contentLoading:function(){if(!this._animated&&this._bgReady){if(!this._transition&&this.elts.cont.html().length>0)this._transition=true;this._nbContentLoading++;if(!this.loading){if(!this._opened){this._opened=true;if(this._transition){var fct=$.proxy(function(){this._writeContent();this._callFilters('beforeShowCont');this._callAnim('hideTrans',$.proxy(function(){this._transition=false;this._callFilters('afterShowCont');this.elts.cont.append(this._scriptsShown);this._reposition();},this));},this);if(this._nbContentLoading==1){this._unreposition();this._callAnim('showTrans',fct);}else{fct();}}else{this._callAnim('hideLoad',$.proxy(function(){this._writeContent();this._callAnim('showCont',$.proxy(function(){this.elts.cont.append(this._scriptsShown);this._reposition();},this));},this));}}}else if(this._nbContentLoading==1){var outer=this.getInternal()._getOuter(this.elts.load);this.elts.load.css({position:'fixed',top:(this.getInternal().fullSize.viewH-this.elts.load.height()-outer.h.margin)/2,left:(this.getInternal().fullSize.viewW-this.elts.load.width()-outer.w.margin)/2});if(this._transition){this._unreposition();this._callAnim('showTrans',$.proxy(function(){this._contentLoading();},this));}else{this._callAnim('showLoad',$.proxy(function(){this._contentLoading();},this));}}}},_writeContent:function(){this.elts.cont.empty().append(this.elts.hidden.contents()).append(this._scripts).append(this.showCloseButton?this.closeButton:'').css({position:'fixed',width:this.sizes.w,height:this.sizes.h,top:(this.getInternal().fullSize.viewH-this.sizes.h-this.sizes.hMargin)/2,left:(this.getInternal().fullSize.viewW-this.sizes.w-this.sizes.wMargin)/2});},_reposition:function(){var elts=this.elts.cont.find('.nmReposition');if(elts.length){var space=this.getInternal()._getSpaceReposition();elts.each(function(){var me=$(this),offset=me.offset();me.css({position:'fixed',top:offset.top-space.top,left:offset.left-space.left});});this.elts.cont.after(elts);}this.elts.cont.css('overflow','auto');this._callFilters('afterReposition');},_unreposition:function(){this.elts.cont.css('overflow','');var elts=this.elts.all.find('.nmReposition');if(elts.length)this.elts.cont.append(elts.removeAttr('style'));this._callFilters('afterUnreposition');}},_internal={firstInit:true,debug:false,stack:[],fullSize:{w:0,h:0,wW:0,wH:0,viewW:0,viewH:0},nyroModal:function(opts,fullObj){if(_internal.firstInit){_internal._container=$('<div />').appendTo($b);$w.smartresize($.proxy(_internal._resize,_internal));$d.bind('keydown.nyroModal',$.proxy(_internal._keyHandler,_internal));_internal._calculateFullSize();_internal.firstInit=false;}return this.nmInit(opts,fullObj).each(function(){_internal._init($(this).data('nmObj'));});},nmInit:function(opts,fullObj){return this.each(function(){var me=$(this);if(fullObj)me.data('nmObj',$.extend(true,{opener:me},opts));else
+me.data('nmObj',me.data('nmObj')?$.extend(true,me.data('nmObj'),opts):$.extend(true,{opener:me},_nmObj,opts));});},nmCall:function(){return this.trigger('nyroModal');},nmManual:function(url,opts){$('<a href="'+url+'"></a>').nyroModal(opts).trigger('nyroModal');},nmData:function(data,opts){this.nmManual('#',$.extend({data:data},opts));},nmObj:function(opts){$.extend(true,_nmObj,opts);},nmInternal:function(opts){$.extend(true,_internal,opts);},nmAnims:function(opts){$.extend(true,_animations,opts);},nmFilters:function(opts){$.extend(true,_filters,opts);},nmTop:function(){if(_internal.stack.length)return _internal.stack[_internal.stack.length-1]['nmObj'];return undefined;},_debug:function(msg){if(this.debug&&window.console&&window.console.log)window.console.log(msg);},_container:undefined,_init:function(nm){nm.filters=[];$.each(_filters,function(f,obj){if(obj.is&&$.isFunction(obj.is)&&obj.is(nm)){nm.filters.push(f);}});nm._callFilters('initFilters');nm._callFilters('init');nm.opener.unbind('nyroModal.nyroModal nmClose.nyroModal nmResize.nyroModal').bind({'nyroModal.nyroModal':function(e){nm.open();return false;},'nmClose.nyroModal':function(){nm.close();return false;},'nmResize.nyroModal':function(){nm.resize();return false;}});},_scrollWidth:(function(){var scrollbarWidth;if($.browser.msie){var $textarea1=$('<textarea cols="10" rows="2"></textarea>').css({position:'absolute',top:-1000,left:-1000}).appendTo($b),$textarea2=$('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:'absolute',top:-1000,left:-1000}).appendTo($b);scrollbarWidth=$textarea1.width()-$textarea2.width();$textarea1.add($textarea2).remove();}else{var $div=$('<div />').css({width:100,height:100,overflow:'auto',position:'absolute',top:-1000,left:-1000}).prependTo($b).append('<div />').find('div').css({width:'100%',height:200});scrollbarWidth=100-$div.width();$div.parent().remove();}return scrollbarWidth;})(),_selNyroModal:function(obj){return $(obj).data('nmObj')?true:false;},_selNyroModalOpen:function(obj){var me=$(obj);return me.data('nmObj')?me.data('nmObj')._open:false;},_keyHandler:function(e){var nmTop=$.nmTop();if(nmTop&&nmTop.useKeyHandler){return nmTop.keyHandle(e);}},_pushStack:function(obj){this.stack=$.map(this.stack,function(elA){if(elA['nmOpener']!=obj.get(0))return elA;});this.stack.push({nmOpener:obj.get(0),nmObj:$(obj).data('nmObj')});},_removeStack:function(obj){this.stack=$.map(this.stack,function(elA){if(elA['nmOpener']!=obj.get(0))return elA;});},_resize:function(){var opens=$(':nmOpen').each(function(){$(this).data('nmObj')._unreposition();});this._calculateFullSize();opens.trigger('nmResize');},_calculateFullSize:function(){this.fullSize={w:$d.width(),h:$d.height(),wW:$w.width(),wH:$w.height()};this.fullSize.viewW=Math.min(this.fullSize.w,this.fullSize.wW);this.fullSize.viewH=Math.min(this.fullSize.h,this.fullSize.wH);},_getCurCSS:function(elm,name){var ret=parseInt($.curCSS(elm,name,true));return isNaN(ret)?0:ret;},_getOuter:function(elm){elm=elm.get(0);var ret={h:{margin:this._getCurCSS(elm,'marginTop')+this._getCurCSS(elm,'marginBottom'),border:this._getCurCSS(elm,'borderTopWidth')+this._getCurCSS(elm,'borderBottomWidth'),padding:this._getCurCSS(elm,'paddingTop')+this._getCurCSS(elm,'paddingBottom')},w:{margin:this._getCurCSS(elm,'marginLeft')+this._getCurCSS(elm,'marginRight'),border:this._getCurCSS(elm,'borderLeftWidth')+this._getCurCSS(elm,'borderRightWidth'),padding:this._getCurCSS(elm,'paddingLeft')+this._getCurCSS(elm,'paddingRight')}};ret.h.outer=ret.h.margin+ret.h.border;ret.w.outer=ret.w.margin+ret.w.border;ret.h.inner=ret.h.padding+ret.h.border;ret.w.inner=ret.w.padding+ret.w.border;ret.h.total=ret.h.outer+ret.h.padding;ret.w.total=ret.w.outer+ret.w.padding;return ret;},_getSpaceReposition:function(){var outer=this._getOuter($b),ie7=$.browser.msie&&$.browser.version<8&&!(screen.height<=$w.height()+23);return{top:$w.scrollTop()-(!ie7?outer.h.border/2:0),left:$w.scrollLeft()-(!ie7?outer.w.border/2:0)};},_getHash:function(url){if(typeof url=='string'){var hashPos=url.indexOf('#');if(hashPos>-1)return url.substring(hashPos);}return'';},_extractUrl:function(url){var ret={url:undefined,sel:undefined};if(url){var hash=this._getHash(url),hashLoc=this._getHash(window.location.href),curLoc=window.location.href.substring(0,window.location.href.length-hashLoc.length),req=url.substring(0,url.length-hash.length);ret.sel=hash;if(req!=curLoc&&req!=baseHref)ret.url=req;}return ret;}},_animations={basic:{showBg:function(nm,clb){nm.elts.bg.css({opacity:0.7}).show();clb();},hideBg:function(nm,clb){nm.elts.bg.hide();clb();},showLoad:function(nm,clb){nm.elts.load.show();clb();},hideLoad:function(nm,clb){nm.elts.load.hide();clb();},showCont:function(nm,clb){nm.elts.cont.show();clb();},hideCont:function(nm,clb){nm.elts.cont.hide();clb();},showTrans:function(nm,clb){nm.elts.cont.hide();nm.elts.load.show();clb();},hideTrans:function(nm,clb){nm.elts.cont.show();nm.elts.load.hide();clb();},resize:function(nm,clb){nm.elts.cont.css({width:nm.sizes.w,height:nm.sizes.h,top:(nm.getInternal().fullSize.viewH-nm.sizes.h-nm.sizes.hMargin)/2,left:(nm.getInternal().fullSize.viewW-nm.sizes.w-nm.sizes.wMargin)/2});clb();}}},_filters={basic:{is:function(nm){return true;},init:function(nm){if(nm.opener.attr('rev')=='modal')nm.modal=true;if(nm.modal)nm.closeOnEscape=nm.closeOnClick=nm.showCloseButton=false;if(nm.closeOnEscape)nm.useKeyHandler=true;},initElts:function(nm){nm.elts.bg.addClass('nyroModalBg');if(nm.closeOnClick)nm.elts.bg.unbind('click.nyroModal').bind('click.nyroModal',function(e){e.preventDefault();nm.close();});nm.elts.cont.addClass('nyroModalCont');nm.elts.hidden.addClass('nyroModalCont nyroModalHidden');nm.elts.load.addClass('nyroModalCont nyroModalLoad');},error:function(nm){nm.elts.hidden.addClass('nyroModalError');nm.elts.cont.addClass('nyroModalError');nm._setCont(nm.errorMsg);},beforeShowCont:function(nm){nm.elts.cont.find('.nyroModal').each(function(){var cur=$(this);cur.nyroModal(nm.getForNewLinks(cur),true);}).end().find('.nyroModalClose').bind('click.nyroModal',function(e){e.preventDefault();nm.close();});},keyHandle:function(nm){if(nm.keyEvent.keyCode==27&&nm.closeOnEscape){nm.keyEvent.preventDefault();nm.close();}}},custom:{is:function(nm){return true;}}};$.fn.extend({nm:_internal.nyroModal,nyroModal:_internal.nyroModal,nmInit:_internal.nmInit,nmCall:_internal.nmCall});$.extend({nmManual:_internal.nmManual,nmData:_internal.nmData,nmObj:_internal.nmObj,nmInternal:_internal.nmInternal,nmAnims:_internal.nmAnims,nmFilters:_internal.nmFilters,nmTop:_internal.nmTop});$.expr[':'].nyroModal=$.expr[':'].nm=_internal._selNyroModal;$.expr[':'].nmOpen=_internal._selNyroModalOpen;});(function($,sr){var debounce=function(func,threshold,execAsap){var timeout;return function debounced(){var obj=this,args=arguments;function delayed(){if(!execAsap)func.apply(obj,args);timeout=null;};if(timeout)clearTimeout(timeout);else if(execAsap)func.apply(obj,args);timeout=setTimeout(delayed,threshold||100);};};jQuery.fn[sr]=function(fn){return fn?this.bind('resize',debounce(fn)):this.trigger(sr);};})(jQuery,'smartresize');function ucfirst(str){str+='';var f=str.charAt(0).toUpperCase();return f+str.substr(1);}jQuery(function($,undefined){$.nmAnims({fade:{showBg:function(nm,clb){nm.elts.bg.fadeTo(250,0.7,clb);},hideBg:function(nm,clb){nm.elts.bg.fadeOut(clb);},showLoad:function(nm,clb){nm.elts.load.fadeIn(clb);},hideLoad:function(nm,clb){nm.elts.load.fadeOut(clb);},showCont:function(nm,clb){nm.elts.cont.fadeIn(clb);},hideCont:function(nm,clb){nm.elts.cont.css('overflow','hidden').fadeOut(clb);},showTrans:function(nm,clb){nm.elts.load.css({position:nm.elts.cont.css('position'),top:nm.elts.cont.css('top'),left:nm.elts.cont.css('left'),width:nm.elts.cont.css('width'),height:nm.elts.cont.css('height'),marginTop:nm.elts.cont.css('marginTop'),marginLeft:nm.elts.cont.css('marginLeft')}).fadeIn(function(){nm.elts.cont.hide();clb();});},hideTrans:function(nm,clb){nm.elts.cont.css('visibility','hidden').show();nm.elts.load.css('position',nm.elts.cont.css('position')).animate({top:nm.elts.cont.css('top'),left:nm.elts.cont.css('left'),width:nm.elts.cont.css('width'),height:nm.elts.cont.css('height'),marginTop:nm.elts.cont.css('marginTop'),marginLeft:nm.elts.cont.css('marginLeft')},function(){nm.elts.cont.css('visibility','');nm.elts.load.fadeOut(clb);});},resize:function(nm,clb){nm.elts.cont.animate({width:nm.sizes.w,height:nm.sizes.h,top:(nm.getInternal().fullSize.viewH-nm.sizes.h-nm.sizes.hMargin)/2,left:(nm.getInternal().fullSize.viewW-nm.sizes.w-nm.sizes.wMargin)/2},clb);}}});$.nmObj({anim:{def:'fade'}});});jQuery(function($,undefined){$.nmFilters({title:{is:function(nm){return nm.opener.is('[title]');},beforeShowCont:function(nm){var offset=nm.elts.cont.offset();nm.store.title=$('<h1 />',{text:nm.opener.attr('title')}).addClass('nyroModalTitle nmReposition');nm.elts.cont.prepend(nm.store.title);},close:function(nm){if(nm.store.title){nm.store.title.remove();nm.store.title=undefined;delete(nm.store.title);}}}});});jQuery(function($,undefined){$.nmFilters({gallery:{is:function(nm){var ret=nm.opener.is('[rel]:not([rel=external], [rel=nofollow])');if(ret){var rel=nm.opener.attr('rel'),indexSpace=rel.indexOf(' '),gal=indexSpace>0?rel.substr(0,indexSpace):rel,links=$('[href][rel="'+gal+'"], [href][rel^="'+gal+' "]');if(links.length<2)ret=false;if(ret&&nm.galleryCounts&&!nm._hasFilter('title'))nm.filters.push('title');}return ret;},init:function(nm){nm.useKeyHandler=true;},keyHandle:function(nm){if(!nm._animated&&nm._opened){if(nm.keyEvent.keyCode==39||nm.keyEvent.keyCode==40){nm.keyEvent.preventDefault();nm._callFilters('galleryNext');}else if(nm.keyEvent.keyCode==37||nm.keyEvent.keyCode==38){nm.keyEvent.preventDefault();nm._callFilters('galleryPrev');}}},initElts:function(nm){var rel=nm.opener.attr('rel'),indexSpace=rel.indexOf(' ');nm.store.gallery=indexSpace>0?rel.substr(0,indexSpace):rel;nm.store.galleryLinks=$('[href][rel="'+nm.store.gallery+'"], [href][rel^="'+nm.store.gallery+' "]');nm.store.galleryIndex=nm.store.galleryLinks.index(nm.opener);},beforeShowCont:function(nm){if(nm.galleryCounts&&nm.store.title&&nm.store.galleryLinks&&nm.store.galleryLinks.length>1){var curTitle=nm.store.title.html();nm.store.title.html((curTitle.length?curTitle+' - ':'')+(nm.store.galleryIndex+1)+'/'+nm.store.galleryLinks.length);}},filledContent:function(nm){var link=this._getGalleryLink(nm,-1),append=nm.elts.hidden.find(' > div');if(link){$('<a />',{text:'previous',href:'#'}).addClass('nyroModalPrev').bind('click',function(e){e.preventDefault();nm._callFilters('galleryPrev');}).appendTo(append);}link=this._getGalleryLink(nm,1);if(link){$('<a />',{text:'next',href:'#'}).addClass('nyroModalNext').bind('click',function(e){e.preventDefault();nm._callFilters('galleryNext');}).appendTo(append);}},close:function(nm){nm.store.gallery=undefined;nm.store.galleryLinks=undefined;nm.store.galleryIndex=undefined;delete(nm.store.gallery);delete(nm.store.galleryLinks);delete(nm.store.galleryIndex);if(nm.elts.cont)nm.elts.cont.find('.nyroModalNext, .nyroModalPrev').remove();},galleryNext:function(nm){this._getGalleryLink(nm,1).nyroModal(nm.getForNewLinks(),true).click();},galleryPrev:function(nm){this._getGalleryLink(nm,-1).nyroModal(nm.getForNewLinks(),true).click();},_getGalleryLink:function(nm,dir){if(nm.store.gallery){if(!nm.ltr)dir*=-1;var index=nm.store.galleryIndex+dir;if(nm.store.galleryLinks&&index>=0&&index<nm.store.galleryLinks.length)return nm.store.galleryLinks.eq(index);else if(nm.galleryLoop&&nm.store.galleryLinks)return nm.store.galleryLinks.eq(index<0?nm.store.galleryLinks.length-1:0);}return undefined;}}});});jQuery(function($,undefined){$.nmFilters({link:{is:function(nm){var ret=nm.opener.is('[href]');if(ret)nm.store.link=nm.getInternal()._extractUrl(nm.opener.attr('href'));return ret;},init:function(nm){nm.loadFilter='link';nm.opener.unbind('click.nyroModal').bind('click.nyroModal',function(e){e.preventDefault();nm.opener.trigger('nyroModal');});},load:function(nm){$.ajax({url:nm.store.link.url,data:nm.store.link.sel?[{name:nm.selIndicator,value:nm.store.link.sel.substring(1)}]:undefined,success:function(data){nm._setCont(data,nm.store.link.sel);},error:function(){nm._error();}});}}});});jQuery(function($,undefined){$.nmFilters({dom:{is:function(nm){return nm._hasFilter('link')&&!nm.store.link.url&&nm.store.link.sel;},init:function(nm){nm.loadFilter='dom';},load:function(nm){nm.store.domEl=$(nm.store.link.sel);if(nm.store.domEl.length)nm._setCont(nm.store.domEl.contents());else
+nm._error();},close:function(nm){if(nm.store.domEl&&nm.elts.cont)nm.store.domEl.append(nm.elts.cont.find('.nyroModalDom').contents());}}});});jQuery(function($,undefined){$.nmFilters({data:{is:function(nm){var ret=nm.data?true:false;if(ret){nm._delFilter('dom');}return ret;},init:function(nm){nm.loadFilter='data';},load:function(nm){nm._setCont(nm.data);}}});});jQuery(function($,undefined){$.nmFilters({image:{is:function(nm){return(new RegExp(nm.imageRegex,'i')).test(nm.opener.attr('href'));},init:function(nm){nm.loadFilter='image';},load:function(nm){var url=nm.opener.attr('href');$('<img />').load(function(){nm.elts.cont.addClass('nyroModalImg');nm.elts.hidden.addClass('nyroModalImg');nm._setCont(this);}).error(function(){nm._error();}).attr('src',url);},size:function(nm){if(nm.sizes.w!=nm.sizes.initW||nm.sizes.h!=nm.sizes.initH){var ratio=Math.min(nm.sizes.w/nm.sizes.initW,nm.sizes.h/nm.sizes.initH);nm.sizes.w=nm.sizes.initW*ratio;nm.sizes.h=nm.sizes.initH*ratio;}var img=nm.loading?nm.elts.hidden.find('img'):nm.elts.cont.find('img');img.attr({width:nm.sizes.w,height:nm.sizes.h});},close:function(nm){if(nm.elts.cont){nm.elts.cont.removeClass('nyroModalImg');nm.elts.hidden.removeClass('nyroModalImg');}}}});});jQuery(function($,undefined){$.nmFilters({swf:{idCounter:1,is:function(nm){return nm._hasFilter('link')&&nm.opener.is('[href$=".swf"]');},init:function(nm){nm.loadFilter='swf';},load:function(nm){if(!nm.swfObjectId)nm.swfObjectId='nyroModalSwf-'+(this.idCounter++);var url=nm.store.link.url,cont='<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+nm.swfObjectId+'" width="'+nm.sizes.w+'" height="'+nm.sizes.h+'"><param name="movie" value="'+url+'"></param>',tmp='';$.each(nm.swf,function(name,val){cont+='<param name="'+name+'" value="'+val+'"></param>';tmp+=' '+name+'="'+val+'"';});cont+='<embed src="'+url+'" type="application/x-shockwave-flash" width="'+nm.sizes.w+'" height="'+nm.sizes.h+'"'+tmp+'></embed></object></div>';nm._setCont(cont);}}});});jQuery(function($,undefined){$.nmFilters({form:{is:function(nm){var ret=nm.opener.is('form');if(ret)nm.store.form=nm.getInternal()._extractUrl(nm.opener.attr('action'));return ret;},init:function(nm){nm.loadFilter='form';nm.opener.unbind('submit.nyroModal').bind('submit.nyroModal',function(e){e.preventDefault();nm.opener.trigger('nyroModal');});},load:function(nm){var data=nm.opener.serializeArray();if(nm.store.form.sel)data.push({name:nm.selIndicator,value:nm.store.form.sel.substring(1)});$.ajax({url:nm.store.form.url,data:data,type:nm.opener.attr('method')?nm.opener.attr('method'):'get',success:function(data){nm._setCont(data,nm.store.form.sel);},error:function(){nm._error();}});}}});});jQuery(function($,undefined){$.nmFilters({formFile:{is:function(nm){var ret=nm.opener.is('form[enctype="multipart/form-data"]');if(ret){nm._delFilter('form');if(!nm.store.form)nm.store.form=nm.getInternal()._extractUrl(nm.opener.attr('action'));}return ret;},init:function(nm){nm.loadFilter='formFile';nm.store.formFileLoading=false;nm.opener.unbind('submit.nyroModal').bind('submit.nyroModal',function(e){if(!nm.store.formFileIframe){e.preventDefault();nm.opener.trigger('nyroModal');}else{nm.store.formFileLoading=true;}});},initElts:function(nm){var inputSel;if(nm.store.form.sel)inputSel=$('<input />',{'type':'hidden',name:nm.selIndicator,value:nm.store.form.sel.substring(1)}).appendTo(nm.opener);function rmFormFileElts(){if(inputSel){inputSel.remove();inputSel=undefined;delete(inputSel);}nm.store.formFileIframe.attr('src','about:blank').remove();nm.store.formFileIframe=undefined;delete(nm.store.formFileIframe);}nm.store.formFileIframe=$('<iframe name="nyroModalFormFile" src="javascript:\'\';" id="nyromodal-iframe-'+(new Date().getTime())+'"></iframe>').hide().load(function(){if(nm.store.formFileLoading){nm.store.formFileLoading=false;var content=nm.store.formFileIframe.unbind('load error').contents().find('body').not('script[src]');if(content&&content.html()&&content.html().length){rmFormFileElts();nm._setCont(content.html(),nm.store.form.sel);}else{var nbTry=0;fct=function(){nbTry++;var content=nm.store.formFileIframe.unbind('load error').contents().find('body').not('script[src]');if(content&&content.html()&&content.html().length){nm._setCont(content.html(),nm.store.form.sel);rmFormFileElts();}else if(nbTry<5){setTimeout(fct,25);}else{rmFormFileElts();nm._error();}};setTimeout(fct,25);}}}).error(function(){rmFormFileElts();nm._error();});nm.elts.all.append(nm.store.formFileIframe);nm.opener.attr('target','nyroModalFormFile').submit();},close:function(nm){nm.store.formFileLoading=false;if(nm.store.formFileIframe){nm.store.formFileIframe.remove();nm.store.formFileIframe=undefined;delete(nm.store.formFileIframe);}}}});});jQuery(function($,undefined){$.nmFilters({iframe:{is:function(nm){var target=nm.opener.attr('target')||'',rel=nm.opener.attr('rel')||'',opener=nm.opener.get(0);return!nm._hasFilter('image')&&(target.toLowerCase()=='_blank'||rel.toLowerCase().indexOf('external')>-1||(opener.hostname&&opener.hostname.replace(/:\d*$/,'')!=window.location.hostname.replace(/:\d*$/,'')));},init:function(nm){nm.loadFilter='iframe';},load:function(nm){nm.store.iframe=$('<iframe src="javascript:\'\';" id="nyromodal-iframe-'+(new Date().getTime())+'" frameborder="0"></iframe>');nm._setCont(nm.store.iframe);},afterShowCont:function(nm){nm.store.iframe.attr('src',nm.opener.attr('href'));},close:function(nm){if(nm.store.iframe){nm.store.iframe.remove();nm.store.iframe=undefined;delete(nm.store.iframe);}}}});});jQuery(function($,undefined){$.nmFilters({iframeForm:{is:function(nm){var ret=nm._hasFilter('iframe')&&nm.opener.is('form');if(ret){nm._delFilter('iframe');nm._delFilter('form');}return ret;},init:function(nm){nm.loadFilter='iframeForm';nm.store.iframeFormLoading=false;nm.store.iframeFormOrgTarget=nm.opener.attr('target');nm.opener.unbind('submit.nyroModal').bind('submit.nyroModal',function(e){if(!nm.store.iframeFormIframe){e.preventDefault();nm.opener.trigger('nyroModal');}else{nm.store.iframeFormLoading=true;}});},load:function(nm){nm.store.iframeFormIframe=$('<iframe name="nyroModalIframeForm" src="javascript:\'\';" id="nyromodal-iframe-'+(new Date().getTime())+'"></iframe>');nm._setCont(nm.store.iframeFormIframe);},afterShowCont:function(nm){nm.opener.attr('target','nyroModalIframeForm').submit();},close:function(nm){nm.store.iframeFormOrgTarget?nm.opener.attr('target',nm.store.iframeFormOrgTarget):nm.opener.removeAttr('target');delete(nm.store.formFileLoading);delete(nm.store.iframeFormOrgTarget);if(nm.store.iframeFormIframe){nm.store.iframeFormIframe.remove();nm.store.iframeFormIframe=undefined;delete(nm.store.iframeFormIframe);}}}});});jQuery(function($,undefined){$.nmObj({embedlyUrl:'http://api.embed.ly/1/oembed',embedly:{key:undefined,wmode:'transparent',allowscripts:true,format:'json'}});var cache=[];$.nmFilters({embedly:{is:function(nm){if(nm._hasFilter('link')&&nm._hasFilter('iframe')&&nm.opener.attr('href')&&nm.embedly.key){if(cache[nm.opener.attr('href')]){nm.store.embedly=cache[nm.opener.attr('href')];nm._delFilter('iframe');return true;}nm.store.embedly=false;var data=nm.embedly;data.url=nm.opener.attr('href');$.ajax({url:nm.embedlyUrl,dataType:'jsonp',data:data,success:function(data){if(data.type!='error'){nm.store.embedly=data;cache[nm.opener.attr('href')]=data;nm._delFilter('iframe');nm.filters.push('embedly');nm._callFilters('initFilters');nm._callFilters('init');}}});}return false;},init:function(nm){nm.loadFilter='embedly';},load:function(nm){if(nm.store.embedly.type=='photo'){nm.filters.push('image');$('<img />').load(function(){nm.elts.cont.addClass('nyroModalImg');nm.elts.hidden.addClass('nyroModalImg');nm._setCont(this);}).error(function(){nm._error();}).attr('src',nm.store.embedly.url);}else{nm._setCont('<div>'+nm.store.embedly.html+'</div>');}},size:function(nm){if(nm.store.embedly.width&&!nm.sizes.height){nm.sizes.w=nm.store.embedly.width;nm.sizes.h=nm.store.embedly.height;}}}});});
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/js/projectscontents.js	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/static/ldt/js/projectscontents.js	Wed Nov 30 10:44:15 2011 +0100
@@ -1,4 +1,4 @@
-
+
 $.fn.realVal = function() {
     var obj = $(this[0]);
     if(obj.val) {
@@ -176,12 +176,12 @@
         filters: ['iframe'],
         sizes: {
             minW: 730,
-            minH: 480
+            minH: 840
         },
         closeOnClick:false,
         callbacks: {
             afterClose: function(nm) {
-                searchCallback($('#searchprojectsinput'), "#contentslistcontainer", content_filter_url);
+                searchCallback($('#searchprojectsinput'), "#contentslistcontainer", content_filter_url, 0);
             },
             afterShowCont: function(nm) {
                 nm.store.iframe.load(function() {
@@ -192,7 +192,7 @@
                 });                
 
                 nm.store.iframe.width(730);
-                nm.store.iframe.height(470);
+                nm.store.iframe.height(830);
             }
         }
     });
@@ -266,7 +266,7 @@
             },
             afterClose: function(nm) {
                 // Can't do that because searchprojectfilterurl is not defined in init_events_base params
-                searchCallback($('#searchprojectsinput'), "#projectslistcontainer", searchprojectfilterurl, 0);
+            	searchCallback($('#searchprojectsinput'), "#projectslistcontainer", searchprojectfilterurl, 0);
             }
         }
     });
@@ -282,10 +282,9 @@
 function init_events_base_projects(base_node, embed_url, searchprojectfilterurl, publishprojecturl, unpublishprojecturl) {
 
     init_modal_window ('.ldt_link_open_ldt', 1035, 670, 1025, 660, base_node, searchprojectfilterurl);
-    init_modal_window ('.ldt_link_create_project', 520, 660, 510, 650, base_node, searchprojectfilterurl);
+    init_modal_window ('.ldt_link_create_project', 950, 700, 940, 690, base_node, searchprojectfilterurl);
     init_modal_window ('.ldt_link_copy_project', 500, 150, 500, 150, base_node, searchprojectfilterurl);
-
-     
+    
     $('.publishedproject', base_node).click(function(e) {
         e.preventDefault();
         display_loading_icon($(this));
@@ -332,8 +331,8 @@
     $('.projecttitlelink').nyroModal({
         filters: ['iframe'],
         sizes: {
-            minW: '520',
-            minH: '700'
+            minW: '950',
+            minH: '710'
         },
         closeOnClick:false,
         callbacks: {
@@ -349,8 +348,8 @@
                     }
                   });
 
-                nm.store.iframe.width(510);
-                nm.store.iframe.height(690);
+                nm.store.iframe.width(940);
+                nm.store.iframe.height(740);
             }
         }
     });
@@ -361,6 +360,50 @@
 	project.attr('src', LDT_MEDIA_PREFIX + "img/ajax-loader-transp.gif");
 }
 
+function init_events_group (base_node, embed_url, groupfilterurl) {
+		
+    $('.create_group',base_node).each(function(i){
+        $(this).attr("target","_iri");
+    });
+
+    $('.create_group',base_node).nyroModal({
+        filters: ['iriIframe'],
+        sizes: {
+            minW: '520',
+            minH: '530'
+        },
+        showCloseButton: true,
+        closeOnEscape:false,
+        closeOnClick:false,
+        callbacks: {
+            afterShowCont: function(nm) {
+                var iframe = nm.store.iframe;
+                iframe.load(function(){
+                    var form_status = $(this).contents().find("#project_form_status").val(); 
+                    if(form_status === 'saved' || form_status === 'deleted' ) {
+                        $.nmTop().close();
+                    }
+                        
+                });  
+                nm.store.iframe.width(510);
+                nm.store.iframe.height(520);
+            },
+            afterClose: function(nm) {
+            	searchCallback($("#searchprojectsinput"), $("#groupslistcontainer"), groupfilterurl, 0);
+            }
+        }
+    });
+    
+    
+    $('.create_group',base_node).each(function(i, e) {
+        nm = $(e).data('nmObj');
+        $(e).data('nmObj', $.extend(true, nm, {
+            close: testAndClose(nm.close)
+        }));
+    });
+    
+}
+
 function init_events_projects(base_node, embed_url, searchprojectfilterurl, publishprojecturl, unpublishprojecturl) {
     init_events_base(base_node, embed_url);
     init_events_base_projects(base_node, embed_url, searchprojectfilterurl, publishprojecturl, unpublishprojecturl);
@@ -371,6 +414,7 @@
     init_events_base_projects(base_node, embed_url, searchprojectfilterurl, publishprojecturl, unpublishprojecturl);
 }
 
+
 function searchFieldInit(input_list_init) {
 
     $(".searchfieldinputbase").keydown(function (e) {
--- a/src/ldt/ldt/templates/ldt/ldt_raw_base.html	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/templates/ldt/ldt_raw_base.html	Wed Nov 30 10:44:15 2011 +0100
@@ -13,6 +13,27 @@
     <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">
+    function check_uncheck_all(name) {
+    	var check_all = '{% trans "check all" %}';
+    	var uncheck_all = '{% trans "uncheck all" %}';
+    	var id_name = "#global_checkbox_" + name;
+    	
+    	$(id_name).attr('title', uncheck_all);
+    	
+    	$(id_name).change(function () {
+    		var checkbox_names = ".checkbox_" + name;
+    		if ($(id_name).is(":checked")) {
+    			$(checkbox_names).prop('checked', true);
+    			$(id_name).attr('title', uncheck_all );
+    		} else {
+    			$(checkbox_names).prop('checked', false);
+    			$(id_name).attr('title', check_all);
+    		}
+    		$(checkbox_names).trigger("change");
+    	});		
+    }
+    </script>
     {% endblock %}
     
     {% block css_declaration %}
--- a/src/ldt/ldt/user/admin.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/user/admin.py	Wed Nov 30 10:44:15 2011 +0100
@@ -1,11 +1,22 @@
 from copy import deepcopy #@UnresolvedImport
 from django.contrib import admin
 from django.contrib.auth.admin import UserAdmin
+from django.contrib.auth.models import Group, User
 from django.utils.translation import ugettext as _
 from forms import LdtForm
-from models import Ldt
+from guardian.admin import GuardedModelAdmin
+from models import Ldt, UserProfile
+
+class GroupAdmin(GuardedModelAdmin):
+    pass
 
-class LdtAdmin(UserAdmin):    
+class UserProfileInline(admin.StackedInline):
+    model = UserProfile
+    
+class UserProfileAdmin(UserAdmin):
+    inlines = [UserProfileInline, ]
+
+class LdtAdmin(UserProfileAdmin):    
     list_display = ('username', 'email', 'first_name', 'last_name')
     
     fieldsets = [
@@ -17,6 +28,7 @@
     form = LdtForm
     model = Ldt
     filter_horizontal = ('user_permissions',)
+    inlines = [UserProfileInline, ]
     
     def get_fieldsets(self, request, obj=None): 
         fieldsets = deepcopy(self.fieldsets)
@@ -26,7 +38,15 @@
         return fieldsets
         
     def add_view(self, request):
-        return super(UserAdmin, self).add_view(request)               
-        
-admin.site.unregister(Ldt)
+        return super(UserAdmin, self).add_view(request)  
+    
+    
+
+admin.site.unregister(Group)
+admin.site.register(Group, GroupAdmin)
+
+admin.site.unregister(Ldt) 
 admin.site.register(Ldt, LdtAdmin)
+
+admin.site.unregister(User)
+admin.site.register(User, UserProfileAdmin)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/user/migrations/0005_auto__add_field_userprofile_is_regular.py	Wed Nov 30 10:44:15 2011 +0100
@@ -0,0 +1,71 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        
+        # Adding field 'UserProfile.is_regular'
+        db.add_column('user_userprofile', 'is_regular', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
+
+
+    def backwards(self, orm):
+        
+        # Deleting field 'UserProfile.is_regular'
+        db.delete_column('user_userprofile', 'is_regular')
+
+
+    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'})
+        },
+        'user.ldt': {
+            'Meta': {'object_name': 'Ldt', '_ormbases': ['auth.User']},
+            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
+        },
+        'user.userprofile': {
+            'Meta': {'object_name': 'UserProfile'},
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'is_regular': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'language': ('django.db.models.fields.CharField', [], {'default': "'fr'", 'max_length': '2'}),
+            'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
+        }
+    }
+
+    complete_apps = ['user']
--- a/src/ldt/ldt/user/models.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/src/ldt/ldt/user/models.py	Wed Nov 30 10:44:15 2011 +0100
@@ -1,8 +1,9 @@
 from django.conf import settings
 from django.contrib import admin
-from django.contrib.auth.models import User, UserManager
+from django.contrib.auth.models import User, UserManager, Group
 from django.db import models
 from django.db.models.signals import post_save
+from django.utils.translation import ugettext as _
 import datetime
 
             
@@ -27,18 +28,20 @@
         else:
             new_user.set_unusable_password()
         new_user.save()
-        return new_user  
+        new_user.groups.add(Group.objects.get(name=settings.PUBLIC_GROUP_NAME))
+        return new_user   
     
     
 class UserProfile (models.Model): 
     user = models.OneToOneField(User)
     language = models.CharField(max_length=2, default=settings.LANGUAGE_CODE[:2])
+    is_regular = models.BooleanField(default=False, help_text=_("Designates whether the user can create and leave groups."))
 
     @staticmethod
     def create_user_profile(sender, instance, created, **kwargs):
         if created:
             UserProfile.objects.create(user=instance)
-
+       
 
 post_save.connect(UserProfile.create_user_profile, sender=User)
    
--- a/virtualenv/res/lib/lib_create_env.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/virtualenv/res/lib/lib_create_env.py	Wed Nov 30 10:44:15 2011 +0100
@@ -30,6 +30,7 @@
     'DJANGO_OPENID_CONSUMER': {'setup':'django_openid_consumer', 'url':'http://pypi.python.org/packages/source/d/django-openid-consumer/django-openid-consumer-0.1.1.tar.gz', 'local':"django-openid-consumer-0.1.1.tar.gz"},
     'SOCIAL_AUTH': {'setup':'social_auth', 'url':'https://github.com/omab/django-social-auth/tarball/v0.3.10', 'local':"omab-django-social-auth-v0.3.10-modified.tar.gz"},
     'SOUTH': { 'setup': 'South', 'url':'http://www.aeracode.org/releases/south/south-0.7.3.tar.gz', 'local':"south-0.7.3.tar.gz"},
+    'DJANGO_GUARDIAN' : { 'setup': 'django-guardian', 'url':'http://pypi.python.org/packages/source/d/django-guardian/django-guardian-1.0.3.tar.gz', 'local':"django-guardian-1.0.3.tar.gz"},
 }
 
 if system_str == 'Windows':
Binary file virtualenv/res/src/django-guardian-1.0.3.tar.gz has changed
--- a/virtualenv/web/res/res_create_env.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/virtualenv/web/res/res_create_env.py	Wed Nov 30 10:44:15 2011 +0100
@@ -37,6 +37,7 @@
     ('OPENID', 'pip', None, None),
     ('DJANGO_OPENID_CONSUMER', 'pip', None, None),
     ('SOCIAL_AUTH', 'easy_install', None, None),
+    ('DJANGO_GUARDIAN', 'pip', None, None),
 ])
 
 if system_str == "Darwin":
--- a/web/ldtplatform/config.py.tmpl	Wed Nov 23 11:12:31 2011 +0100
+++ b/web/ldtplatform/config.py.tmpl	Wed Nov 30 10:44:15 2011 +0100
@@ -82,3 +82,7 @@
 EMPTY_MEDIA_EXTERNALID = None
 
 AUTO_INDEX_AFTER_SAVE = True
+
+USE_GROUP_PERMISSIONS = ['Project', 'Content'] 
+FORBIDDEN_STREAM_URL = "empty-video"
+PUBLIC_GROUP_NAME = 'everyone'
--- a/web/ldtplatform/settings.py	Wed Nov 23 11:12:31 2011 +0100
+++ b/web/ldtplatform/settings.py	Wed Nov 30 10:44:15 2011 +0100
@@ -88,6 +88,7 @@
     'django.contrib.messages.middleware.MessageMiddleware',
     'django_openid_consumer.middleware.OpenIDMiddleware',
     'ldt.ldt_utils.middleware.userprofile.LanguageMiddleware',
+    'ldt.security.middleware.SecurityMiddleware',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = ( 
@@ -138,6 +139,7 @@
     'piston',
     'social_auth',
     'south',
+    'guardian',
 )
 
 AUTH_PROFILE_MODULE = 'user.UserProfile'
@@ -162,6 +164,7 @@
 #    'social_auth.backends.contrib.orkut.OrkutBackend',
     'social_auth.backends.OpenIDBackend',
     'django.contrib.auth.backends.ModelBackend',
+    'guardian.backends.ObjectPermissionBackend',
 )
 SOCIAL_AUTH_IMPORT_BACKENDS = (
     'myproy.social_auth_extra_services',
@@ -202,6 +205,8 @@
 
 AUTO_INDEX_AFTER_SAVE = True
 
+ANONYMOUS_USER_ID = -1
+
 WEB_VERSION = ldtplatform.get_version()
 
 from config import *