Content edit window is not displayed when content is not editable
authorverrierj
Wed, 23 Nov 2011 15:42:07 +0100
changeset 248 bc86d130b834
parent 247 f98f1a6e15f1
child 249 5c5fab6d8ae8
Content edit window is not displayed when content is not editable
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html
src/ldt/ldt/ldt_utils/views.py
src/ldt/ldt/locale/en/LC_MESSAGES/django.po
src/ldt/ldt/locale/fr/LC_MESSAGES/django.po
src/ldt/ldt/static/ldt/js/projectscontents.js
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html	Wed Nov 23 13:55:23 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html	Wed Nov 23 15:42:07 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 class="contenttitlelink qtiplink" {% if content.change %} href="{% url ldt.ldt_utils.views.write_content iri_id=content.iri_id %}" data-title="{{ content.title}}"  data-desc="{{ content.description }}" {% else %} data-title="{% trans "You can't edit this content" %}" data-desc=""{% endif %}>{{ content.title|default:"_" }}</a></td>
 		</tr>
 	{% endfor %}
 		</tbody>
--- a/src/ldt/ldt/ldt_utils/views.py	Wed Nov 23 13:55:23 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/views.py	Wed Nov 23 15:42:07 2011 +0100
@@ -46,9 +46,13 @@
 
 @login_required
 def workspace(request):
+    checker = ObjectPermissionChecker(request.user)
     
     # list of contents
     content_list = Content.safe_objects.all() #@UndefinedVariable
+    for c in content_list:
+        if checker.has_perm('ldt_utils.change_content', c):
+            c.change = True
 
     # get list of projects owned by the current user
     project_list = Project.safe_objects.filter(owner=request.user) #@UndefinedVariable
@@ -177,7 +181,7 @@
         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},
                               context_instance=RequestContext(request))
@@ -191,7 +195,13 @@
         content_list = Content.safe_objects.filter(title__icontains=filter) #@UndefinedVariable
     else:
         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))
@@ -524,7 +534,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:
@@ -1069,7 +1079,7 @@
                 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
+                content, created = Content.safe_objects.get_or_create(iri_id=content_form.cleaned_data['iri_id'], defaults=content_defaults) #@UndefinedVariable
                 if created:
                     assign('change_content', request.user, content)
                     assign('view_content', request.user, content)                
@@ -1152,7 +1162,7 @@
         iri_id = request.REQUEST.get("iri_id", None)
         
     if iri_id:
-        Content.objects_safe.filter(iri_id=iri_id).delete() #@UndefinedVariable
+        Content.safe_objects.get(iri_id=iri_id).delete() #@UndefinedVariable
 
 
 def upload(request):
--- a/src/ldt/ldt/locale/en/LC_MESSAGES/django.po	Wed Nov 23 13:55:23 2011 +0100
+++ b/src/ldt/ldt/locale/en/LC_MESSAGES/django.po	Wed Nov 23 15:42:07 2011 +0100
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-09 13:01+0100\n"
+"POT-Creation-Date: 2011-11-23 14:15+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"
@@ -33,7 +33,7 @@
 msgid "all"
 msgstr "all"
 
-#: .\ldt_utils\forms.py:35 .\ldt_utils\models.py:40
+#: .\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"
@@ -54,7 +54,7 @@
 msgid "Display the results in Lignes De Temps"
 msgstr "Display the results in Lignes De Temps"
 
-#: .\ldt_utils\forms.py:49 .\ldt_utils\models.py:109
+#: .\ldt_utils\forms.py:49 .\ldt_utils\models.py:125
 msgid "content.content_creation_date"
 msgstr "content creation date"
 
@@ -82,95 +82,95 @@
 msgid "none_media"
 msgstr "no media"
 
-#: .\ldt_utils\models.py:29
+#: .\ldt_utils\models.py:36
 msgid "media.external_id"
 msgstr "external id"
 
-#: .\ldt_utils\models.py:30
+#: .\ldt_utils\models.py:37
 msgid "media.external_permalink"
 msgstr "media permalink"
 
-#: .\ldt_utils\models.py:31
+#: .\ldt_utils\models.py:38
 msgid "media.external_publication_url"
 msgstr "media publication url"
 
-#: .\ldt_utils\models.py:32
+#: .\ldt_utils\models.py:39
 msgid "media.external_src_url"
 msgstr "media external source url"
 
