--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html Wed Dec 21 11:07:49 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/permissions.html Thu Dec 22 13:59:03 2011 +0100
@@ -37,7 +37,7 @@
<div id="shareproject" class="clear">
- + Share this project
+{% trans "share" %}
</div>
<input type="hidden" name="share" value="False" id="id_share"/>
--- a/src/ldt/ldt/ldt_utils/views.py Wed Dec 21 11:07:49 2011 +0100
+++ b/src/ldt/ldt/ldt_utils/views.py Thu Dec 22 13:59:03 2011 +0100
@@ -843,7 +843,9 @@
user = request.user
project = Project.create_project(title=form.cleaned_data['title'], user=user, contents=contents, description=form.cleaned_data['description'])
form_status = "saved"
- assign_perm_to_obj(project, form.cleaned_data["read_list"], form.cleaned_data["write_list"], user)
+
+ if form.cleaned_data["share"]:
+ assign_perm_to_obj(project, form.cleaned_data["read_list"], form.cleaned_data["write_list"], user)
# Modal window is not used with firefox
is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
@@ -896,7 +898,8 @@
project.ldt = lxml.etree.tostring(ldt, pretty_print=True)
project.save()
- assign_perm_to_obj(project, form.cleaned_data["read_list"], form.cleaned_data["write_list"], request.user)
+ if form.cleaned_data["share"]:
+ assign_perm_to_obj(project, form.cleaned_data["read_list"], form.cleaned_data["write_list"], request.user)
form_status = "saved"
else:
form = AddProjectForm({'title':unicode(project.title), 'description':unicode(project.get_description())})
@@ -1119,7 +1122,7 @@
cached_assign('view_content', everyone, content)
if media:
cached_assign('view_media', everyone, media)
- else:
+ elif content_form.cleaned_data["share"]:
remove_perm('view_content', everyone, content)
assign_perm_to_obj(content, content_form.cleaned_data['read_list'], content_form.cleaned_data['write_list'], request.user)
if media:
Binary file src/ldt/ldt/locale/en/LC_MESSAGES/django.mo has changed
--- a/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Wed Dec 21 11:07:49 2011 +0100
+++ b/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Thu Dec 22 13:59:03 2011 +0100
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-16 17:58+0100\n"
+"POT-Creation-Date: 2011-12-21 11:19+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"
@@ -178,61 +178,61 @@
msgid "Personal cutting"
msgstr "Personal cutting"
-#: .\ldt_utils\views.py:120 .\ldt_utils\views.py:651 .\ldt_utils\views.py:697
+#: .\ldt_utils\views.py:120 .\ldt_utils\views.py:653 .\ldt_utils\views.py:699
msgid "You can not access this project"
msgstr "You can not access this project"
-#: .\ldt_utils\views.py:870
+#: .\ldt_utils\views.py:872
#, 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:871
+#: .\ldt_utils\views.py:873
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:872
+#: .\ldt_utils\views.py:874
msgid "title error deleting project"
msgstr "Error when deleting project"
-#: .\ldt_utils\views.py:874
+#: .\ldt_utils\views.py:876
#, python-format
msgid "please confirm deleting project %(title)s"
msgstr "Please confirm deleting project %(title)s"
-#: .\ldt_utils\views.py:875
+#: .\ldt_utils\views.py:877
msgid "confirm deletion"
msgstr "Confirm deletion"
-#: .\ldt_utils\views.py:1063
+#: .\ldt_utils\views.py:1065
msgid "Problem when downloading file from url : "
msgstr "Problem when downloading file from url: "
-#: .\ldt_utils\views.py:1066
+#: .\ldt_utils\views.py:1068
msgid "Problem when uploading file : "
msgstr "Problem when uploading file: "
-#: .\ldt_utils\views.py:1157
+#: .\ldt_utils\views.py:1159
#, 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:1158
+#: .\ldt_utils\views.py:1160
msgid "title error deleting content"
msgstr "Error when deleting content"
-#: .\ldt_utils\views.py:1160
+#: .\ldt_utils\views.py:1162
#, python-format
msgid "Confirm delete content %(titles)s"
msgstr "Confirm delete content %(titles)s"
-#: .\ldt_utils\views.py:1161
+#: .\ldt_utils\views.py:1163
msgid "confirm delete content"
msgstr "Confirm delete content"
-#: .\ldt_utils\views.py:1199
+#: .\ldt_utils\views.py:1201
#, python-format
msgid ""
"Content '%(title)s' is referenced by this project : %(project_titles)s. "
@@ -289,7 +289,7 @@
msgstr "Copy your project"
#: .\ldt_utils\templates\ldt\ldt_utils\copy_ldt.html.py:17
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:97
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:76
msgid "Title"
msgstr "Title"
@@ -337,7 +337,7 @@
#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:137
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:137
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:149
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:121
#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:52
msgid "close_cancel"
msgstr "Close"
@@ -364,7 +364,7 @@
msgstr "Name"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:89
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:15
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:50
#, fuzzy
msgid "User list"
msgstr "User details"
@@ -376,38 +376,38 @@
#: .\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
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:16
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:51
#: .\templates\ldt\ldt_base.html.py:123
msgid "search"
msgstr "search"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:96
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:22
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:57
msgid "select all"
msgstr "select all"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:101
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:27
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:62
msgid "select users"
msgstr "select users"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:102
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:28
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:63
msgid "remove users"
msgstr "remove users"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:107
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:33
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:68
msgid "Members list"
msgstr "Members list"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:115
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:41
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:76
msgid "remove all"
msgstr "remove all"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:118
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:42
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:77
msgid "Decide whether a user user can change this group"
msgstr "Decide whether a user user can change this group"
@@ -432,47 +432,39 @@
msgid "create_group"
msgstr "Create a group"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:36
-msgid "share this project"
-msgstr "share this project"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:37
-msgid "do not share"
-msgstr "do not share this project"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:91
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:70
msgid "Update your project"
msgstr "Create your project"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:91
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:70
msgid "Create your project"
msgstr "Create your project"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:102
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:81
#, fuzzy
msgid "Description :"
msgstr "description"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:107
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:86
msgid "List of contents"
msgstr "List of contents"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:121
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:100
#: .\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:151
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:123
msgid "delete_project"
msgstr "delete project"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:152
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:124
msgid "update_project"
msgstr "update project"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:154
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:126
msgid "create_project"
msgstr "Create new project"
@@ -642,12 +634,20 @@
msgid "Projects shared with me only"
msgstr "Projects shared with me only"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:42
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:9
+msgid "share"
+msgstr "share with other users"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:10
+msgid "do not share"
+msgstr "do not share"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:77
#, fuzzy
msgid "can change"
msgstr "Password change"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:43
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:78
#, fuzzy
msgid "can not change"
msgstr "Password change"
Binary file src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo has changed
--- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Wed Dec 21 11:07:49 2011 +0100
+++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Thu Dec 22 13:59:03 2011 +0100
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-16 17:57+0100\n"
+"POT-Creation-Date: 2011-12-21 11:19+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"
@@ -178,62 +178,62 @@
msgid "Personal cutting"
msgstr "Découpages personnels"
-#: .\ldt_utils\views.py:120 .\ldt_utils\views.py:651 .\ldt_utils\views.py:697
+#: .\ldt_utils\views.py:120 .\ldt_utils\views.py:653 .\ldt_utils\views.py:699
msgid "You can not access this project"
msgstr "vous n'avez pas l'autorisation d'accéder à ce projet"
-#: .\ldt_utils\views.py:870
+#: .\ldt_utils\views.py:872
#, 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:871
+#: .\ldt_utils\views.py:873
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:872
+#: .\ldt_utils\views.py:874
msgid "title error deleting project"
msgstr "Erreur lors de l'effacement du projet"
-#: .\ldt_utils\views.py:874
+#: .\ldt_utils\views.py:876
#, python-format
msgid "please confirm deleting project %(title)s"
msgstr "Confirmer l'effacement du projet intitulé %(title)s"
-#: .\ldt_utils\views.py:875
+#: .\ldt_utils\views.py:877
msgid "confirm deletion"
msgstr "Confirmation d'effacement"
-#: .\ldt_utils\views.py:1063
+#: .\ldt_utils\views.py:1065
msgid "Problem when downloading file from url : "
msgstr "Problème lors du téléchargement du fichier : "
-#: .\ldt_utils\views.py:1066
+#: .\ldt_utils\views.py:1068
msgid "Problem when uploading file : "
msgstr "Problème lors de l'upload du fichier : "
-#: .\ldt_utils\views.py:1157
+#: .\ldt_utils\views.py:1159
#, 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:1158
+#: .\ldt_utils\views.py:1160
msgid "title error deleting content"
msgstr "Erreur lors de l'effacement du contenu"
-#: .\ldt_utils\views.py:1160
+#: .\ldt_utils\views.py:1162
#, python-format
msgid "Confirm delete content %(titles)s"
msgstr "Veuillez confirmer l'effacement du contenu %(titles)s"
-#: .\ldt_utils\views.py:1161
+#: .\ldt_utils\views.py:1163
msgid "confirm delete content"
msgstr "Confirmation effacement contenu"
-#: .\ldt_utils\views.py:1199
+#: .\ldt_utils\views.py:1201
#, python-format
msgid ""
"Content '%(title)s' is referenced by this project : %(project_titles)s. "
@@ -290,7 +290,7 @@
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:97
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:76
msgid "Title"
msgstr "Titre"
@@ -337,7 +337,7 @@
#: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:137
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:137
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:149
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:121
#: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:52
msgid "close_cancel"
msgstr "Fermer"
@@ -364,7 +364,7 @@
msgstr "Nom"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:89
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:15
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:50
msgid "User list"
msgstr "Liste des utilisateurs"
@@ -375,38 +375,38 @@
#: .\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
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:16
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:51
#: .\templates\ldt\ldt_base.html.py:123
msgid "search"
msgstr "Recherche"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:96
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:22
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:57
msgid "select all"
msgstr "Tout choisir"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:101
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:27
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:62
msgid "select users"
msgstr "choisir des utilisateurs"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:102
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:28
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:63
msgid "remove users"
msgstr "enlever des utilisateurs"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:107
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:33
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:68
msgid "Members list"
msgstr "liste des membres"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:115
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:41
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:76
msgid "remove all"
msgstr "tout enlever"
#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:118
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:42
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:77
msgid "Decide whether a user user can change this group"
msgstr "Précise si cet utilisateur peut créer et modifier ce groupe."
@@ -430,46 +430,38 @@
msgid "create_group"
msgstr "Créer un nouveau groupe"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:36
-msgid "share this project"
-msgstr "partager ce projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:37
-msgid "do not share"
-msgstr "ne pas partager ce projet"
-
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:91
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:70
msgid "Update your project"
msgstr "Mettre à jour votre projet Lignes de Temps"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:91
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:70
msgid "Create your project"
msgstr "Créer votre projet Lignes de Temps"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:102
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:81
msgid "Description :"
msgstr "Description :"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:107
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:86
msgid "List of contents"
msgstr "Liste de contenus"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:121
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:100
#: .\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:151
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:123
msgid "delete_project"
msgstr "Effacer"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:152
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:124
msgid "update_project"
msgstr "Mettre à jour"
-#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:154
+#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:126
msgid "create_project"
msgstr "Créer un nouveau projet Ligne de Temps"
@@ -635,12 +627,24 @@
msgid "Projects shared with me only"
msgstr "Projets partagés avec moi uniquement"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:42
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:9
+msgid "share"
+msgstr "partager avec d'autres utilisateurs"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:10
+msgid "do not share"
+msgstr "ne pas partager"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:41
+msgid "share this project"
+msgstr "partager ce projet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:77
#, fuzzy
msgid "can change"
msgstr "Modification du mot de passe"
-#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:43
+#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:78
#, fuzzy
msgid "can not change"
msgstr "Modification du mot de passe"