evolutions
authorymh <ymh.work@gmail.com>
Tue, 12 Oct 2010 03:23:33 +0200
changeset 82 9202807b4cec
parent 81 97b12f5f2c7a
child 83 ec31a4bd86d3
evolutions
web/franceculture/locale/fr/LC_MESSAGES/django.mo
web/franceculture/locale/fr/LC_MESSAGES/django.po
web/franceculture/templates/franceculture/embed_popup.html
web/franceculture/templates/franceculture/partial/contentslist.html
web/franceculture/templates/franceculture/partial/embed.html
web/franceculture/templates/franceculture/partial/embed_links.html
web/franceculture/templates/franceculture/partial/embed_player.html
web/franceculture/templates/franceculture/partial/embed_seo_body.html
web/franceculture/templates/franceculture/partial/embed_seo_meta.html
web/franceculture/templates/franceculture/partial/projectslist.html
web/franceculture/templates/ldt/ldt_utils/create_content.html
web/franceculture/templates/ldt/ldt_utils/create_ldt.html
web/franceculture/templates/ldt/ldt_utils/error_confirm.html
web/franceculture/views.py
web/ldt/ldt_utils/forms.py
web/ldt/ldt_utils/models.py
web/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm.html
web/ldt/ldt_utils/urls.py
web/ldt/ldt_utils/views.py
web/ldt/locale/en/LC_MESSAGES/django.mo
web/ldt/locale/en/LC_MESSAGES/django.po
web/ldt/locale/fr/LC_MESSAGES/django.mo
web/ldt/locale/fr/LC_MESSAGES/django.po
web/static/css/embed_popup.css
web/static/css/ldtform.css
web/static/css/workspace.css
web/static/img/ajax-loader-220x19.gif
web/static/js/embed_popup.js
web/static/js/projectscontents.js
Binary file web/franceculture/locale/fr/LC_MESSAGES/django.mo has changed
--- a/web/franceculture/locale/fr/LC_MESSAGES/django.po	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/franceculture/locale/fr/LC_MESSAGES/django.po	Tue Oct 12 03:23:33 2010 +0200
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-20 22:09-0500\n"
+"POT-Creation-Date: 2010-10-12 03:19+0200\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"
@@ -20,9 +20,13 @@
 msgid "French"
 msgstr "Français"
 
+#: views.py:88
+msgid "You can not access this project"
+msgstr "Vous n'avez pas accès à ce projet"
+
 #: templates/base.html:44
 msgid "home"
-msgstr "acceuil"
+msgstr "accueil"
 
 #: templates/base.html:45
 msgid "contents"
@@ -48,30 +52,46 @@
 msgid "Langue"
 msgstr "Langue"
 
-#: templates/franceculture/embed_popup.html:51
+#: templates/franceculture/embed_popup.html:42
+msgid "popup_player"
+msgstr "Code du lecteur"
+
+#: templates/franceculture/embed_popup.html:42
+msgid "popup_seo_body"
+msgstr "Code lecteur et seo"
+
+#: templates/franceculture/embed_popup.html:42
+msgid "popup_seo_meta"
+msgstr "Code lecteur et seo balise meta"
+
+#: templates/franceculture/embed_popup.html:42
+msgid "popup_links"
+msgstr "Liste de liens"
+
+#: templates/franceculture/embed_popup.html:56
 msgid "clik here to see the project content"
 msgstr "cliquer ici pour voir le contenu du projet"
 
-#: templates/franceculture/workspace.html:49
+#: templates/franceculture/workspace.html:52
 #: templates/ldt/ldt_utils/content_list.html:50
 msgid "content list"
 msgstr "Liste des contenus"
 
-#: templates/franceculture/workspace.html:51
-#: templates/franceculture/workspace.html:62
+#: templates/franceculture/workspace.html:54
+#: templates/franceculture/workspace.html:65
 #: templates/ldt/ldt_utils/content_list.html:52
 #: templates/ldt/ldt_utils/ldt_list.html:79
 msgid "search"
 msgstr "Recherche"
 
-#: templates/franceculture/workspace.html:60
+#: templates/franceculture/workspace.html:63
 #: templates/ldt/ldt_utils/ldt_list.html:77
 msgid "project list"
 msgstr "Liste des projets"
 
 #: templates/franceculture/partial/contentslist.html:3
 #: templates/franceculture/partial/projectslist.html:3
-#: templates/ldt/ldt_utils/create_ldt.html:30
+#: templates/ldt/ldt_utils/create_ldt.html:42
 msgid "name"
 msgstr "Nom"
 
@@ -84,70 +104,112 @@
 msgstr "preview"
 
 #: templates/franceculture/partial/contentslist.html:21
-#: templates/ldt/ldt_utils/create_content.html:61
+#: templates/ldt/ldt_utils/create_content.html:68
 msgid "Create content"
 msgstr "Créer un Contenu"
 
+#: templates/franceculture/partial/projectslist.html:12
+msgid "open ldt"
+msgstr "Ouvrir sous Lignes de Temps"
+
+#: templates/franceculture/partial/projectslist.html:13
+msgid "copy project"
+msgstr "Copier projet"
+
 #: templates/franceculture/partial/projectslist.html:14
+msgid "link json by id"
+msgstr "Ouvrir le lecteur augmenté"
+
+#: templates/franceculture/partial/projectslist.html:17
 msgid "Project published, click to unpublish"
 msgstr "Projet publié, cliquer pour de-publier"
 
-#: templates/franceculture/partial/projectslist.html:16
+#: templates/franceculture/partial/projectslist.html:19
 msgid "Project not published, click to publish"
 msgstr "Projet non publié, cliquer pour publier"
 
-#: templates/franceculture/partial/projectslist.html:20
-msgid "open ldt"
-msgstr "Ouvrir sous Lignes de Temps"
-
-#: templates/franceculture/partial/projectslist.html:21
-msgid "copy project"
-msgstr "Copier projet"
-
-#: templates/franceculture/partial/projectslist.html:22
-msgid "link json by id"
-msgstr "Ouvrir le lecteur augmenté"
-
-#: templates/franceculture/partial/projectslist.html:31
+#: templates/franceculture/partial/projectslist.html:36
 msgid "Create project"
 msgstr "Créer un projet"
 
-#: templates/ldt/ldt_utils/create_content.html:40
+#: templates/ldt/ldt_utils/create_content.html:47
 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:"
+"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
+#: templates/ldt/ldt_utils/create_content.html:58
 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:"
+"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_content.html:105
+msgid "media file is being processed please wait."
+msgstr "Le fichier média est en cours de traitement. Veullez patienter."
+
+#: templates/ldt/ldt_utils/create_content.html:109
+#: templates/ldt/ldt_utils/create_ldt.html:59
+#: templates/ldt/ldt_utils/error_confirm.html:48
+msgid "close_cancel"
+msgstr "Annuler"
 
+#: templates/ldt/ldt_utils/create_content.html:110
+msgid "delete"
+msgstr "Effacer"
 
-#: templates/ldt/ldt_utils/create_ldt.html:23
+#: templates/ldt/ldt_utils/create_content.html:111
+msgid "write"
+msgstr "Enregistrer"
+
+#: templates/ldt/ldt_utils/create_ldt.html:34
+msgid "Update your project"
+msgstr "Mettre à jour un projet"
+
+#: templates/ldt/ldt_utils/create_ldt.html:34
 msgid "Create your project"
 msgstr "Créer un projet"
 
-#: templates/ldt/ldt_utils/create_ldt.html:26
+#: templates/ldt/ldt_utils/create_ldt.html:38
 msgid "Title"
 msgstr "Titre"
 
-#: templates/ldt/ldt_utils/create_ldt.html:28
+#: templates/ldt/ldt_utils/create_ldt.html:40
 msgid "List of contents"
 msgstr "Liste des Médias"
 
-#: templates/ldt/ldt_utils/create_ldt.html:47
-msgid "Create"
+#: templates/ldt/ldt_utils/create_ldt.html:61
+msgid "delete_project"
+msgstr "Effacer"
+
+#: templates/ldt/ldt_utils/create_ldt.html:62
+msgid "update_project"
+msgstr "Mettre à jour"
+
+#: templates/ldt/ldt_utils/create_ldt.html:64
+msgid "create_project"
 msgstr "Créer"
 