-#: .\ldt_utils\models.py:33
+#: .\ldt_utils\models.py:40
 msgid "media.creation_date"
 msgstr "media object creation date"
 
-#: .\ldt_utils\models.py:34
+#: .\ldt_utils\models.py:41
 msgid "media.media_creation_date"
 msgstr "media creation date"
 
-#: .\ldt_utils\models.py:35
+#: .\ldt_utils\models.py:42
 msgid "media.update_date"
 msgstr "update date"
 
-#: .\ldt_utils\models.py:36
+#: .\ldt_utils\models.py:43
 msgid "media.videopath"
 msgstr "videopath"
 
-#: .\ldt_utils\models.py:37
+#: .\ldt_utils\models.py:44
 msgid "media.duration"
 msgstr "duration (ms)"
 
-#: .\ldt_utils\models.py:38
+#: .\ldt_utils\models.py:45
 msgid "media.creator"
 msgstr "media creator"
 
-#: .\ldt_utils\models.py:39
+#: .\ldt_utils\models.py:46
 msgid "description"
 msgstr "description"
 
-#: .\ldt_utils\models.py:41
+#: .\ldt_utils\models.py:48
 msgid "media.src"
 msgstr "media source"
 
-#: .\ldt_utils\models.py:42
+#: .\ldt_utils\models.py:49
 msgid "media.mimetype"
 msgstr "mimetype"
 
-#: .\ldt_utils\models.py:101
+#: .\ldt_utils\models.py:117
 msgid "content.iri_id"
 msgstr "iri id"
 
-#: .\ldt_utils\models.py:102
+#: .\ldt_utils\models.py:118
 msgid "content.iriurl"
 msgstr "iri url"
 
-#: .\ldt_utils\models.py:103
+#: .\ldt_utils\models.py:119
 msgid "content.creation_date"
 msgstr "content creation date"
 
-#: .\ldt_utils\models.py:104
+#: .\ldt_utils\models.py:120
 msgid "content.update_date"
 msgstr "content update date"
 
-#: .\ldt_utils\models.py:105
+#: .\ldt_utils\models.py:121
 msgid "content.title"
 msgstr "title"
 
-#: .\ldt_utils\models.py:106
+#: .\ldt_utils\models.py:122
 msgid "content.description"
 msgstr "description"
 
-#: .\ldt_utils\models.py:107
+#: .\ldt_utils\models.py:123
 msgid "content.authors"
 msgstr "authors"
 
-#: .\ldt_utils\models.py:108
+#: .\ldt_utils\models.py:124
 msgid "content.duration"
 msgstr "duration (ms)"
 
-#: .\ldt_utils\models.py:308
+#: .\ldt_utils\models.py:324
 msgid "created by"
 msgstr "created by"
 
-#: .\ldt_utils\models.py:309
+#: .\ldt_utils\models.py:325
 msgid "changed by"
 msgstr "changed by"
 
@@ -178,65 +178,65 @@
 msgid "Personal cutting"
 msgstr "Personal cutting"
 
-#: .\ldt_utils\views.py:117 .\ldt_utils\views.py:590 .\ldt_utils\views.py:636
+#: .\ldt_utils\views.py:125 .\ldt_utils\views.py:617 .\ldt_utils\views.py:663
 msgid "You can not access this project"
 msgstr "You can not access this project"
 
-#: .\ldt_utils\views.py:261
+#: .\ldt_utils\views.py:277
 msgid "Please enter valid keywords."
 msgstr "Please enter valid keywords."
 
-#: .\ldt_utils\views.py:808
+#: .\ldt_utils\views.py:830
 #, 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:809
+#: .\ldt_utils\views.py:831
 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:810
+#: .\ldt_utils\views.py:832
 msgid "title error deleting project"
 msgstr "Error when deleting project"
 
-#: .\ldt_utils\views.py:812
+#: .\ldt_utils\views.py:834
 #, python-format
 msgid "please confirm deleting project %(title)s"
 msgstr "Please confirm deleting project %(title)s"
 
-#: .\ldt_utils\views.py:813
+#: .\ldt_utils\views.py:835
 msgid "confirm deletion"
 msgstr "Confirm deletion"
 
-#: .\ldt_utils\views.py:1009
+#: .\ldt_utils\views.py:1035
 msgid "Problem when downloading file from url : "
 msgstr "Problem when downloading file from url: "
 
