--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/update_db_0_13_to_0_16.1.sql Tue Sep 21 06:34:28 2010 +0200
@@ -0,0 +1,5 @@
+ALTER TABLE ldt_utils_content
+ ADD COLUMN tags character varying(2048);
+
+ALTER TABLE ldt_utils_content ADD COLUMN "media_obj_id" integer REFERENCES "ldt_utils_media" ("id") DEFERRABLE INITIALLY DEFERRED;
+CREATE INDEX "ldt_utils_content_media_obj_id" ON "ldt_utils_content" ("media_obj_id");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/update_db_0_13_to_0_16.2.py Tue Sep 21 06:34:28 2010 +0200
@@ -0,0 +1,32 @@
+#! /usr/bin/env python
+
+import sys, os, os.path, time, tempfile, uuid
+
+sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../web/")
+
+from django.core.management import setup_environ
+from franceculture import settings
+
+setup_environ(settings)
+
+from franceculture.settings import *
+
+from ldt.ldt_utils.model import Content, Media
+
+
+from django.db import connection, transaction
+cursor = connection.cursor()
+
+# Data retrieval operation - no commit required
+cursor.execute("SELECT id,external_id, videopath, src FROM ldt_utils_content", None)
+
+
+for row in cursor.fetchall():
+ new_media = Media(external_id = row[1], videopath=row[2], src=row[3])
+ new_media.save()
+
+ content = Content.objects.get(id=row[0])
+ content.media_obj = new_media
+
+ content.save()
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/update_db_0_13_to_0_16.3.sql Tue Sep 21 06:34:28 2010 +0200
@@ -0,0 +1,3 @@
+ALTER TABLE ldt_utils_content DROP COLUMN videopath;
+ALTER TABLE ldt_utils_content DROP COLUMN external_id;
+ALTER TABLE ldt_utils_content DROP COLUMN src;
--- a/sql/update_db_0_13_to_0_16.sql Tue Sep 21 04:27:08 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-ALTER TABLE ldt_utils_content
- ADD COLUMN tags character varying(2048);
-
-ALTER TABLE ldt_utils_content DROP COLUMN videopath;
-ALTER TABLE ldt_utils_content DROP COLUMN external_id;
-ALTER TABLE ldt_utils_content DROP COLUMN src;
-
-ALTER TABLE ldt_utils_content ADD COLUMN "media_obj_id" integer REFERENCES "ldt_utils_media" ("id") DEFERRABLE INITIALLY DEFERRED;
-CREATE INDEX "ldt_utils_content_media_obj_id" ON "ldt_utils_content" ("media_obj_id");
--- a/web/franceculture/__init__.py Tue Sep 21 04:27:08 2010 +0200
+++ b/web/franceculture/__init__.py Tue Sep 21 06:34:28 2010 +0200
@@ -1,4 +1,4 @@
-VERSION = (0, 15, 0, "final", 0)
+VERSION = (0, 16, 0, "final", 0)
VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
--- a/web/franceculture/locale/fr/LC_MESSAGES/django.po Tue Sep 21 04:27:08 2010 +0200
+++ b/web/franceculture/locale/fr/LC_MESSAGES/django.po Tue Sep 21 06:34:28 2010 +0200
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-12 22:52+0200\n"
+"POT-Creation-Date: 2010-09-20 22:09-0500\n"
"PO-Revision-Date: 2010-02-17 02:57+0100\n"
"Last-Translator: Yves-Marie Haussonne <ymh.work@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -22,20 +22,17 @@
#: templates/base.html:44
msgid "home"
-msgstr ""
+msgstr "acceuil"
#: templates/base.html:45
-#, fuzzy
msgid "contents"
msgstr "Liste des contenus"
#: templates/base.html:46
-#, fuzzy
msgid "indexation projects"
msgstr "Créer un projet"
#: templates/base.html:47
-#, fuzzy
msgid "accounts"
msgstr "Créer un compte"
@@ -51,7 +48,7 @@
msgid "Langue"
msgstr "Langue"
-#: templates/franceculture/embed_popup.html:56
+#: templates/franceculture/embed_popup.html:51
msgid "clik here to see the project content"
msgstr "cliquer ici pour voir le contenu du projet"
@@ -65,7 +62,7 @@
#: templates/ldt/ldt_utils/content_list.html:52
#: templates/ldt/ldt_utils/ldt_list.html:79
msgid "search"
-msgstr ""
+msgstr "Recherche"
#: templates/franceculture/workspace.html:60
#: templates/ldt/ldt_utils/ldt_list.html:77
@@ -76,7 +73,7 @@
#: templates/franceculture/partial/projectslist.html:3
#: templates/ldt/ldt_utils/create_ldt.html:30
msgid "name"
-msgstr ""
+msgstr "Nom"
#: templates/franceculture/partial/contentslist.html:11
msgid "create project"
@@ -84,21 +81,20 @@
#: templates/franceculture/partial/contentslist.html:12
msgid "preview media"
-msgstr ""
+msgstr "preview"
#: templates/franceculture/partial/contentslist.html:21
-#: templates/ldt/ldt_utils/create_content.html:31
-#, fuzzy
+#: templates/ldt/ldt_utils/create_content.html:61
msgid "Create content"
msgstr "Créer un compte"
#: templates/franceculture/partial/projectslist.html:14
msgid "Project published, click to unpublish"
-msgstr ""
+msgstr "Projet publié, cliquer pour de-publier"
#: templates/franceculture/partial/projectslist.html:16
msgid "Project not published, click to publish"
-msgstr ""
+msgstr "Projet non publié, cliquer pour publier"
#: templates/franceculture/partial/projectslist.html:20
msgid "open ldt"
@@ -117,6 +113,26 @@
msgid "Create project"
msgstr "Créer un projet"
+#: templates/ldt/ldt_utils/create_content.html:40
+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:"
+
+
+#: templates/ldt/ldt_utils/create_content.html:51
+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:"
+
+
#: templates/ldt/ldt_utils/create_ldt.html:23
#, fuzzy
msgid "Create your project"
@@ -124,15 +140,15 @@
#: templates/ldt/ldt_utils/create_ldt.html:26
msgid "Title"
-msgstr ""
+msgstr "Titre"
#: templates/ldt/ldt_utils/create_ldt.html:28
msgid "List of contents"
-msgstr ""
+msgstr "Liste des Médias"
#: templates/ldt/ldt_utils/create_ldt.html:47
msgid "Create"
-msgstr ""
+msgstr "Créer"
#: templates/ldt/user/login_form.html:33 templates/registration/login.html:14
msgid "Log in"
--- a/web/ldt/ldt_utils/models.py Tue Sep 21 04:27:08 2010 +0200
+++ b/web/ldt/ldt_utils/models.py Tue Sep 21 06:34:28 2010 +0200
@@ -168,6 +168,28 @@
return locals()
src = property(**src())
+
+ def externalid(): #@NoSelf
+ doc = """simulate externalid""" #@UnusedVariable
+
+ def fget(self):
+ if self.media_obj is None:
+ empty_media = self.__get_empty_media()
+ if empty_media:
+ return empty_media.externalid
+ else:
+ return None
+ else:
+ return self.media_obj.externalid
+
+ def fset(self, value):
+ if self.media_obj is not None:
+ self.media_obj.externalid = value
+
+ return locals()
+
+ externalid = property(**externalid())
+
class Project(Document):
--- a/web/ldt/locale/en/LC_MESSAGES/django.po Tue Sep 21 04:27:08 2010 +0200
+++ b/web/ldt/locale/en/LC_MESSAGES/django.po Tue Sep 21 06:34:28 2010 +0200
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-12 23:04+0200\n"
+"POT-Creation-Date: 2010-09-21 05:10+0200\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,61 +24,127 @@
msgid "Time"
msgstr ""
-#: ldt_utils/models.py:22
-msgid "content.iri_id"
+#: ldt_utils/forms.py:43 ldt_utils/models.py:59
+msgid "content.content_creation_date"
+msgstr ""
+
+#: ldt_utils/forms.py:44
+#, fuzzy
+msgid "content.media_input_type"
+msgstr "Documentation"
+
+#: ldt_utils/forms.py:44
+msgid "file_upload"
+msgstr ""
+
+#: ldt_utils/forms.py:44
+msgid "url"
+msgstr ""
+
+#: ldt_utils/forms.py:44
+msgid "existing_media"
+msgstr ""
+
+#: ldt_utils/forms.py:44
+#, fuzzy
+msgid "create_media"
+msgstr "created by"
+
+#: ldt_utils/forms.py:44
+msgid "none_media"
msgstr ""
#: ldt_utils/models.py:23
-msgid "content.iriurl"
+msgid "media.external_id"
msgstr ""
#: ldt_utils/models.py:24
-msgid "content.src"
+msgid "content.external_permalink"
+msgstr ""
+
+#: ldt_utils/models.py:25 ldt_utils/models.py:26
+msgid "content.external_publication_url"
+msgstr ""
+
+#: ldt_utils/models.py:27
+msgid "media.creation_date"
+msgstr ""
+
+#: ldt_utils/models.py:28
+msgid "media.media_creation_date"
+msgstr ""
+
+#: ldt_utils/models.py:29
+msgid "media.update_date"
+msgstr ""
+
+#: ldt_utils/models.py:30
+msgid "media.videopath"
msgstr ""
-#: ldt_utils/models.py:25
-msgid "content.videopath"
+#: ldt_utils/models.py:31
+#, fuzzy
+msgid "media.duration"
+msgstr "Documentation"
+
+#: ldt_utils/models.py:32
+msgid "media.creator"
msgstr ""
-#: ldt_utils/models.py:26
+#: ldt_utils/models.py:33
+#, fuzzy
+msgid "description"
+msgstr "Login"
+
+#: ldt_utils/models.py:34
+#: ldt_utils/templates/ldt/ldt_utils/content_list.html:69
+#: ldt_utils/templates/ldt/ldt_utils/ldt_list.html:64
+msgid "title"
+msgstr "Title"
+
+#: ldt_utils/models.py:35
+msgid "media.src"
+msgstr ""
+
+#: ldt_utils/models.py:48
+msgid "content.iri_id"
+msgstr ""
+
+#: ldt_utils/models.py:49
+msgid "content.iriurl"
+msgstr ""
+
+#: ldt_utils/models.py:52
msgid "content.creation_date"
msgstr ""
-#: ldt_utils/models.py:27
+#: ldt_utils/models.py:53
msgid "content.update_date"
msgstr ""
-#: ldt_utils/models.py:28
+#: ldt_utils/models.py:54
msgid "content.title"
msgstr ""
-#: ldt_utils/models.py:29
+#: ldt_utils/models.py:55
#, fuzzy
msgid "content.description"
msgstr "Login"
-#: ldt_utils/models.py:30
-msgid "content.external_id"
-msgstr ""
-
-#: ldt_utils/models.py:31
+#: ldt_utils/models.py:57
msgid "content.authors"
msgstr ""
-#: ldt_utils/models.py:32
+#: ldt_utils/models.py:58
#, fuzzy
msgid "content.duration"
msgstr "Documentation"
-#: ldt_utils/models.py:33
-msgid "content.content_creation_date"
-msgstr ""
-
-#: ldt_utils/models.py:106
+#: ldt_utils/models.py:209
msgid "created by"
msgstr "created by"
-#: ldt_utils/models.py:107
+#: ldt_utils/models.py:210
msgid "changed by"
msgstr "changed by"
@@ -118,11 +184,6 @@
msgid "Content"
msgstr ""
-#: ldt_utils/templates/ldt/ldt_utils/content_list.html:69
-#: ldt_utils/templates/ldt/ldt_utils/ldt_list.html:64
-msgid "title"
-msgstr "Title"
-
#: ldt_utils/templates/ldt/ldt_utils/content_list.html:70
#: ldt_utils/templates/ldt/ldt_utils/content_list.html:77
#, fuzzy
--- a/web/ldt/locale/fr/LC_MESSAGES/django.po Tue Sep 21 04:27:08 2010 +0200
+++ b/web/ldt/locale/fr/LC_MESSAGES/django.po Tue Sep 21 06:34:28 2010 +0200
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-12 23:04+0200\n"
+"POT-Creation-Date: 2010-09-21 05:10+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"
@@ -18,67 +18,127 @@
#: forms/widgets.py:17
msgid "Date"
-msgstr ""
+msgstr "Date"
#: forms/widgets.py:17
msgid "Time"
-msgstr ""
+msgstr "Time"
+
+#: ldt_utils/forms.py:43 ldt_utils/models.py:59
+msgid "content.content_creation_date"
+msgstr "Date de creation du contenu"
+
+#: ldt_utils/forms.py:44
+msgid "content.media_input_type"
+msgstr "Documentation"
+
+#: ldt_utils/forms.py:44
+msgid "file_upload"
+msgstr "upload fichier"
-#: ldt_utils/models.py:22
-msgid "content.iri_id"
-msgstr ""
+#: ldt_utils/forms.py:44
+msgid "url"
+msgstr "url"
+
+#: ldt_utils/forms.py:44
+msgid "existing_media"
+msgstr "média existant"
+
+#: ldt_utils/forms.py:44
+msgid "create_media"
+msgstr "créé par"
+
+#: ldt_utils/forms.py:44
+msgid "none_media"
+msgstr "Aucun"
#: ldt_utils/models.py:23
-msgid "content.iriurl"
-msgstr ""
+msgid "media.external_id"
+msgstr "id externe"
#: ldt_utils/models.py:24
-msgid "content.src"
-msgstr ""
+msgid "content.external_permalink"
+msgstr "permalien externe"
-#: ldt_utils/models.py:25
-msgid "content.videopath"
-msgstr ""
-
-#: ldt_utils/models.py:26
-msgid "content.creation_date"
-msgstr ""
+#: ldt_utils/models.py:25 ldt_utils/models.py:26
+msgid "content.external_publication_url"
+msgstr "url de publication externe"
#: ldt_utils/models.py:27
-msgid "content.update_date"
-msgstr ""
+msgid "media.creation_date"
+msgstr "Date de création"
#: ldt_utils/models.py:28
-msgid "content.title"
-msgstr ""
+msgid "media.media_creation_date"
+msgstr "Date de création du média"
#: ldt_utils/models.py:29
-#, fuzzy
-msgid "content.description"
-msgstr "Connexion"
+msgid "media.update_date"
+msgstr "Date de maj"
#: ldt_utils/models.py:30
-msgid "content.external_id"
-msgstr ""
+msgid "media.videopath"
+msgstr "videopath"
#: ldt_utils/models.py:31
-msgid "content.authors"
-msgstr ""
+msgid "media.duration"
+msgstr "Durée du contenu"
#: ldt_utils/models.py:32
-#, fuzzy
-msgid "content.duration"
-msgstr "Documentation"
+msgid "media.creator"
+msgstr "Créateur"
#: ldt_utils/models.py:33
-msgid "content.content_creation_date"
-msgstr ""
+msgid "description"
+msgstr "description"
+
+#: ldt_utils/models.py:34
+#: ldt_utils/templates/ldt/ldt_utils/content_list.html:69
+#: ldt_utils/templates/ldt/ldt_utils/ldt_list.html:64
+msgid "title"
+msgstr "Titre"
+
+#: ldt_utils/models.py:35
+msgid "media.src"
+msgstr "Sources"
+
+#: ldt_utils/models.py:48
+msgid "content.iri_id"
+msgstr "iri id"
+
+#: ldt_utils/models.py:49
+msgid "content.iriurl"
+msgstr "iri url"
-#: ldt_utils/models.py:106
+#: ldt_utils/models.py:52
+msgid "content.creation_date"
+msgstr "date de création"
+
+#: ldt_utils/models.py:53
+msgid "content.update_date"
+msgstr "Date de maj"
+
+#: ldt_utils/models.py:54
+msgid "content.title"
+msgstr "titre"
+
+#: ldt_utils/models.py:55
+msgid "content.description"
+msgstr "Description"
+
+#: ldt_utils/models.py:57
+msgid "content.authors"
+msgstr "Autheurs"
+
+#: ldt_utils/models.py:58
+msgid "content.duration"
+msgstr "Durée"
+
+#: ldt_utils/models.py:209
msgid "created by"
msgstr "créé par"
-#: ldt_utils/models.py:107
+#: ldt_utils/models.py:210
msgid "changed by"
msgstr "modifié par"
@@ -107,21 +167,16 @@
#: ldt_utils/templates/ldt/ldt_utils/content_list.html:59
msgid "Contents"
-msgstr ""
+msgstr "Liste des contenus"
#: ldt_utils/templates/ldt/ldt_utils/content_list.html:63
#, fuzzy
msgid "Create new content"
-msgstr "Créer un nouveau projet Ligne de Temps"
+msgstr "Créer un nouveau contenu"
#: ldt_utils/templates/ldt/ldt_utils/content_list.html:66
msgid "Content"
-msgstr ""
-
-#: ldt_utils/templates/ldt/ldt_utils/content_list.html:69
-#: ldt_utils/templates/ldt/ldt_utils/ldt_list.html:64
-msgid "title"
-msgstr "Titre"
+msgstr "Contenu"
#: ldt_utils/templates/ldt/ldt_utils/content_list.html:70
#: ldt_utils/templates/ldt/ldt_utils/content_list.html:77
@@ -143,7 +198,6 @@
msgstr "Copier"
#: ldt_utils/templates/ldt/ldt_utils/create_content.html:22
-#, fuzzy
msgid "Create content"
msgstr "Créer un compte"
--- a/web/static/css/workspace.css Tue Sep 21 04:27:08 2010 +0200
+++ b/web/static/css/workspace.css Tue Sep 21 06:34:28 2010 +0200
@@ -30,7 +30,8 @@
}
.searchfield img {
- vertical-align: top;
+ vertical-align: middle;
+ margin-top: 5px;
}
.searchfieldinput {
@@ -44,7 +45,8 @@
}
.searchclear {
- display: none;
+ /*visibility: hidden;*/
+ float: right;
}
.searchfieldinputbase {
@@ -147,6 +149,7 @@
.searchajaxloader {
display: none;
+ float: right;
}
a.content_link_create:link, a.content_link_create:visited,
--- a/web/static/js/projectscontents.js Tue Sep 21 04:27:08 2010 +0200
+++ b/web/static/js/projectscontents.js Tue Sep 21 06:34:28 2010 +0200
@@ -117,7 +117,11 @@
function searchCallback(target, container_selector, url, timeout) {
timeout = typeof(timeout) != 'undefined' ? timeout : 0;
- var target = $(target);
+ var target = $(target);
+
+ if(target.realVal().length > 0) {
+ target.nextAll(".searchclear").show();
+ }
if(target.attr('timer')) {
clearTimeout(target.attr('timer'));
@@ -125,11 +129,13 @@
target.attr('timer',setTimeout(function() {
target.next(".searchajaxloader").show();
- target.next(".searchclear").hide();
- url = url.replace('__FILTER__',escape($(target).realVal()));
+ target.nextAll(".searchclear").hide();
+ url = url.replace('__FILTER__',escape(target.realVal()));
$(container_selector).load(url, null, function() {
target.next(".searchajaxloader").hide();
- target.next(".searchclear").show();
+ if(target.realVal().length > 0) {
+ target.nextAll(".searchclear").show();
+ }
init_events($(container_selector));
target.removeAttr('timer');
});
@@ -174,8 +180,7 @@
$(e.target).blur();
$(e.target).next(".searchajaxloader").hide();
}
- });
-
+ });
$('.searchfieldinput').each(function(i) {
var sbox = $(this);
@@ -206,5 +211,18 @@
searchCallback(e.target, value['container_selector'], value['url']);
});
});
+
+ $('.searchclear').click(function(e) {
+ var box = $(e.target).parent().find("input");
+ box.val(box.attr('defaultText'));
+ box.addClass("searchfieldinput");
+ box.blur();
+ box.keyup();
+ $(e.target).hide();
+ });
+
+ $('.searchclear').each(function(i) {
+ $(this).hide();
+ });
}