+#: templates/ldt/ldt_utils/error_confirm.html:30
+msgid "error"
+msgstr "Erreurs"
+
+#: templates/ldt/ldt_utils/error_confirm.html:30
+msgid "confirm"
+msgstr "Confirmer"
+
+#: templates/ldt/ldt_utils/error_confirm.html:44
+msgid "close_error"
+msgstr "fermer"
+
+#: templates/ldt/ldt_utils/error_confirm.html:49
+msgid "do_delete"
+msgstr "Effacer"
+
 #: templates/ldt/user/login_form.html:33 templates/registration/login.html:14
 msgid "Log in"
 msgstr "Connexion"
@@ -188,6 +250,9 @@
 msgid "Forget password?"
 msgstr "Mot de passe oublié ?"
 
+#~ msgid "Create"
+#~ msgstr "Créer"
+
 #~ msgid "link json by externalid"
 #~ msgstr "ouvrir le lecteur augmenté"
 
--- a/web/franceculture/templates/franceculture/embed_popup.html	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/franceculture/templates/franceculture/embed_popup.html	Tue Oct 12 03:23:33 2010 +0200
@@ -7,6 +7,10 @@
 		<meta http-equiv="Cache" content="no store" />
 		<meta http-equiv="Expires" content="-1" />
 		<title>Ligne de Temps - IRI</title>
+		<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.min.js"></script>
+		<script type="text/javascript">
+			var $j = jQuery.noConflict();
+		</script>
 		<script type="text/javascript" src="{{MEDIA_URL}}js/LdtPlayer.min.js"></script>
 		<script type="text/javascript">
 			__IriSP.lib = {
@@ -17,43 +21,40 @@
 				cssjQueryUI:"{{MEDIA_URL}}css/jq-css/themes/base/jquery-ui.css"							
 			};
 		</script>
-		<script type="text/javascript">
-			$(document).ready(function(){
-				$('.ldt_json_link').click(function(e) {
-		 	    	e.preventDefault();
-		 	 		link = $(e.target);
-		 	 		$("#res_link_{{player_id}}").load(link.attr("href"));
-		 	 		$("#res_link_{{player_id}}").show();
-		 	 		return false;
-		 	    });
-			});
-		</script>
+		<script type="text/javascript" src="{{MEDIA_URL}}js/embed_popup.js"></script>
 		
 		
 		<link rel="stylesheet" href="{{MEDIA_URL}}css/workspace.css" type="text/css"/>
+		<link rel="stylesheet" href="{{MEDIA_URL}}css/embed_popup.css" type="text/css"/>
 	</head>
 
 	<body id="init_embed_popup">
 	
 		<div class="ldt_player" id="wrapper_{{player_id}}">
-		{% include "franceculture/partial/embed.html" %}  
+		{% include "franceculture/partial/embed_player.html" %}  
 		</div>
 		
 		<div style="height: 100px">&nbsp;</div>
-		
-		<code id ="code_{{player_id}}" >
-		<div class="ldt_player_code"><pre>
-{{ player_embed_rendered }}<br/>
-		</pre></div>
-		</code>
+
+
+		<div id="button_row">
+		    <div id="display_select">
+		    	<input type="button" value="{% trans 'popup_player'%}" id="player_button"/><input id="seo_body_button" type="button" value="{% trans 'popup_seo_body' %}"/><input id="seo_meta_button" type="button" value="{% trans 'popup_seo_meta' %}"/><input id="links_button" type="button" value="{% trans 'popup_links' %}"/>
+		    </div>
+		</div>
 		
-		
-		<a href="{{json_url}}?escape=true&mimetype=text/plain" class="ldt_json_link" >{% trans 'clik here to see the project content' %}</a>
+		<div class="ldt_player_code">
+			<code id ="code_{{player_id}}" >		
+				<div  id="player_code"><pre>{{ embed_rendered.player }}</pre></div>
+				<div id="seo_body_code"><pre>{{ embed_rendered.seo_body }}</pre></div>
+				<div id="seo_meta_code"><pre>{{ embed_rendered.seo_meta }}</pre></div>			
+			</code>
+	
+			<div id="links_code">{% include "franceculture/partial/embed_links.html" %}</div>
+		</div>
+						
+		<a href="{{json_url}}?escape=true&mimetype=text/plain" class="ldt_json_link" >{% trans 'clik here to see the project content' %}</a>		
 		
-		<code id ="json_{{player_id}}" ><pre>
-		<div id="res_link_{{player_id}}" class="ldt_player_code" style="display: none;">
-		</div>
-		</pre></code>
 	</body>
 </html>
 
--- a/web/franceculture/templates/franceculture/partial/contentslist.html	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/franceculture/templates/franceculture/partial/contentslist.html	Tue Oct 12 03:23:33 2010 +0200
@@ -10,7 +10,7 @@
 		<tr class="imageline {% cycle 'projectscontentsoddline' 'projectscontentsevenline'%}">
 		    <td class="cellimg"><div class="cellimgdiv"><img src="{{MEDIA_URL}}/img/document_add.gif" title="{% trans 'create project' %}" alt="{% trans 'create project' %}" href="{% url ldt.ldt_utils.views.create_project content.iri_id %}" class="ldt_link_create"/></div></td>
 		    <td class="cellimg"><div class="cellimgdiv"><img  alt="{% trans 'preview media'%}" title="{% trans 'preview media'%}" src="{{MEDIA_URL}}/img/control_play.gif" href="{% url ldt.ldt_utils.views.index content.iri_id %}" class="ldt_link"/></div></td>
-		    <td class="contenttitle"><a class="contenttitlelink" href="{% url ldt.ldt_utils.views.write_content iri_id=content.iri_id %}">{{ content.title }}</a></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>
 		</tr>
 	{% endfor %}
 		</tbody>
--- a/web/franceculture/templates/franceculture/partial/embed.html	Wed Sep 29 10:10:07 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-{% load i18n %}
-<div style="height: 80px">&nbsp;</div>
-<div id="{{ player_id }}_embed" class="iri_player_embed">
-</div>
-<script type="text/javascript">
-	var config = {
-			metadata:{
-				format:'cinelab',
-				src:'{{ json_url }}',
-				load:'jsonp'},
-			gui:{
-				width:650,
-				height:1,
-				mode:'radio',
-				container:'{{ player_id }}_embed',
-				debug:false,
-				css:'{{WEB_URL}}{{MEDIA_URL}}css/LdtPlayer.css'},
-			player:{
-				type:'jwplayer',
-				src:'{{WEB_URL}}{{MEDIA_URL}}swf/player.swf'}
-		};
-	__IriSP.init(config);     
-</script>
-<div id="{{ player_id }}_seo" style="display: none;">
-	<ul>
-	{% for annotation in annotations %}
-		<li><span class="title">{{annotation.title}}</span><span class="desc">{{annotation.desc}}</span><span class="tags">{{annotation.tags}}</span><span class="uri">{% if annotation.uri %}<a href="{{annotation.uri}}">{{annotation.uri}}</a>{% endif %}</span></li>
-	{% endfor %}
-	</ul>
-</div>
-<div id="{{ player_id }}_link_list">
-	<ul>
-	{% for annotation in annotations %}
-		<li><span class="title">{{annotation.title}}</span>:&nbsp;<span class="uri">{% if annotation.uri %}<a href="{{annotation.uri}}">{{annotation.uri}}</a>{% endif %}</span></li>
-	{% endfor %}
-	</ul>
-</div>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/franceculture/templates/franceculture/partial/embed_links.html	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,9 @@
+{% spaceless %}
+<div id="{{ player_id }}_link_list">
+	<ul>
+	    {% for annotation in annotations %}
+	        <li><span class="title">{{annotation.title}}</span>:&nbsp;<span class="uri">{% if annotation.uri %}<a href="{{annotation.uri}}">{{annotation.uri}}</a>{% endif %}</span></li>
+	    {% endfor %}
+	</ul>
+</div>
+{% endspaceless %}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/franceculture/templates/franceculture/partial/embed_player.html	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,25 @@
+{% spaceless %}
+{% load i18n %}
+<div style="height: 80px">&nbsp;</div>
+<div id="{{ player_id }}_embed" class="iri_player_embed">
+</div>
+<script type="text/javascript">
+	var config = {
+			metadata:{
+				format:'cinelab',
+				src:'{{ json_url }}',
+				load:'jsonp'},
+			gui:{
+				width:650,
+				height:1,
+				mode:'radio',
+				container:'{{ player_id }}_embed',
+				debug:false,
+				css:'{{WEB_URL}}{{MEDIA_URL}}css/LdtPlayer.css'},
+			player:{
+				type:'jwplayer',
+				src:'{{WEB_URL}}{{MEDIA_URL}}swf/player.swf'}
+		};
+	__IriSP.init(config);     
+</script>
+{% endspaceless %}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/franceculture/templates/franceculture/partial/embed_seo_body.html	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,9 @@
+{% spaceless %}
+<div id="{{ player_id }}_seo_body" style="display: none">
+	<ul>
+	{% for annotation in annotations %}
+		<li><span class="title">{{annotation.title}}</span><span class="desc">{{annotation.desc}}</span><span class="tags">{{annotation.tags}}</span><span class="uri">{% if annotation.uri %}<a href="{{annotation.uri}}">{{annotation.uri}}</a>{% endif %}</span></li>
+	{% endfor %}
+	</ul>
+</div>
+{% endspaceless %}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/franceculture/templates/franceculture/partial/embed_seo_meta.html	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,6 @@
+{% spaceless %}
+	{% for annotation in annotations %}
+		<li><span class="title">{{annotation.title}}</span><span class="desc">{{annotation.desc}}</span><span class="tags">{{annotation.tags}}</span><span class="uri">{% if annotation.uri %}<a href="{{annotation.uri}}">{{annotation.uri}}</a>{% endif %}</span></li>
+	{% endfor %}
+	</ul>
+{% endspaceless %}
\ No newline at end of file
--- a/web/franceculture/templates/franceculture/partial/projectslist.html	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/franceculture/templates/franceculture/partial/projectslist.html	Tue Oct 12 03:23:33 2010 +0200
@@ -9,18 +9,23 @@
 {% 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 %}