-#: .\ldt_utils\views.py:1012
+#: .\ldt_utils\views.py:1038
 msgid "Problem when uploading file : "
 msgstr "Problem when uploading file: "
 
-#: .\ldt_utils\views.py:1081
+#: .\ldt_utils\views.py:1109
 #, 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:1082
+#: .\ldt_utils\views.py:1110
 msgid "title error deleting content"
 msgstr "Error when deleting content"
 
-#: .\ldt_utils\views.py:1084
+#: .\ldt_utils\views.py:1112
 #, python-format
 msgid "Confirm delete content %(titles)s"
 msgstr "Confirm delete content %(titles)s"
 
-#: .\ldt_utils\views.py:1085
+#: .\ldt_utils\views.py:1113
 msgid "confirm delete content"
 msgstr "Confirm delete content"
 
-#: .\ldt_utils\views.py:1119
+#: .\ldt_utils\views.py:1147
 #, python-format
 msgid ""
 "Content '%(title)s' is referenced by this project : %(project_titles)s. "
@@ -293,7 +293,7 @@
 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:149
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:99
 msgid "Title"
 msgstr "Title"
 
@@ -345,8 +345,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_group.html.py:110
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:228
+#: .\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"
@@ -359,125 +359,94 @@
 msgid "write"
 msgstr "Write"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:29
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:53
+#: .\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_group.html.py:30
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:54
+#: .\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_group.html.py:72
+#: .\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_group.html.py:72
+#: .\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_group.html.py:76
+#: .\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_group.html.py:81
-#, fuzzy
+#: .\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_group.html.py:92
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:169
+#: .\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_group.html.py:93
+#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:94
 msgid "admin"
 msgstr ""
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:98
+#: .\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:100
+#: .\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:112
+#: .\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:113
+#: .\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:115
+#: .\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:145
+#: .\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:145
+#: .\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:151
+#: .\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:155
+#: .\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:188
-#, fuzzy
-msgid "group list"
-msgstr "Projects"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:201
-msgid "nom"
-msgstr ""
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:202
-#: .\user\admin.py:15
-msgid "Permissions"
-msgstr "Permissions"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:212
-msgid "This group can read the project"
-msgstr "This group can read the project"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:212
-msgid "perm.read"
-msgstr "read"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:213
-msgid "This group can change the project"
-msgstr "You can change the project"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:213
-msgid "perm.write"
-msgstr "write"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:230
+#: .\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:231
+#: .\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:233
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:144
 msgid "create_project"
 msgstr "Create new project"
 
@@ -540,22 +509,22 @@
 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\groups.html.py:78
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:77
 #, fuzzy
 msgid "Change this group"
 msgstr "Create a group"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:81
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:80
 #, fuzzy
 msgid "Leave this group"
 msgstr "Create a group"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:94
+#: .\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:96
+#: .\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:71
 #: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:56
@@ -649,6 +618,40 @@
 msgid "preview media"
 msgstr "preview media"
 
+#: .\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\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:15
+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:17
 msgid "copy project"
 msgstr "Copy your project"
--- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po	Wed Nov 23 13:55:23 2011 +0100
+++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po	Wed Nov 23 15:42:07 2011 +0100
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-09 13:00+0100\n"
+"POT-Creation-Date: 2011-11-23 14:12+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"
@@ -33,7 +33,7 @@
 msgid "all"
 msgstr "tous"
 
-#: .\ldt_utils\forms.py:35 .\ldt_utils\models.py:40
+#: .\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"
@@ -54,7 +54,7 @@
 msgid "Display the results in Lignes De Temps"
 msgstr "Afficher les résultats dans Lignes De Temps"
 
-#: .\ldt_utils\forms.py:49 .\ldt_utils\models.py:109
+#: .\ldt_utils\forms.py:49 .\ldt_utils\models.py:125
 msgid "content.content_creation_date"
 msgstr "Date de création du contenu"
 
@@ -82,95 +82,95 @@
 msgid "none_media"
 msgstr "Aucun"
 
-#: .\ldt_utils\models.py:29
+#: .\ldt_utils\models.py:36
 msgid "media.external_id"
 msgstr "id externe"
 
-#: .\ldt_utils\models.py:30
+#: .\ldt_utils\models.py:37
 msgid "media.external_permalink"
 msgstr "permalien externe"
 
-#: .\ldt_utils\models.py:31
+#: .\ldt_utils\models.py:38
 msgid "media.external_publication_url"
 msgstr "url de publication externe"
 