-        <td class="cellimg"><div class="cellimgdiv">
+        <td class="cellimg"><div class="cellimgdiv"><img src="{{MEDIA_URL}}/img/document_edit.gif" href="{% url ldt.ldt_utils.views.indexProject project.ldt_id %}" class="ldt_link" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/></div></td>
+        <td class="cellimg"><div class="cellimgdiv"><img src="{{MEDIA_URL}}/img/documents_duplicate.gif" href="{% url ldt.ldt_utils.views.copy_project project.ldt_id %}" class="ldt_link_create" alt="{% trans 'copy project' %}" title="{% trans 'copy project' %}"/></div></td>
+        <td class="cellimg"><div class="cellimgdiv"><img src="{{MEDIA_URL}}/img/plugin.gif" 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="{{BASE_URL}}static/admin/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}}" />
         {% else %}
         <img src="{{BASE_URL}}static/admin/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}}" />
         {% endifequal %}
-        </div>
         </td>
-        <td class="cellimg"><div class="cellimgdiv"><img src="{{MEDIA_URL}}/img/document_edit.gif" href="{% url ldt.ldt_utils.views.indexProject project.ldt_id %}" class="ldt_link" alt="{% trans 'open ldt' %}" title="{% trans 'open ldt' %}"/></div></td>
-        <td class="cellimg"><div class="cellimgdiv"><img src="{{MEDIA_URL}}/img/documents_duplicate.gif" href="{% url ldt.ldt_utils.views.copy_project project.ldt_id %}" class="ldt_link_create" alt="{% trans 'copy project' %}" title="{% trans 'copy project' %}"/></div></td>
-        <td class="cellimg"><div class="cellimgdiv"><img src="{{MEDIA_URL}}/img/plugin.gif" 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="projecttitle">{{ project.title }}</td>
+        <td class="projecttitle">
+        {% ifequal project.state 2 %}
+        {{ project.title }}
+        {% else %}
+        <a class="projecttitlelink" href="{% url ldt.ldt_utils.views.update_project ldt_id=project.ldt_id %}">{{ project.title }}</a>
+        {% endifequal %}
+        </td>
     </tr>
 {% endfor %}
     </tbody>