-#: .\ldt_utils\models.py:32
+#: .\ldt_utils\models.py:39
 msgid "media.external_src_url"
 msgstr "url source"
 
-#: .\ldt_utils\models.py:33
+#: .\ldt_utils\models.py:40
 msgid "media.creation_date"
 msgstr "Date de création"
 
-#: .\ldt_utils\models.py:34
+#: .\ldt_utils\models.py:41
 msgid "media.media_creation_date"
 msgstr "Date de création du média"
 
-#: .\ldt_utils\models.py:35
+#: .\ldt_utils\models.py:42
 msgid "media.update_date"
 msgstr "Date de maj"
 
-#: .\ldt_utils\models.py:36
+#: .\ldt_utils\models.py:43
 msgid "media.videopath"
 msgstr "videopath"
 
-#: .\ldt_utils\models.py:37
+#: .\ldt_utils\models.py:44
 msgid "media.duration"
 msgstr "Durée du contenu (ms)"
 
-#: .\ldt_utils\models.py:38
+#: .\ldt_utils\models.py:45
 msgid "media.creator"
 msgstr "Créateur"
 
-#: .\ldt_utils\models.py:39
+#: .\ldt_utils\models.py:46
 msgid "description"
 msgstr "description"
 
-#: .\ldt_utils\models.py:41
+#: .\ldt_utils\models.py:48
 msgid "media.src"
 msgstr "Sources"
 
-#: .\ldt_utils\models.py:42
+#: .\ldt_utils\models.py:49
 msgid "media.mimetype"
 msgstr "mimetype"
 
-#: .\ldt_utils\models.py:101
+#: .\ldt_utils\models.py:117
 msgid "content.iri_id"
 msgstr "iri id"
 
-#: .\ldt_utils\models.py:102
+#: .\ldt_utils\models.py:118
 msgid "content.iriurl"
 msgstr "iri url"
 
-#: .\ldt_utils\models.py:103
+#: .\ldt_utils\models.py:119
 msgid "content.creation_date"
 msgstr "date de création"
 
-#: .\ldt_utils\models.py:104
+#: .\ldt_utils\models.py:120
 msgid "content.update_date"
 msgstr "Date de maj"
 
-#: .\ldt_utils\models.py:105
+#: .\ldt_utils\models.py:121
 msgid "content.title"
 msgstr "titre"
 
-#: .\ldt_utils\models.py:106
+#: .\ldt_utils\models.py:122
 msgid "content.description"
 msgstr "Description"
 
-#: .\ldt_utils\models.py:107
+#: .\ldt_utils\models.py:123
 msgid "content.authors"
 msgstr "Auteurs"
 
-#: .\ldt_utils\models.py:108
+#: .\ldt_utils\models.py:124
 msgid "content.duration"
 msgstr "Durée (ms)"
 
-#: .\ldt_utils\models.py:308
+#: .\ldt_utils\models.py:324
 msgid "created by"
 msgstr "créé par"
 
-#: .\ldt_utils\models.py:309
+#: .\ldt_utils\models.py:325
 msgid "changed by"
 msgstr "modifié par"
 
@@ -178,66 +178,66 @@
 msgid "Personal cutting"
 msgstr "Découpages personnels"
 
-#: .\ldt_utils\views.py:117 .\ldt_utils\views.py:590 .\ldt_utils\views.py:636
+#: .\ldt_utils\views.py:125 .\ldt_utils\views.py:617 .\ldt_utils\views.py:663
 msgid "You can not access this project"
 msgstr "vous n'avez pas l'autorisation d'accéder à ce projet"
 
-#: .\ldt_utils\views.py:261
+#: .\ldt_utils\views.py:277
 msgid "Please enter valid keywords."
 msgstr "Veuillez entrer des mots-clés valides."
 
-#: .\ldt_utils\views.py:808
+#: .\ldt_utils\views.py:830
 #, 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:809
+#: .\ldt_utils\views.py:831
 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:810
+#: .\ldt_utils\views.py:832
 msgid "title error deleting project"
 msgstr "Erreur lors de l'effacement du projet"
 
-#: .\ldt_utils\views.py:812
+#: .\ldt_utils\views.py:834
 #, python-format
 msgid "please confirm deleting project %(title)s"
 msgstr "Confirmer l'effacement du projet intitulé %(title)s"
 
-#: .\ldt_utils\views.py:813
+#: .\ldt_utils\views.py:835
 msgid "confirm deletion"
 msgstr "Confirmation d'effacement"
 