--- a/web/franceculture/templates/ldt/ldt_utils/create_content.html	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/franceculture/templates/ldt/ldt_utils/create_content.html	Tue Oct 12 03:23:33 2010 +0200
@@ -23,6 +23,13 @@
 	<script type="text/javascript">
 	window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
 	$(document).ready(function() {
+		$("#close_button").click(function (e) {
+			e.preventDefault();
+			parent.$.nyroModalRemove();
+		});
+		$("#submit_button_write").click(function(e) {
+			$(".submitcontent-loader-content").show();
+		});
 		$(".media_fields").hide();
 		$("#media_field_"+$("#id_content-media_input_type").val()).show();
 		$("#id_content-media_input_type").change(function(e) {
@@ -93,7 +100,16 @@
 	</div>
 	</div>
 	<div id="submitcontent" class="span-18 last">
-		<input type="submit"/>
+		<div id="submitcontent-loader" class="span-10">
+			<div id="submitcontent-loader-img" class="submitcontent-loader-content span-10 last"><img alt="loader" src="{{MEDIA_URL}}img/ajax-loader-220x19.gif"/></div>
+			<div id="submitcontent-loader-msg" class="submitcontent-loader-content span-10 last">{% trans "media file is being processed please wait." %}</div>
+			<span>&nbsp;</span>
+		</div>
+		<div id="submitcontent-buttons" class="span-8 last">
+			<button id="close_button"  value="close">{% trans 'close_cancel' %}</button>
+			{% if iri_id %}<button type="submit" value="prepare_delete" name="submit_button">{% trans "delete" %}</button>{% endif %}
+			<button type="submit" value="write" name="submit_button" id="submit_button_write">{% trans "write" %}</button>
+		</div>
 	</div> 
 	</form>
 	</div>
--- a/web/franceculture/templates/ldt/ldt_utils/create_ldt.html	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/franceculture/templates/ldt/ldt_utils/create_ldt.html	Tue Oct 12 03:23:33 2010 +0200
@@ -17,14 +17,26 @@
 	<link rel="stylesheet" href="{{MEDIA_URL}}css/workspace.css" />
 {% endblock %}
 
+{% block js_declaration %}
+	{{ block.super }}
+	<script type="text/javascript">
+	$(document).ready(function() {	
+		$("#close_button").click(function (e) {
+			e.preventDefault();
+			parent.$.nyroModalRemove();
+		});
+	});
+	</script>
+{% endblock %}
 
 {% block body %}
 	<div id="add_contribution" class="span-12 last">
-	<div class="projectscontentstitle span-12 last">{% trans "Create your project" %}</div>
+	<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 %} 
+	<input type="hidden" name="form_status" value="{{form_status}}" id="project_form_status" />
 	<label for="title">{% trans "Title" %}:</label>
-	<input class="inputbox required" type="text" name="title" size="80" ; value="" id="title" />
+	{{form.title}}
 	<label>{% trans "List of contents" %}</label>
 	<div class="span-12 last projectscontentsdiv" id="ldtcreatecontentslistcontainer">
 		<div class="projectscontentsheader span-12 last" id="contentslistheader">{% trans "name" %}</div>
@@ -34,7 +46,7 @@
 				    <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" /></td>
+					    <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 %}
@@ -43,8 +55,14 @@
 			</div>
 		</div>
 	</div>
-	<div id="submitcontent" class="span-12 last">
-		<input class="button" id="ldt_submit" type="submit" value="{% trans 'Create' %}" />
+	<div id="submitcontent-buttons" class="span-12 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>
+		<button class="button" id="ldt_submit" type="submit" value="update" name="submit_button">{% trans "update_project" %}</button>
+		{% else %}
+		<button class="button" id="ldt_submit" type="submit" value="create" name="submit_button">{% trans "create_project" %}</button>
+		{% endif %}
 	</div>
 	</form>
 	</div>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/franceculture/templates/ldt/ldt_utils/error_confirm.html	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,54 @@
+{% extends "raw_base.html" %}
+
+{% load i18n %} {# form of creation of content #}
+
+{% block js_import %}
+	{{ block.super }}
+{% endblock %}
+
+{% block css_import %}
+	{{ block.super }}
+	{{ content_form.media.css }}
+	<link rel="stylesheet" href="{{MEDIA_URL}}ldt/css/ldt.css" />
+	<link rel="stylesheet" href="{{MEDIA_URL}}css/ldtform.css" />
+{% endblock %}
+
+
+{% block js_declaration %}
+	<script type="text/javascript">
+	$(document).ready(function() {
+		$("#close_button").click(function(e) {
+			parent.$.nyroModalRemove();
+		});
+	});
+	</script>
+{% endblock %}
+
+{% block body %}
+	
+<div id="error">
+<div class="projectscontentstitle">{% if errors|length > 0 %}{% trans "error" %}{% else %}{% trans "confirm" %}{% endif %}</div>
+<div class="error_message">
+	{{ message }}
+		{% if errors|length > 0 %}
+		<ul>
+		{% for error_msg in errors %}
+			<li>{{ error_msg }}</li>	
+		{% endfor %}
+		</ul>
+	{% endif %}
+</div>
+
+<div id="submitcontent" >
+{% if errors|length > 0 %}
+	<button id="close_button"  value="close">{% trans 'close_error' %}</button> 
+{% else %}
+	<form method="post" enctype="application/x-www-form-urlencoded" action="{{ delete_action }}">
+		{% csrf_token %}
+		<button id="close_button"  value="close">{% trans 'close_cancel' %}</button>
+		<button type="submit" value="delete" name="submit_button" id="submit_button">{% trans "do_delete" %}</button>
+	</form>
+{% endif %}
+</div>
+	
+{% endblock %}
--- a/web/franceculture/views.py	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/franceculture/views.py	Tue Oct 12 03:23:33 2010 +0200
@@ -9,6 +9,7 @@
 from django.db.models import Q
 import logging
 import lxml.etree
+from lxml.html import fromstring
 import ldt.auth
 
 
@@ -112,7 +113,7 @@
 
             uri = None            
             if content.media_obj.external_publication_url:
-                uri = "%s#%d" % (content.media_obj.external_publication_url, begin)
+                uri = "%s#t=%d" % (content.media_obj.external_publication_url, begin)
 
             annotations.append({
                 'begin': begin,
@@ -124,12 +125,12 @@
                 'uri':uri
             })
     
-    
-    embed_rendered = escape(render_to_string('franceculture/partial/embed.html', {'json_url':json_url,'player_id':player_id, 'annotations':annotations}, context_instance=RequestContext(request)))
-
+    embed_rendered = dict((typestr,
+                           (lambda s:escape(lxml.etree.tostring(fromstring(render_to_string("franceculture/partial/embed_%s.html"%(s), {'json_url':json_url,'player_id':player_id, 'annotations':annotations}, context_instance=RequestContext(request))),pretty_print=True)))(typestr)) 
+                           for typestr in ('player','seo_body', 'seo_meta', 'links')  )
     
     return render_to_response("franceculture/embed_popup.html",
-                              {'json_url':json_url,'player_id':player_id, 'player_embed_rendered':embed_rendered},
+                              {'json_url':json_url,'player_id':player_id, 'embed_rendered':embed_rendered, 'annotations':annotations},
                               context_instance=RequestContext(request)) 
 
 
--- a/web/ldt/ldt_utils/forms.py	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/ldt/ldt_utils/forms.py	Tue Oct 12 03:23:33 2010 +0200
@@ -30,7 +30,7 @@
     field = forms.ChoiceField([(u"all", u"all"), (u"title", u"title"), (u"abstract", u"resume"), (u"tags", u"tags")])
 
 class AddProjectForm (forms.Form):
-    title = forms.CharField()
+    title = forms.CharField(widget=forms.TextInput(attrs={'class':'inputbox required'}))
 
 class CopyProjectForm (forms.Form):
     title = forms.CharField()
--- a/web/ldt/ldt_utils/models.py	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/ldt/ldt_utils/models.py	Tue Oct 12 03:23:33 2010 +0200
@@ -22,7 +22,7 @@
 class Media(models.Model):
     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=False, null=True, blank=True, verbose_name=_('media.external_publication_url'))
+    external_publication_url = models.URLField(max_length=1024, verify_exists=True, null=True, blank=True, verbose_name=_('media.external_publication_url'))
     external_src_url = models.URLField(max_length=1024, verify_exists=False, null=True, blank=True, verbose_name=_('media.external_src_url'))
     creation_date = models.DateTimeField(auto_now_add=True, verbose_name=_('media.creation_date'))
     media_creation_date = models.DateTimeField(null=True, blank=True, verbose_name=_('media.media_creation_date'))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/ldt/ldt_utils/templates/ldt/ldt_utils/error_confirm.html	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,28 @@
+{% load i18n %} {# form of creation of content #}
+{% load adminmedia %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+	<title>{{title}}</title>
+    <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.min.js"></script>
+    <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.nyroModal.min.js"></script>    
+	<link rel="stylesheet" href="{{BASE_URL}}static/ldt/css/ldt.css" />
+	<link rel="stylesheet" href="{{MEDIA_URL}}css/ldtform.css" />
+</head>
+<body>
+<div id="error_confirm">
+<div class="title">{% trans "error" %}</div>
+<div class="error_confirm_message">
+	{{ message }}:
+	<ul>
+	{% for error_msg in errors %}
+		<li>{{ error_msg }}</li>	
+	{% endfor %}
+	</ul>
+	
+	<div><button id="close_button" value="{% trans 'close_error' %}"></button></div>
+</div>
+</body>
+</html>
--- a/web/ldt/ldt_utils/urls.py	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/ldt/ldt_utils/urls.py	Tue Oct 12 03:23:33 2010 +0200
@@ -18,6 +18,7 @@
     url(r'^search/loading/$', 'views.loading'),
     url(r'^create/(?P<iri_id>.*)$', 'views.create_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'),
     url(r'^cljson/externalid/(?P<id>.*)$', 'views.project_json_externalid'),
 )
--- a/web/ldt/ldt_utils/views.py	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/ldt/ldt_utils/views.py	Tue Oct 12 03:23:33 2010 +0200
@@ -1,37 +1,40 @@
-import django.core.urlresolvers
-from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden
-from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
+from Ft.Xml import MarkupWriter
+from contentindexer import *
+from django.conf import settings
+from django.contrib.auth.decorators import login_required
+from django.core import serializers
+from django.core.urlresolvers import reverse
+from django.forms.util import ErrorList
+from django.http import HttpResponse, HttpResponseRedirect, \
+    HttpResponseForbidden
+from django.shortcuts import render_to_response, get_object_or_404, \
+    get_list_or_404
 from django.template import RequestContext
-from django.core.urlresolvers import reverse
-from django.contrib.auth.decorators import login_required
-from django.conf import settings
-from django.core import serializers
 from django.utils import simplejson
 from django.utils.html import escape
+from django.utils.translation import ugettext as _, ungettext
 from fileimport import *
-from forms import LdtImportForm, LdtAddForm, SearchForm, AddProjectForm, CopyProjectForm, ContentForm, MediaForm
+from forms import LdtImportForm, LdtAddForm, SearchForm, AddProjectForm, \
+    CopyProjectForm, ContentForm, MediaForm
 from ldt.core.models import Owner
 from models import *
-from utils import *
-from contentindexer import *
 from projectserializer import *
 from string import Template
-from Ft.Xml import MarkupWriter
+from urllib2 import urlparse
+from utils import *
+import base64
 import cgi
+import django.core.urlresolvers
+import ldt.auth as ldt_auth
+import ldt.utils.path as ldt_utils_path
+import logging
+import lucene
+import tempfile
+import urllib2
 import uuid
-import base64
-import lucene
 import xml.dom
 import xml.dom.ext
 import xml.dom.minidom
-import tempfile
-import urllib2
-from urllib2 import urlparse
-from jogging import logging
-import ldt.utils.path
-import ldt.auth as ldt_auth
-from django.utils.translation import ugettext as _
-
 
     
 def searchForm(request):
@@ -159,11 +162,15 @@
         if form.is_valid():
             user = request.user
             Project.create_project(title=form.cleaned_data['title'], user=user, contents=form.cleaned_data['contents'])
-            return HttpResponseRedirect(reverse("ldt.ldt_utils.views.list_ldt"))
+            form_status = "saved"
+            contents=[]
+            #return HttpResponseRedirect(reverse("ldt.ldt_utils.views.list_ldt"))
     else:
         form = LdtAddForm()
-        contents = Content.objects.all()    
-        return render_to_response('ldt/ldt_utils/create_ldt.html', {'contents': contents, 'form': form,'create_project_action':reverse(create_ldt_view)}, context_instance=RequestContext(request))
+        contents = Content.objects.all()
+        form_status = "none"
+            
+    return render_to_response('ldt/ldt_utils/create_ldt.html', {'contents': contents, 'form': form, 'form_status':form_status,'create_project_action':reverse(create_ldt_view)}, context_instance=RequestContext(request))
      
 def created_ldt(request):
     return render_to_response('ldt/ldt_utils/done.html', context_instance=RequestContext(request))
@@ -358,7 +365,42 @@
             return HttpResponseRedirect(reverse('ldt.ldt_utils.views.indexProject', args=[project.ldt_id]))
     else:
         form = AddProjectForm()
-    return render_to_response('ldt/ldt_utils/create_ldt.html', {'form':form, 'contents':contents, 'iri_id':iri_id, 'create_project_action':reverse("ldt.ldt_utils.views.create_project",args=[iri_id])}, context_instance=RequestContext(request))
+    return render_to_response('ldt/ldt_utils/create_ldt.html', {'form':form, 'contents':contents, 'create_project_action':reverse("ldt.ldt_utils.views.create_project",args=[iri_id])}, 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()
+    if request.method == "POST" :
+        submit_action = request.REQUEST.get("submit_button",False)
+        if submit_action == "prepare_delete":
+            errors = []
+            if project.state == 2:
+                errors.append(_("the project %(title)s is published. please unpublish before deleting.")%{'title':project.title})
+                message = _("can not delete the project. Please correct the following error")
+                title =  _('title error deleting project')
+            else:
+                message = _("please confirm deleting project %(title)s")%{'title':project.title}
+                title = _("confirm deletion")
+            return render_to_response('ldt/ldt_utils/error_confirm.html', {'errors':errors, 'message':message, 'title': title}, context_instance=RequestContext(request))
+        elif submit_action == "delete":
+            if project.state != 2:
+                project.delete()
+            form_status= 'deleted'
+            form = AddProjectForm()
+        else:
+            form_status= 'saved'
+            form = AddProjectForm(request.POST)
+            if form.is_valid():
+                project.title=form.cleaned_data['title']
+                project.save()
+    else:
+        form = AddProjectForm({'title':unicode(project.title)})
+        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))
+
 
 @login_required
 def copy_project(request, ldt_id):
@@ -377,6 +419,7 @@
 
 def write_content_base(request, iri_id=None):
 
+    logging.debug(repr(request))
     if iri_id:        
         instance_content = Content.objects.get(iri_id=iri_id)
         instance_media = instance_content.media_obj
@@ -408,59 +451,70 @@
             elif media_input_type == "link":
                 media = content_form.cleaned_data["media_obj"]
                 created = False
-            elif media_input_type == "url" or  media_input_type == "upload" or  media_input_type == "create":                
+            elif media_input_type == "create":
+                del cleaned_data["media_file"]
+                if not cleaned_data['videopath']:
+                    cleaned_data['videopath'] = settings.STREAM_URL
+                media, created = Media.objects.get_or_create(src=cleaned_data['src'], defaults=cleaned_data)
+            elif media_input_type == "url" or  media_input_type == "upload" :                
                 # copy file
                 #complet src
                 destination_file = None
                 source_file = None
                 destination_file_path = None
-                if media_input_type != "create":
-                    try:
-                        if media_input_type == "url":
-                            url = cleaned_data["external_src_url"]
-                            source_file = urllib2.urlopen(url)
-                            source_filename = source_file.info().get('Content-Disposition', None)
-                            if not source_filename:
-                                source_filename = urlparse.urlparse(url).path.rstrip("/").split('/')[-1]
-                        elif media_input_type == "upload":
-                            source_file = request.FILES['media-media_file']
-                            source_filename = source_file.name
-                            
-                        source_filename = ldt.utils.path.sanitize_filename(source_filename)
-                        destination_filepath = os.path.join(settings.STREAM_PATH, source_filename)
-                        base_source_filename = source_filename
-                        extension = base_source_filename.split(".")[-1]
-                        if extension == base_source_filename:
-                            extension = ""
-                            base_basename_filename = base_source_filename
-                        else:
-                            base_basename_filename  =  base_source_filename[:-1 *(len(extension)+1)]
-                        i = 0
-                        while os.path.exists(destination_filepath):
-                            base_source_filename = "%s.%d.%s" % (base_basename_filename,i,extension)
-                            destination_filepath = os.path.join(settings.STREAM_PATH, base_source_filename)
-                            i += 1
-                            
-                        destination_file = open(destination_filepath, "w")
-                        src_prefix = settings.STREAM_SRC_PREFIX.rstrip("/")
-                        if len(src_prefix) > 0:
-                            cleaned_data["src"] = src_prefix + "/" + base_source_filename
-                        else:
-                            cleaned_data["src"] =  base_source_filename
+                try:
+                    if media_input_type == "url":
+                        url = cleaned_data["external_src_url"]
+                        source_file = urllib2.urlopen(url)
+                        source_filename = source_file.info().get('Content-Disposition', None)
+                        if not source_filename:
+                            source_filename = urlparse.urlparse(url).path.rstrip("/").split('/')[-1]
+                    elif media_input_type == "upload":
+                        source_file = request.FILES['media-media_file']
+                        source_filename = source_file.name
+                    
+                    source_filename = ldt_utils_path.sanitize_filename(source_filename)
+                    destination_filepath = os.path.join(settings.STREAM_PATH, source_filename)
+                    base_source_filename = source_filename
+                    extension = base_source_filename.split(".")[-1]
+                    if extension == base_source_filename:
+                        extension = ""
+                        base_basename_filename = base_source_filename
+                    else:
+                        base_basename_filename  =  base_source_filename[:-1 *(len(extension)+1)]
+                    i = 0
+                    while os.path.exists(destination_filepath):
+                        base_source_filename = "%s.%d.%s" % (base_basename_filename,i,extension)
+                        destination_filepath = os.path.join(settings.STREAM_PATH, base_source_filename)
+                        i += 1
                         
+                    destination_file = open(destination_filepath, "w")
+                    src_prefix = settings.STREAM_SRC_PREFIX.rstrip("/")
+                    if len(src_prefix) > 0:
+                        cleaned_data["src"] = src_prefix + "/" + base_source_filename
+                    else:
+                        cleaned_data["src"] =  base_source_filename
+                    
+                    chunck = source_file.read(2048)
+                    while chunck:
+                        destination_file.write(chunck)
                         chunck = source_file.read(2048)
-                        while chunck:
-                            destination_file.write(chunck)
-                            chunck = source_file.read(2048)
-            
-                    except Exception as inst:
-                        logging.debug("write_content_base : POST error when processing file:" + str(inst))
-                        form_status = "error"
-                    finally:
-                        if destination_file:
-                            destination_file.close()
-                        if source_file:
-                            source_file.close()
+        
+                except Exception as inst:
+                    logging.debug("write_content_base : POST error when processing file:" + str(inst))
+                    form_status = "error"
+                    #set error for form
+                    if media_input_type == "url":
+                        errors = media_form._errors.setdefault("external_src_url", ErrorList())
+                        errors.append(_("Problem when downloading file from url : ")+str(inst))
+                    elif media_input_type == "upload":
+                        errors = media_form._errors.setdefault("media_file", ErrorList())
+                        errors.append(_("Problem when uploading file : ") + str(inst))
+                finally:
+                    if destination_file:
+                        destination_file.close()
+                    if source_file:
+                        source_file.close()
                         
                 if form_status != "error":
                     #try:
@@ -517,18 +571,61 @@
     
     return content_form, media_form, form_status
 
-
+@login_required
 def write_content(request, iri_id=None):
     
-    logging.debug("write_content : " + str(iri_id) )
-    content_form, media_form, form_status = write_content_base(request, iri_id)
-    
+    submit_action = request.REQUEST.get("submit_button",False) 
+
+    if submit_action == "prepare_delete": 
+        errors, titles = prepare_delete_content(request, iri_id)
+        if errors and len(errors) > 0:
+            message = ungettext("There is %(count)d error when deleting content", "There are %(count)d errors when deleting content", len(errors)) % { 'count': len(errors)}
+            title_msg = _('title error deleting content')
+        else:
+            message = _("Confirm delete content %(titles)s") % { 'titles' : ",".join(titles) }
+            title_msg = _("confirm delete content")
+        return render_to_response('ldt/ldt_utils/error_confirm.html', {'errors':errors, 'message':message, 'title': title_msg}, context_instance=RequestContext(request))  
+    elif submit_action == "delete":
+        delete_content(request, iri_id)
+        form_status = "deleted"
+        content_form = ContentForm()
+        media_form = MediaForm()
+    else:
+        content_form, media_form, form_status = write_content_base(request, iri_id)
+
     if iri_id:
         create_content_action =  reverse(write_content, kwargs={'iri_id':iri_id})
     else:
         create_content_action =  reverse(write_content)
+
     
-    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}, 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, 'iri_id': iri_id}, context_instance=RequestContext(request))
+
+@login_required
+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):
+            titles.append(unicode(content.title))
+            projects = Content.objects.all()[0].project_set.all()
+            projects_nb = len(projects)
+            if projects_nb > 0:
+                project_titles = [lambda p: p.title for p in projects]
+                errors.append(ungettext("Content '%(title)s' is referenced by this project : %(project_titles)s. Please delete it beforehand.", "Content '%(title)s' is referenced by %(count)d projects: %(project_titles)s. Please delete them beforehand.", projects_nb)%{'title':content.title,'count':projects_nb, 'project_titles': ",".join(project_titles)}) 
+        
+    return errors, titles
 
 
+@login_required
+def delete_content(request, iri_id=None):
+    if not iri_id:
+        iri_id = request.REQUEST.get("iri_id", None)
+        
+    if iri_id:
+        Content.objects.filter(iri_id=iri_id).delete()
+    
     