-#: .\ldt_utils\views.py:1009
+#: .\ldt_utils\views.py:1035
 msgid "Problem when downloading file from url : "
 msgstr "Problème lors du téléchargement du fichier : "
 
-#: .\ldt_utils\views.py:1012
+#: .\ldt_utils\views.py:1038
 msgid "Problem when uploading file : "
 msgstr "Problème lors de l'upload du fichier : "
 
-#: .\ldt_utils\views.py:1081
+#: .\ldt_utils\views.py:1109
 #, 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:1082
+#: .\ldt_utils\views.py:1110
 msgid "title error deleting content"
 msgstr "Erreur lors de l'effacement du contenu"
 
-#: .\ldt_utils\views.py:1084
+#: .\ldt_utils\views.py:1112
 #, python-format
 msgid "Confirm delete content %(titles)s"
 msgstr "Veuillez confirmer l'effacement du contenu %(titles)s"
 
-#: .\ldt_utils\views.py:1085
+#: .\ldt_utils\views.py:1113
 msgid "confirm delete content"
 msgstr "Confirmation effacement contenu"
 
-#: .\ldt_utils\views.py:1119
+#: .\ldt_utils\views.py:1147
 #, python-format
 msgid ""
 "Content '%(title)s' is referenced by this project : %(project_titles)s. "
@@ -294,7 +294,7 @@
 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:149
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:99
 msgid "Title"
 msgstr "Titre"
 
@@ -345,8 +345,8 @@
 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:110
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:228
+#: .\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"
@@ -359,119 +359,90 @@
 msgid "write"
 msgstr "Enregistrer"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:29
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:53
+#: .\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:30
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:54
+#: .\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:72
+#: .\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:72
+#: .\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:76
+#: .\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:81
+#: .\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:92
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:169
+#: .\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:93
+#: .\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:98
+#: .\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:100
+#: .\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:112
+#: .\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:113
+#: .\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:115
+#: .\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:145
+#: .\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:145
+#: .\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:151
+#: .\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:155
+#: .\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:188
-msgid "group list"
-msgstr "Liste des groupes"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:201
-msgid "nom"
-msgstr "nom"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:202
-#: .\user\admin.py:15
-msgid "Permissions"
-msgstr "Permissions"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:212
-msgid "This group can read the project"
-msgstr "Ce groupe peut lire le projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:212
-msgid "perm.read"
-msgstr "lecture"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:213
-msgid "This group can change the project"
-msgstr "Ce groupe peut changer le projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:213
-msgid "perm.write"
-msgstr "écriture"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:230
+#: .\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:231
+#: .\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:233
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:144
 msgid "create_project"
 msgstr "Créer un nouveau projet Ligne de Temps"
 
@@ -532,19 +503,19 @@
 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:78
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:77
 msgid "Change this group"
 msgstr "Modifier ce groupe"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:81
+#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:80
 msgid "Leave this group"
 msgstr "Quitter ce groupe"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:94
+#: .\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:96
+#: .\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:71
 #: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:56
@@ -638,6 +609,39 @@
 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\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:15
+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:17
 msgid "copy project"
 msgstr "Copier votre projet"
--- a/src/ldt/ldt/static/ldt/js/projectscontents.js	Wed Nov 23 13:55:23 2011 +0100
+++ b/src/ldt/ldt/static/ldt/js/projectscontents.js	Wed Nov 23 15:42:07 2011 +0100
@@ -53,13 +53,13 @@
         });
     });
     
-    $('.cellimgdiv img, .publishedproject, .unpublishedproject, .grouplink').qtip({
+    $('.cellimgdiv img, .qtiplink, .grouplink, .publishedproject, .unpublishedproject').qtip({
     	style: {
     		classes: 'ui-tooltip-dark ui-tooltip-rounded'
     	}    	
     });
     
-    $('.projectinfos').each( function () {
+    $('.projectinfos, .qtiplink').each( function () {
         var desc = $(this).attr('data-desc');
         if (desc == 'None') {
             desc = '';
@@ -115,7 +115,7 @@
                 data: "filename="+ $('#id_media-local_file_name',$.nmTop().store.iframe.contents()).val(),
                 cache: false,
                 success: function(data, status, request){
-                    //alert("remove success");
+                    alert("remove success");
                 }
             });
         }
@@ -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);
             }
         }
     });