\ No newline at end of file
Binary file web/ldt/locale/en/LC_MESSAGES/django.mo has changed
--- a/web/ldt/locale/en/LC_MESSAGES/django.po	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/ldt/locale/en/LC_MESSAGES/django.po	Tue Oct 12 03:23:33 2010 +0200
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-21 05:10+0200\n"
+"POT-Creation-Date: 2010-10-12 03:19+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"
@@ -18,15 +18,15 @@
 
 #: 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
+#: ldt_utils/forms.py:43 ldt_utils/models.py:80
 msgid "content.content_creation_date"
-msgstr ""
+msgstr "content creation date"
 
 #: ldt_utils/forms.py:44
 msgid "content.media_input_type"
@@ -34,66 +34,67 @@
 
 #: ldt_utils/forms.py:44
 msgid "file_upload"
-msgstr ""
+msgstr "file upload"
 
 #: ldt_utils/forms.py:44
 msgid "url"
-msgstr ""
+msgstr "url"
 
 #: ldt_utils/forms.py:44
 msgid "existing_media"
-msgstr ""
+msgstr "existing media"
 
 #: ldt_utils/forms.py:44
-#, fuzzy
 msgid "create_media"
-msgstr "created by"
+msgstr "create media"
 
 #: ldt_utils/forms.py:44
 msgid "none_media"
-msgstr ""
+msgstr "no media"
 
 #: ldt_utils/models.py:23
 msgid "media.external_id"
-msgstr ""
+msgstr "external id"
 
 #: ldt_utils/models.py:24
-msgid "content.external_permalink"
-msgstr ""
+msgid "media.external_permalink"
+msgstr "media permalink"
 
-#: ldt_utils/models.py:25 ldt_utils/models.py:26
-msgid "content.external_publication_url"
-msgstr ""
+#: ldt_utils/models.py:25
+msgid "media.external_publication_url"
+msgstr "media publication url"
+
+#: ldt_utils/models.py:26
+msgid "media.external_src_url"
+msgstr "media external source url"
 
 #: ldt_utils/models.py:27
 msgid "media.creation_date"
-msgstr ""
+msgstr "media object creation date"
 
 #: ldt_utils/models.py:28
 msgid "media.media_creation_date"
-msgstr ""
+msgstr "media creation date"
 
 #: ldt_utils/models.py:29
 msgid "media.update_date"
-msgstr ""
+msgstr "update date"
 
 #: ldt_utils/models.py:30
 msgid "media.videopath"
-msgstr ""
+msgstr "videopath"
 
 #: ldt_utils/models.py:31
-#, fuzzy
 msgid "media.duration"
 msgstr "duration (ms)"
 
 #: ldt_utils/models.py:32
 msgid "media.creator"
-msgstr ""
+msgstr "media creator"
 
 #: ldt_utils/models.py:33
-#, fuzzy
 msgid "description"
-msgstr "Login"
+msgstr "description"
 
 #: ldt_utils/models.py:34
 #: ldt_utils/templates/ldt/ldt_utils/content_list.html:69
@@ -103,48 +104,117 @@
 
 #: ldt_utils/models.py:35
 msgid "media.src"
-msgstr ""
+msgstr "media source"
 
-#: ldt_utils/models.py:48
+#: ldt_utils/models.py:72
 msgid "content.iri_id"
-msgstr ""
+msgstr "iri id"
 
-#: ldt_utils/models.py:49
+#: ldt_utils/models.py:73
 msgid "content.iriurl"
-msgstr ""
+msgstr "iri url"
 
-#: ldt_utils/models.py:52
+#: ldt_utils/models.py:74
 msgid "content.creation_date"
-msgstr ""
+msgstr "content creation date"
 
-#: ldt_utils/models.py:53
+#: ldt_utils/models.py:75
 msgid "content.update_date"
-msgstr ""
+msgstr "content update date"
 
-#: ldt_utils/models.py:54
+#: ldt_utils/models.py:76
 msgid "content.title"
-msgstr ""
+msgstr "title"
 
-#: ldt_utils/models.py:55
+#: ldt_utils/models.py:77
 msgid "content.description"
 msgstr "description"
 
-#: ldt_utils/models.py:57
+#: ldt_utils/models.py:78
 msgid "content.authors"
 msgstr "authors"
 
-#: ldt_utils/models.py:58
+#: ldt_utils/models.py:79
 msgid "content.duration"
 msgstr "duration (ms)"
 
-#: ldt_utils/models.py:209
+#: ldt_utils/models.py:248
 msgid "created by"
 msgstr "created by"
 
-#: ldt_utils/models.py:210
+#: ldt_utils/models.py:249
 msgid "changed by"
 msgstr "changed by"
 
+#: ldt_utils/views.py:231
+msgid "You can not access this project"
+msgstr "You can not access this project"
+
+#: ldt_utils/views.py:380
+#, 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:381
+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:382
+msgid "title error deleting project"
+msgstr "Error when deleting project"
+
+#: ldt_utils/views.py:384
+#, python-format
+msgid "please confirm deleting project %(title)s"
+msgstr "Please confirm deleting project %(title)s"
+
+#: ldt_utils/views.py:385
+msgid "confirm deletion"
+msgstr "Confirm deletion"
+
+#: ldt_utils/views.py:509
+msgid "Problem when downloading file from url : "
+msgstr "Problem when downloading file from url: "
+
+#: ldt_utils/views.py:512
+msgid "Problem when uploading file : "
+msgstr "Problem when uploading file: "
+
+#: ldt_utils/views.py:582
+#, 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:583
+msgid "title error deleting content"
+msgstr "Error when deleting content"
+
+#: ldt_utils/views.py:585
+#, python-format
+msgid "Confirm delete content %(titles)s"
+msgstr "Confirm delete content %(titles)s"
+
+#: ldt_utils/views.py:586
+msgid "confirm delete content"
+msgstr "Confirm delete content"
+
+#: ldt_utils/views.py:618
+#, python-format
+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] ""
+"Content '%(title)s' is referenced by this project : %(project_titles)s. "
+"Please delete it beforehand."
+msgstr[1] ""
+"Content '%(title)s' is referenced by %(count)d projects: %(project_titles)s. "
+"Please delete them beforehand."
+
 #: ldt_utils/templates/admin/ldt_utils/app_action.html:4
 #: templates/admin/cms_change_list.html:7
 #: templates/admin/page_app_index.html:8
@@ -214,6 +284,14 @@
 msgid "Create"
 msgstr "Create"
 
+#: ldt_utils/templates/ldt/ldt_utils/error_confirm.html:16
+msgid "error"
+msgstr "Error"
+
+#: ldt_utils/templates/ldt/ldt_utils/error_confirm.html:25
+msgid "close_error"
+msgstr "Close"
+
 #: ldt_utils/templates/ldt/ldt_utils/ldt_list.html:59
 msgid "Create new project"
 msgstr "Create new project"
Binary file web/ldt/locale/fr/LC_MESSAGES/django.mo has changed
--- a/web/ldt/locale/fr/LC_MESSAGES/django.po	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/ldt/locale/fr/LC_MESSAGES/django.po	Tue Oct 12 03:23:33 2010 +0200
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-21 05:10+0200\n"
+"POT-Creation-Date: 2010-10-12 03:19+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"
@@ -24,7 +24,7 @@
 msgid "Time"
 msgstr "Time"
 
-#: ldt_utils/forms.py:43 ldt_utils/models.py:59
+#: ldt_utils/forms.py:43 ldt_utils/models.py:80
 msgid "content.content_creation_date"
 msgstr "Date de creation du contenu"
 
@@ -46,7 +46,7 @@
 
 #: ldt_utils/forms.py:44
 msgid "create_media"
-msgstr "créé par"
+msgstr "source serveur de stream"
 
 #: ldt_utils/forms.py:44
 msgid "none_media"
@@ -57,13 +57,17 @@
 msgstr "id externe"
 
 #: ldt_utils/models.py:24
-msgid "content.external_permalink"
+msgid "media.external_permalink"
 msgstr "permalien externe"
 
-#: ldt_utils/models.py:25 ldt_utils/models.py:26
-msgid "content.external_publication_url"
+#: ldt_utils/models.py:25
+msgid "media.external_publication_url"
 msgstr "url de publication externe"
 
+#: ldt_utils/models.py:26
+msgid "media.external_src_url"
+msgstr "url source"
+
 #: ldt_utils/models.py:27
 msgid "media.creation_date"
 msgstr "Date de création"
@@ -102,46 +106,116 @@
 msgid "media.src"
 msgstr "Sources"
 
-#: ldt_utils/models.py:48
+#: ldt_utils/models.py:72
 msgid "content.iri_id"
 msgstr "iri id"
 
-#: ldt_utils/models.py:49
+#: ldt_utils/models.py:73
 msgid "content.iriurl"
 msgstr "iri url"
 
-#: ldt_utils/models.py:52
+#: ldt_utils/models.py:74
 msgid "content.creation_date"
 msgstr "date de création"
 
-#: ldt_utils/models.py:53
+#: ldt_utils/models.py:75
 msgid "content.update_date"
 msgstr "Date de maj"
 
-#: ldt_utils/models.py:54
+#: ldt_utils/models.py:76
 msgid "content.title"
 msgstr "titre"
 
-#: ldt_utils/models.py:55
+#: ldt_utils/models.py:77
 msgid "content.description"
 msgstr "Description"
 
-#: ldt_utils/models.py:57
+#: ldt_utils/models.py:78
 msgid "content.authors"
 msgstr "Autheurs"
 
-#: ldt_utils/models.py:58
+#: ldt_utils/models.py:79
 msgid "content.duration"
 msgstr "Durée (ms)"
 
-#: ldt_utils/models.py:209
+#: ldt_utils/models.py:248
 msgid "created by"
 msgstr "créé par"
 
-#: ldt_utils/models.py:210
+#: ldt_utils/models.py:249
 msgid "changed by"
 msgstr "modifié par"
 
+#: ldt_utils/views.py:231
+msgid "You can not access this project"
+msgstr "vous n'avez pas l'autorisation d'accéder à ce projet"
+
+#: ldt_utils/views.py:380
+#, 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:381
+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:382
+msgid "title error deleting project"
+msgstr "Erreur lors de l'effacement du projet"
+
+#: ldt_utils/views.py:384
+#, python-format
+msgid "please confirm deleting project %(title)s"
+msgstr "Confirmer l'efaccement du projet intitulé %(title)s"
+
+#: ldt_utils/views.py:385
+msgid "confirm deletion"
+msgstr "Confirmation d'effacement"
+
+#: ldt_utils/views.py:509
+msgid "Problem when downloading file from url : "
+msgstr "Problème lors du téléchargement du fichier : "
+
+#: ldt_utils/views.py:512
+msgid "Problem when uploading file : "
+msgstr "Problème lors de l'upload du fichier : "
+
+#: ldt_utils/views.py:582
+#, 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:583
+msgid "title error deleting content"
+msgstr "Erreur lors de l'effacement du contenu"
+
+#: ldt_utils/views.py:585
+#, python-format
+msgid "Confirm delete content %(titles)s"
+msgstr "Veuillez confirmer l'effacement du contenu %(titles)s"
+
+#: ldt_utils/views.py:586
+msgid "confirm delete content"
+msgstr "Confirmation effacement contenu"
+
+#: ldt_utils/views.py:618
+#, python-format
+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:4
 #: templates/admin/cms_change_list.html:7
 #: templates/admin/page_app_index.html:8
@@ -170,7 +244,6 @@
 msgstr "Liste des contenus"
 
 #: ldt_utils/templates/ldt/ldt_utils/content_list.html:63
-#, fuzzy
 msgid "Create new content"
 msgstr "Créer un nouveau contenu"
 
@@ -180,7 +253,6 @@
 
 #: ldt_utils/templates/ldt/ldt_utils/content_list.html:70
 #: ldt_utils/templates/ldt/ldt_utils/content_list.html:77
-#, fuzzy
 msgid "create project"
 msgstr "Créer un nouveau projet Ligne de Temps"
 
@@ -213,6 +285,14 @@
 msgid "Create"
 msgstr "Créer"
 
+#: ldt_utils/templates/ldt/ldt_utils/error_confirm.html:16
+msgid "error"
+msgstr "Erreur"
+
+#: ldt_utils/templates/ldt/ldt_utils/error_confirm.html:25
+msgid "close_error"
+msgstr "Fermer"
+
 #: ldt_utils/templates/ldt/ldt_utils/ldt_list.html:59
 msgid "Create new project"
 msgstr "Créer un nouveau projet Ligne de Temps"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/static/css/embed_popup.css	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,33 @@
+pre {
+white-space: pre-wrap; /* css-3 */
+white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
+white-space: -pre-wrap; /* Opera 4-6 */
+white-space: -o-pre-wrap; /* Opera 7 */
+word-wrap: break-word; /* Internet Explorer 5.5+ */
+}
+
+input
+{
+	background: #ededed;
+}
+
+input[type="button"] {
+	background-color: #656565;
+	color: white;
+	width: auto;
+	font-weight: bold;
+	padding: 5px 10px;
+}
+
+#button_row input {
+	margin: 10px; 
+}
+
+#display_select {
+	float: left;
+}
+
+#copy_div {
+	float: right;
+}
+
--- a/web/static/css/ldtform.css	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/static/css/ldtform.css	Tue Oct 12 03:23:33 2010 +0200
@@ -47,10 +47,27 @@
 #submitcontent {
 	border-top: 1px solid black;
 	padding-top : 10px;
+}
+
+#submitcontent-buttons {
 	text-align: right;
 }
 
-#add_content input[type="submit"], #add_contribution input[type="submit"] {
+#submitcontent-loader {
+	text-align: left;
+}
+
+.submitcontent-loader-content {
+	display: none;
+}
+
+
+#submitcontent-loader-msg {
+	padding-left: 6px;
+}
+
+
+#submitcontent-buttons input[type="submit"], #submitcontent-buttons button  {
 	background-color: #656565;
 	color: white;
 	width:auto;
@@ -114,3 +131,9 @@
 	border: 1px solid #DDD;
 }
 
+.error_message {
+	padding: 3em 2em;
+	font-size: larger;
+	font-weight: bold;   
+}
+
--- a/web/static/css/workspace.css	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/static/css/workspace.css	Tue Oct 12 03:23:33 2010 +0200
@@ -109,6 +109,12 @@
 	color: #4F5155;
 }
 
+.projecttitlelink,.projecttitlelink:link,.projecttitlelink:hover,.projecttitlelink:visited {
+	text-decoration: none;
+	color: #4F5155;
+}
+
+
 .projecttitle {
 	width: 367px;
 	padding: 4px 10px 4px 5px;	
Binary file web/static/img/ajax-loader-220x19.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/static/js/embed_popup.js	Tue Oct 12 03:23:33 2010 +0200
@@ -0,0 +1,49 @@
+var display_state = "player";
+
+function toggle_display() {
+	$j.each(["player","seo_body","seo_meta","links"], function(i,display_str) {
+
+		var div_selector = "#"+display_str+"_code";
+		if(display_str == display_state) {
+			$j(div_selector).show();
+		}
+		else {
+			$j(div_selector).hide();
+		}
+	});
+}
+
+$j(document).ready(function(){
+	
+	toggle_display();
+	
+	$j('.ldt_json_link').click(function(e) {
+    	e.preventDefault();
+ 		link = $j(e.target);
+ 		$j("#res_link_{{player_id}}").load(link.attr("href"));
+ 		$j("#res_link_{{player_id}}").show();
+ 		return false;
+    });
+
+    $j('#player_button').click(function(e) {
+    	display_state = "player";
+    	toggle_display();
+    });
+    $j('#seo_body_button').click(function(e) {
+    	display_state = "seo_body";
+    	toggle_display();
+    });
+    $j('#seo_meta_button').click(function(e) {
+    	display_state = "seo_meta";
+    	toggle_display();
+    });
+    $j('#links_button').click(function(e) {
+    	display_state = "links";
+    	toggle_display();
+    });
+
+   $j("#copy_button").click(function(e) {
+ 	   alert($j("#"+display_state+"_code").html());
+   });	 	    
+    
+});
--- a/web/static/js/projectscontents.js	Wed Sep 29 10:10:07 2010 +0200
+++ b/web/static/js/projectscontents.js	Tue Oct 12 03:23:33 2010 +0200
@@ -23,45 +23,24 @@
    		width:1022,
    		bgColor: 'rgb(239, 239, 239)',
    		padding: 5,
-   		titleFromIframe: false
+   		titleFromIframe: false,
+        beforeHideContent: function(elts, settings, callback){
+	        try {
+	             var res = $('#ldtInitSwf',$('#nyroModalIframe').contents());
+	             if(res.length > 0)
+	             {
+	             	   res.get(0).forceSave();
+	             }
+	        }
+	        catch(err)
+	        {
+	         // do nothing
+	        }                   
+	        callback();
+   		},
+
       	});
     	
- 	$('.ldt_link_create',base_node).nyroModal({
-        type: 'iframe',
-        forceType: 'iframe',
-        windowResize: false,
-        height:680, 
-        width:500,
-        bgColor: 'rgb(239, 239, 239)',
-        padding: 5,
-        titleFromIframe: false,
-        beforeHideContent: function(elts, settings, callback){
-             try {
-	              var res = $('#ldtInitSwf',$('#nyroModalIframe').contents());
-	              if(res.length > 0)
-	              {
-	              	   res.get(0).forceSave();
-	              }
-             }
-             catch(err)
-             {
-              // do nothing
-             }                   
-             callback();
-        	},
-        	endShowContent: function(elts, settings){
-        		var iframe = $('#nyroModalIframe', elts.content);
-    			iframe.load(function(){
-    				var swfobject = $(this).contents().find("#ldtInitSwf"); 
-    				if (swfobject.length) {
-    					$.nyroModalSettings({
-    						height: swfobject.height() + 31,
-    						width: swfobject.width() + 21
-    					});
-    				}
-    			});
-        	}
-    	});
 
 	$('.ldt_link_embed',base_node).click(function(e) {
 		e.preventDefault();
@@ -130,22 +109,30 @@
 	if(target.attr('timer')) {
 		clearTimeout(target.attr('timer'));
 	}
-	
-	target.attr('timer',setTimeout(function() {
-		target.next(".searchajaxloader").show();
-		target.nextAll(".searchclear").hide();
-		var filterVal = "_" + escape(target.realVal());
-		url = url.replace('__FILTER__',filterVal);
-		$(container_selector).load(url, null, function() {
-			target.next(".searchajaxloader").hide();
-			if(target.realVal().length > 0) {
-				target.nextAll(".searchclear").show();
-			}
-			init_events($(container_selector));
-			target.removeAttr('timer');
-		});
-	},
-	300));
+
+	target.attr(
+		'timer',
+		setTimeout(function() {
+			target.next(".searchajaxloader").show();
+			target.nextAll(".searchclear").hide();
+			var filterVal = "_" + escape(target.realVal());
+			url = url.replace('__FILTER__',filterVal);
+			$.ajax({
+				url: url,
+				cache: false,
+				success: function(data, status, request) {
+					$(container_selector).html(data);
+					target.next(".searchajaxloader").hide();
+					if(target.realVal().length > 0) {
+						target.nextAll(".searchclear").show();
+					}
+					init_events($(container_selector));
+					target.removeAttr('timer');
+				}
+			});	
+		},
+		300)
+	);
 };
 
 
@@ -167,7 +154,7 @@
 	  	endShowContent: function(elts, settings) {
 		  	$('#nyroModalIframe', elts.content).load(function() {
 			  	var form_status = $(this).contents().find("#content_form_status").val(); 
-			  	if(form_status == 'saved') {
+			  	if(form_status == 'saved' || form_status == 'deleted' ) {
 			  		$.nyroModalRemove();
 			  	}
 		  	});
@@ -183,12 +170,12 @@
 	    padding: 5,
 	    titleFromIframe: false,
 	    endRemove: function(elts, settings) {
-	    	searchCallback($("#searchcontentsinput"),"#contentslistcontainer",content_filter_url)
+	    	searchCallback($("#searchcontentsinput"),"#contentslistcontainer",content_filter_url,0);
 		},
 	  	endShowContent: function(elts, settings) {
 		  	$('#nyroModalIframe', elts.content).load(function() {
 			  	var form_status = $(this).contents().find("#content_form_status").val(); 
-			  	if(form_status == 'saved') {
+			  	if(form_status == 'saved' || form_status == 'deleted') {
 			  		$.nyroModalRemove();
 			  	}
 		  	});
@@ -199,7 +186,52 @@
 }
 
 function init_events_base_projects(base_node, embed_url, searchprojectfilterurl, publishprojecturl, unpublishprojecturl) {
-		
+
+ 	$('.ldt_link_create',base_node).nyroModal({
+        type: 'iframe',
+        forceType: 'iframe',
+        windowResize: false,
+        height:680, 
+        width:500,
+        bgColor: 'rgb(239, 239, 239)',
+        padding: 5,
+        titleFromIframe: false,
+	    endRemove: function(elts, settings) {
+ 			searchCallback($('#searchprojectsinput'), "#projectslistcontainer", searchprojectfilterurl, 0);
+		},
+        beforeHideContent: function(elts, settings, callback){
+             try {
+	              var res = $('#ldtInitSwf',$('#nyroModalIframe').contents());
+	              if(res.length > 0)
+	              {
+	              	   res.get(0).forceSave();
+	              }
+             }
+             catch(err)
+             {
+              // do nothing
+             }                   
+             callback();
+        	},
+        endShowContent: function(elts, settings){
+    		var iframe = $('#nyroModalIframe', elts.content);
+			iframe.load(function(){
+			  	var form_status = $(this).contents().find("#project_form_status").val(); 
+			  	if(form_status == 'saved' || form_status == 'deleted' ) {
+			  		$.nyroModalRemove();
+			  	}
+				var swfobject = $(this).contents().find("#ldtInitSwf"); 
+				if (swfobject.length) {
+					$.nyroModalSettings({
+						height: swfobject.height() + 31,
+						width: swfobject.width() + 21
+					});
+				}
+			});
+        	}
+    	});
+
+	
 	$('.publishedproject', base_node).click(function(e) {
 		e.preventDefault();
 		var target = $(e.target);
@@ -234,6 +266,27 @@
 		});
 	});
 
+	$('.projecttitlelink').nyroModal({
+	    type: 'iframe',
+	    forceType: 'iframe',
+        height:680, 
+        width:500,
+	    bgColor: 'rgb(239, 239, 239)',
+	    padding: 5,
+	    titleFromIframe: false,
+	    endRemove: function(elts, settings) {
+			searchCallback($('#searchprojectsinput'), "#projectslistcontainer", searchprojectfilterurl, 0);
+		},
+	  	endShowContent: function(elts, settings) {
+		  	$('#nyroModalIframe', elts.content).load(function() {
+			  	var form_status = $(this).contents().find("#project_form_status").val(); 
+			  	if(form_status == 'saved' || form_status == 'deleted') {
+			  		$.nyroModalRemove();
+			  	}
+		  	});
+		}
+	});
+	
 }
 
 function init_events_projects(base_node, embed_url, searchprojectfilterurl, publishprojecturl, unpublishprojecturl) {