Templatize endpoint urls in JS
authorveltr
Wed, 05 Dec 2012 11:17:58 +0100
changeset 109 3034776c1f35
parent 108 9d6cdc1972de
child 110 40104d4cec70
Templatize endpoint urls in JS
integration/edition.html
integration/hashcut.html
integration/js/editor.js
integration/js/mashupplayer.js
integration/js/mediaplayer.js
integration/media.html
src/hashcut/locale/en/LC_MESSAGES/django.mo
src/hashcut/locale/en/LC_MESSAGES/django.po
src/hashcut/locale/fr/LC_MESSAGES/django.mo
src/hashcut/locale/fr/LC_MESSAGES/django.po
src/hashcut/static/hashcut/js/hashcut.js
src/hashcut/templates/mashup_all_mashups.html
src/hashcut/templates/mashup_content.html
src/hashcut/templates/mashup_edit.html
src/hashcut/templates/mashup_hashcut.html
--- a/integration/edition.html	Wed Dec 05 10:55:06 2012 +0100
+++ b/integration/edition.html	Wed Dec 05 11:17:58 2012 +0100
@@ -355,8 +355,8 @@
         content: "/pf/ldtplatform/api/ldt/1.0/contents/",
         project: "/pf/ldtplatform/api/ldt/1.0/projects/",
         segment: "/pf/ldtplatform/api/ldt/1.0/segments/",
-        ldt: "http://capsicum//pf/ldtplatform/ldt/cljson/id/",
-        hashcut_page: "hashcut.html?project="
+        ldt: "http://capsicum//pf/ldtplatform/ldt/cljson/id/__PROJECT_ID__",
+        hashcut_page: "hashcut.html?project=__PROJECT_ID__"
     };
     
     $(function() {
--- a/integration/hashcut.html	Wed Dec 05 10:55:06 2012 +0100
+++ b/integration/hashcut.html	Wed Dec 05 11:17:58 2012 +0100
@@ -265,8 +265,8 @@
         content: "/pf/ldtplatform/api/ldt/1.0/contents/",
         project: "/pf/ldtplatform/api/ldt/1.0/projects/",
         segment: "/pf/ldtplatform/api/ldt/1.0/segments/",
-        ldt: "http://capsicum//pf/ldtplatform/ldt/cljson/id/",
-        media_page: "media.html?media="
+        ldt: "http://capsicum//pf/ldtplatform/ldt/cljson/id/__PROJECT_ID__",
+        media_page: "media.html?media=__CONTENT_ID__"
     };
     
     var projrx = /project=([^&#]+)/,
--- a/integration/js/editor.js	Wed Dec 05 10:55:06 2012 +0100
+++ b/integration/js/editor.js	Wed Dec 05 11:17:58 2012 +0100
@@ -890,7 +890,7 @@
             success: function(data, status, request){
                 var location = request.getResponseHeader("Location"),
                     projid = location.match(/([^/]+)\/?$/)[1],
-                    destination = IriSP.endpoints.hashcut_page + projid;
+                    destination = IriSP.endpoints.hashcut_page.replace('__PROJECT_ID__', projid);
                 $(window).off("beforeunload", onLeave);
                 document.location.href = destination;
             },
--- a/integration/js/mashupplayer.js	Wed Dec 05 10:55:06 2012 +0100
+++ b/integration/js/mashupplayer.js	Wed Dec 05 11:17:58 2012 +0100
@@ -2,14 +2,14 @@
     
     var directory = new IriSP.Model.Directory(),
         project = directory.remoteSource({
-            url: IriSP.endpoints.ldt + options.id,
+            url: IriSP.endpoints.ldt.replace('__PROJECT_ID__', options.id),
             serializer: IriSP.serializers.ldt
         }),
         apidirectory = new IriSP.Model.Directory(),
         mashup,
         mediatemplate = _.template('<li class="item-video media" data-media-id="<%= media.id %>">'
-            + '<a href="<%= IriSP.endpoints.media_page + media.id %>"><img class="thumbnail" alt="<%= media.title %>" src="<%= media.thumbnail %>"></a><div class="video-info">'
-            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.media_page + media.id %>"><%= media.title %></a></h3><p class="description"><%= media.description %></p>'
+            + '<a href="<%= IriSP.endpoints.media_page.replace("__CONTENT_ID__", media.id) %>"><img class="thumbnail" alt="<%= media.title %>" src="<%= media.thumbnail %>"></a><div class="video-info">'
+            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.media_page.replace("__CONTENT_ID__", media.id) %>"><%= media.title %></a></h3><p class="description"><%= media.description %></p>'
             + '<p class="time-length">Durée : <span><%= media.duration.toString() %></span></p><div class="frise">'
             + '<div class="frise-overflow"><div class="frise-segments"><%= segments %></div></div></div></div></li>');
         segmenttemplate = _.template('<div style="background-color:<%= annotation.color %>; left:<%= left %>%; width: <%= width %>%;"'
--- a/integration/js/mediaplayer.js	Wed Dec 05 10:55:06 2012 +0100
+++ b/integration/js/mediaplayer.js	Wed Dec 05 11:17:58 2012 +0100
@@ -12,7 +12,7 @@
             + '<div class="popin media-segment-popin" style="left:<%= popleft %>px; top: <%= 5+top %>px;"><div style="left:<%= pointerpos %>px;" class="pointer"></div><div class="popin-content">'
             + '<h3><%= annotation.title %></h3>'
             + '<p><%= gettext("From:") %> <span><%= annotation.begin.toString() %></span> <%= gettext("to:") %> <span><%= annotation.end.toString() %></span> (<%= gettext("duration:") %> <span><%= annotation.getDuration().toString() %></span>)</p>'
-            + '<p class="mashup-link"><%= gettext("From hashcut:") %> <a href="<%= IriSP.endpoints.hashcut_page + annotation.project_id %>"></a></p>'
+            + '<p class="mashup-link"><%= gettext("From hashcut:") %> <a href="<%= IriSP.endpoints.hashcut_page.replace("__PROJECT_ID__", annotation.project_id) %>"></a></p>'
             + '</div></div></div>'
         ),
         segmentlisttemplate = _.template(
@@ -20,8 +20,8 @@
         ),
         projtemplate = _.template(
             '<li class="item-video mashup" data-mashup-id="<%= ldt_id %>">'
-            + '<a href="<%= IriSP.endpoints.hashcut_page + ldt_id %>"><img class="thumbnail" alt="<%= title %>" src="<%= image %>"></a><div class="video-info">'
-            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.hashcut_page + ldt_id %>"><%= title %></a></h3><p class="description"><%= description %></p>'
+            + '<a href="<%= IriSP.endpoints.hashcut_page.replace("__PROJECT_ID__", ldt_id) %>"><img class="thumbnail" alt="<%= title %>" src="<%= image %>"></a><div class="video-info">'
+            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.hashcut_page.replace("__PROJECT_ID__", ldt_id) %>"><%= title %></a></h3><p class="description"><%= description %></p>'
             + '</p></div></li>'
         ),
         media;
--- a/integration/media.html	Wed Dec 05 10:55:06 2012 +0100
+++ b/integration/media.html	Wed Dec 05 11:17:58 2012 +0100
@@ -235,8 +235,8 @@
         content: "/pf/ldtplatform/api/ldt/1.0/contents/",
         project: "/pf/ldtplatform/api/ldt/1.0/projects/",
         segment: "/pf/ldtplatform/api/ldt/1.0/segments/",
-        ldt: "http://capsicum//pf/ldtplatform/ldt/cljson/id/",
-        hashcut_page: "hashcut.html?project="
+        ldt: "http://capsicum//pf/ldtplatform/ldt/cljson/id/__PROJECT_ID__",
+        hashcut_page: "hashcut.html?project=__PROJECT_ID__"
     };
     
     var mediarx = /media=([^&#]+)/,
Binary file src/hashcut/locale/en/LC_MESSAGES/django.mo has changed
--- a/src/hashcut/locale/en/LC_MESSAGES/django.po	Wed Dec 05 10:55:06 2012 +0100
+++ b/src/hashcut/locale/en/LC_MESSAGES/django.po	Wed Dec 05 11:17:58 2012 +0100
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-04 17:01+0100\n"
+"POT-Creation-Date: 2012-12-05 11:13+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,83 +18,95 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: templates/mashup_all_mashups.html:22 templates/mashup_content.html:26
-#: templates/mashup_edit.html:44 templates/mashup_home.html:15
-#: templates/mashup_profile.html:26
+#: templates/mashup_all_mashups.html:22 templates/mashup_content.html:54
+#: templates/mashup_edit.html:78 templates/mashup_home.html:15
+#: templates/mashup_profile.html:27
 msgid "Home"
 msgstr "Home"
 
-#: templates/mashup_all_mashups.html:23 templates/mashup_content.html:27
-#: templates/mashup_profile.html:27
+#: templates/mashup_all_mashups.html:23 templates/mashup_content.html:55
+#: templates/mashup_profile.html:28
 msgid "New hashcut"
 msgstr "New Hashcut"
 
-#: templates/mashup_all_mashups.html:24 templates/mashup_content.html:28
-#: templates/mashup_edit.html:45 templates/mashup_home.html:46
-#: templates/mashup_profile.html:28
+#: templates/mashup_all_mashups.html:24 templates/mashup_content.html:56
+#: templates/mashup_edit.html:79 templates/mashup_home.html:65
+#: templates/mashup_profile.html:29
 msgid "My profile"
 msgstr "My profile"
 
+#: templates/mashup_all_mashups.html:36
+msgid "Previous"
+msgstr "Previous"
+
+#: templates/mashup_all_mashups.html:44
+msgid "Next"
+msgstr "Next"
+
+#: templates/mashup_all_mashups.html:47
+msgid "All"
+msgstr "All"
+
 #: templates/mashup_content.html:6
 #, python-format
 msgid "Playing video %(title)s"
 msgstr "Playing Video “%(title)s”"
 
-#: templates/mashup_content.html:18
+#: templates/mashup_content.html:46
 msgid "Video"
 msgstr "Video"
 
-#: templates/mashup_content.html:51 templates/mashup_edit.html:94
-#: templates/mashup_hashcut.html:50
+#: templates/mashup_content.html:79 templates/mashup_edit.html:128
+#: templates/mashup_hashcut.html:78
 msgid "Play/Pause"
 msgstr "Play/Pause"
 
-#: templates/mashup_content.html:57 templates/mashup_edit.html:106
-#: templates/mashup_hashcut.html:56
+#: templates/mashup_content.html:85 templates/mashup_edit.html:140
+#: templates/mashup_hashcut.html:84
 msgid "Elapsed time"
 msgstr "Elapsed time"
 
-#: templates/mashup_content.html:59 templates/mashup_edit.html:108
-#: templates/mashup_hashcut.html:58
+#: templates/mashup_content.html:87 templates/mashup_edit.html:142
+#: templates/mashup_hashcut.html:86
 msgid "Total time"
 msgstr "Total time"
 
-#: templates/mashup_content.html:62 templates/mashup_edit.html:111
-#: templates/mashup_hashcut.html:61
+#: templates/mashup_content.html:90 templates/mashup_edit.html:145
+#: templates/mashup_hashcut.html:89
 msgid "Mute/Unmute"
 msgstr "Mute/Unmute"
 
-#: templates/mashup_content.html:64 templates/mashup_edit.html:113
-#: templates/mashup_hashcut.html:63
+#: templates/mashup_content.html:92 templates/mashup_edit.html:147
+#: templates/mashup_hashcut.html:91
 msgid "Set volume"
 msgstr "Set volume"
 
-#: templates/mashup_content.html:75
+#: templates/mashup_content.html:103
 msgid "More informations"
 msgstr "More informations"
 
-#: templates/mashup_content.html:80 templates/mashup_edit.html:22
-#: templates/mashup_edit.html.py:142 templates/mashup_hashcut.html:114
+#: templates/mashup_content.html:108 templates/mashup_edit.html:56
+#: templates/mashup_edit.html.py:176 templates/mashup_hashcut.html:142
 msgid "Title:"
 msgstr "Title:"
 
-#: templates/mashup_content.html:84 templates/mashup_edit.html:40
-#: templates/mashup_hashcut.html:118
+#: templates/mashup_content.html:112 templates/mashup_edit.html:74
+#: templates/mashup_hashcut.html:146
 msgid "Duration:"
 msgstr "Duration:"
 
-#: templates/mashup_content.html:88 templates/mashup_edit.html:26
-#: templates/mashup_edit.html.py:152 templates/mashup_edit.html:210
-#: templates/mashup_hashcut.html:94 templates/mashup_hashcut.html.py:126
+#: templates/mashup_content.html:116 templates/mashup_edit.html:60
+#: templates/mashup_edit.html.py:186 templates/mashup_edit.html:244
+#: templates/mashup_hashcut.html:122 templates/mashup_hashcut.html.py:154
 msgid "Description:"
 msgstr "Description:"
 
-#: templates/mashup_content.html:92 templates/mashup_edit.html:146
-#: templates/mashup_edit.html.py:214 templates/mashup_hashcut.html:98
+#: templates/mashup_content.html:120 templates/mashup_edit.html:180
+#: templates/mashup_edit.html.py:248 templates/mashup_hashcut.html:126
 msgid "Tags:"
 msgstr "Tags:"
 
-#: templates/mashup_content.html:99
+#: templates/mashup_content.html:127
 msgid "Hashcuts using this video"
 msgstr "Hashcuts using this video"
 
@@ -102,91 +114,91 @@
 msgid "Hashcut editor"
 msgstr "Hashcut editor"
 
-#: templates/mashup_edit.html:23 templates/mashup_edit.html.py:38
+#: templates/mashup_edit.html:57 templates/mashup_edit.html.py:72
 msgid "Untitled Hashcut"
 msgstr "Untitled Hashcut"
 
-#: templates/mashup_edit.html:57
+#: templates/mashup_edit.html:91
 msgid "Select videos"
 msgstr "Select videos"
 
-#: templates/mashup_edit.html:58
+#: templates/mashup_edit.html:92
 msgid "Search videos"
 msgstr "Search videos"
 
-#: templates/mashup_edit.html:68
+#: templates/mashup_edit.html:102
 msgid "Segment"
 msgstr "Segment"
 
-#: templates/mashup_edit.html:69
+#: templates/mashup_edit.html:103
 msgid "Preview and publish"
 msgstr "Preview and publish"
 
-#: templates/mashup_edit.html:74
+#: templates/mashup_edit.html:108
 msgid "Creating a hashcut is easy!"
 msgstr "Creating a Hashcut is easy!"
 
-#: templates/mashup_edit.html:76
+#: templates/mashup_edit.html:110
 msgid "Start by selecting a video in the left hand column."
 msgstr "Start by selecting a video in the left hand column."
 
-#: templates/mashup_edit.html:77
+#: templates/mashup_edit.html:111
 msgid "Create a segment in your video and annotate it."
 msgstr "Create a segment in your video and annotate it."
 
-#: templates/mashup_edit.html:78
+#: templates/mashup_edit.html:112
 msgid "Append your segment to the hashcut and reorder the segments"
 msgstr "Append your segment to the hashcut and reorder the segments"
 
-#: templates/mashup_edit.html:79
+#: templates/mashup_edit.html:113
 msgid "Add a few comments to your hashcut. You are ready to publish!"
 msgstr "Add a few comments to your hashcut. You are ready to publish!"
 
-#: templates/mashup_edit.html:97
+#: templates/mashup_edit.html:131
 msgid "Begin segment here"
 msgstr "Begin segment here"
 
-#: templates/mashup_edit.html:99
+#: templates/mashup_edit.html:133
 msgid "End segment here"
 msgstr "End segment here"
 
-#: templates/mashup_edit.html:131
+#: templates/mashup_edit.html:165
 msgid "Create a new segment"
 msgstr "Create a new segment"
 
-#: templates/mashup_edit.html:132
+#: templates/mashup_edit.html:166
 msgid "from"
 msgstr "from"
 
-#: templates/mashup_edit.html:134
+#: templates/mashup_edit.html:168
 msgid "to"
 msgstr "to"
 
-#: templates/mashup_edit.html:136
+#: templates/mashup_edit.html:170
 msgid "duration:"
 msgstr "duration:"
 
-#: templates/mashup_edit.html:156
+#: templates/mashup_edit.html:190
 msgid "Add to hashcut"
 msgstr "Add to Hashcut"
 
-#: templates/mashup_edit.html:163
+#: templates/mashup_edit.html:197
 msgid "My segments on this media:"
 msgstr "My segments on this media:"
 
-#: templates/mashup_edit.html:169
+#: templates/mashup_edit.html:203
 msgid "Existing segments on this media:"
 msgstr "Existing segments on this media:"
 
-#: templates/mashup_edit.html:206 templates/mashup_hashcut.html:90
+#: templates/mashup_edit.html:240 templates/mashup_hashcut.html:118
 msgid "Excerpt from:"
 msgstr "Excerpt from:"
 
-#: templates/mashup_edit.html:230
+#: templates/mashup_edit.html:264
 msgid "Segment list"
 msgstr "Segment list"
 
-#: templates/mashup_edit.html:232
+#: templates/mashup_edit.html:266
 msgid "No segment"
 msgstr "No segment"
 
@@ -195,64 +207,64 @@
 msgid "Playing hashcut %(title)s"
 msgstr "Playing Hashcut “%(title)s”"
 
-#: templates/mashup_hashcut.html:18 templates/mashup_home.html:15
+#: templates/mashup_hashcut.html:46 templates/mashup_home.html:15
 msgid "Hashcut"
 msgstr "Hashcut"
 
-#: templates/mashup_hashcut.html:109
+#: templates/mashup_hashcut.html:137
 msgid "More information"
 msgstr "More information"
 
-#: templates/mashup_hashcut.html:122
+#: templates/mashup_hashcut.html:150
 msgid "Author:"
 msgstr "Author:"
 
-#: templates/mashup_hashcut.html:132
+#: templates/mashup_hashcut.html:160
 msgid "Videos used in this Hashcut"
 msgstr "Videos used in this Hashcut"
 
-#: templates/mashup_home.html:42
+#: templates/mashup_home.html:61
 msgid "Create a new hashcut!"
 msgstr "Create a new hashcut!"
 
-#: templates/mashup_home.html:59
+#: templates/mashup_home.html:78
 msgid "Featured Hashcuts"
 msgstr "Featured Hashcuts"
 
-#: templates/mashup_home.html:64 templates/mashup_home.html.py:70
-#: templates/mashup_home.html:80
+#: templates/mashup_home.html:83 templates/mashup_home.html.py:89
+#: templates/mashup_home.html:99
 msgid "by"
 msgstr "by"
 
-#: templates/mashup_home.html:75
+#: templates/mashup_home.html:94
 msgid "Newest Hashcuts"
 msgstr "Newest Hashcuts"
 
-#: templates/mashup_home.html:86
+#: templates/mashup_home.html:105
 msgid "All Hashcuts"
 msgstr "All Hashcuts"
 
-#: templates/mashup_home.html:92
+#: templates/mashup_home.html:111
 msgid "What's a Hashcut?"
 msgstr "What's a Hashcut?"
 
-#: templates/mashup_home.html:97
+#: templates/mashup_home.html:116
 msgid "How to?"
 msgstr "How to?"
 
-#: templates/mashup_home.html:100
+#: templates/mashup_home.html:119
 msgid "Sign up"
 msgstr "Sign up"
 
-#: templates/mashup_home.html:101
+#: templates/mashup_home.html:120
 msgid "Start by creating your own profile on this platform."
 msgstr "Start by creating your own profile on this platform."
 
-#: templates/mashup_home.html:105
+#: templates/mashup_home.html:124
 msgid "Create a new hashcut"
 msgstr "Create a new Hashcut"
 
-#: templates/mashup_home.html:106
+#: templates/mashup_home.html:125
 msgid ""
 "Choose videos, define and organize segments and comment them to create your "
 "own hashcut."
@@ -260,11 +272,11 @@
 "Choose videos, define and organize segments and comment them to create your "
 "own hashcut."
 
-#: templates/mashup_home.html:110
+#: templates/mashup_home.html:129
 msgid "Publish and share"
 msgstr "Publish and share"
 
-#: templates/mashup_home.html:111
+#: templates/mashup_home.html:130
 msgid ""
 "Once your hashcut is done, publish it here and share your work on social "
 "networks."
@@ -272,12 +284,12 @@
 "Once your hashcut is done, publish it here and share your work on social "
 "networks."
 
-#: templates/mashup_profile.html:6
+#: templates/mashup_profile.html:7
 #, python-format
 msgid "%(username)s's profile"
 msgstr "%(username)s's profile"
 
-#: templates/mashup_profile.html:18
+#: templates/mashup_profile.html:19
 msgid "Profile"
 msgstr "Profile"
 
Binary file src/hashcut/locale/fr/LC_MESSAGES/django.mo has changed
--- a/src/hashcut/locale/fr/LC_MESSAGES/django.po	Wed Dec 05 10:55:06 2012 +0100
+++ b/src/hashcut/locale/fr/LC_MESSAGES/django.po	Wed Dec 05 11:17:58 2012 +0100
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-04 17:01+0100\n"
+"POT-Creation-Date: 2012-12-05 11:13+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,83 +18,95 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: templates/mashup_all_mashups.html:22 templates/mashup_content.html:26
-#: templates/mashup_edit.html:44 templates/mashup_home.html:15
-#: templates/mashup_profile.html:26
+#: templates/mashup_all_mashups.html:22 templates/mashup_content.html:54
+#: templates/mashup_edit.html:78 templates/mashup_home.html:15
+#: templates/mashup_profile.html:27
 msgid "Home"
 msgstr "Accueil"
 
-#: templates/mashup_all_mashups.html:23 templates/mashup_content.html:27
-#: templates/mashup_profile.html:27
+#: templates/mashup_all_mashups.html:23 templates/mashup_content.html:55
+#: templates/mashup_profile.html:28
 msgid "New hashcut"
 msgstr "Créer un Hashcut"
 
-#: templates/mashup_all_mashups.html:24 templates/mashup_content.html:28
-#: templates/mashup_edit.html:45 templates/mashup_home.html:46
-#: templates/mashup_profile.html:28
+#: templates/mashup_all_mashups.html:24 templates/mashup_content.html:56
+#: templates/mashup_edit.html:79 templates/mashup_home.html:65
+#: templates/mashup_profile.html:29
 msgid "My profile"
 msgstr "Mon profil"
 
+#: templates/mashup_all_mashups.html:36
+msgid "Previous"
+msgstr "Précédents"
+
+#: templates/mashup_all_mashups.html:44
+msgid "Next"
+msgstr "Suivants"
+
+#: templates/mashup_all_mashups.html:47
+msgid "All"
+msgstr "Tous"
+
 #: templates/mashup_content.html:6
 #, python-format
 msgid "Playing video %(title)s"
 msgstr "Lecture de la Vidéo « %(title)s »"
 
-#: templates/mashup_content.html:18
+#: templates/mashup_content.html:46
 msgid "Video"
 msgstr "Vidéo"
 
-#: templates/mashup_content.html:51 templates/mashup_edit.html:94
-#: templates/mashup_hashcut.html:50
+#: templates/mashup_content.html:79 templates/mashup_edit.html:128
+#: templates/mashup_hashcut.html:78
 msgid "Play/Pause"
 msgstr "Lecture/Pause"
 
-#: templates/mashup_content.html:57 templates/mashup_edit.html:106
-#: templates/mashup_hashcut.html:56
+#: templates/mashup_content.html:85 templates/mashup_edit.html:140
+#: templates/mashup_hashcut.html:84
 msgid "Elapsed time"
 msgstr "Temps écoulé"
 
-#: templates/mashup_content.html:59 templates/mashup_edit.html:108
-#: templates/mashup_hashcut.html:58
+#: templates/mashup_content.html:87 templates/mashup_edit.html:142
+#: templates/mashup_hashcut.html:86
 msgid "Total time"
 msgstr "Durée totale"
 
-#: templates/mashup_content.html:62 templates/mashup_edit.html:111
-#: templates/mashup_hashcut.html:61
+#: templates/mashup_content.html:90 templates/mashup_edit.html:145
+#: templates/mashup_hashcut.html:89
 msgid "Mute/Unmute"
 msgstr "Couper/Activer le son"
 
-#: templates/mashup_content.html:64 templates/mashup_edit.html:113
-#: templates/mashup_hashcut.html:63
+#: templates/mashup_content.html:92 templates/mashup_edit.html:147
+#: templates/mashup_hashcut.html:91
 msgid "Set volume"
 msgstr "Régler le volume"
 
-#: templates/mashup_content.html:75
+#: templates/mashup_content.html:103
 msgid "More informations"
 msgstr "Plus d'informations"
 
-#: templates/mashup_content.html:80 templates/mashup_edit.html:22
-#: templates/mashup_edit.html.py:142 templates/mashup_hashcut.html:114
+#: templates/mashup_content.html:108 templates/mashup_edit.html:56
+#: templates/mashup_edit.html.py:176 templates/mashup_hashcut.html:142
 msgid "Title:"
 msgstr "Titre :"
 
-#: templates/mashup_content.html:84 templates/mashup_edit.html:40
-#: templates/mashup_hashcut.html:118
+#: templates/mashup_content.html:112 templates/mashup_edit.html:74
+#: templates/mashup_hashcut.html:146
 msgid "Duration:"
 msgstr "Durée :"
 
-#: templates/mashup_content.html:88 templates/mashup_edit.html:26
-#: templates/mashup_edit.html.py:152 templates/mashup_edit.html:210
-#: templates/mashup_hashcut.html:94 templates/mashup_hashcut.html.py:126
+#: templates/mashup_content.html:116 templates/mashup_edit.html:60
+#: templates/mashup_edit.html.py:186 templates/mashup_edit.html:244
+#: templates/mashup_hashcut.html:122 templates/mashup_hashcut.html.py:154
 msgid "Description:"
 msgstr "Description :"
 
-#: templates/mashup_content.html:92 templates/mashup_edit.html:146
-#: templates/mashup_edit.html.py:214 templates/mashup_hashcut.html:98
+#: templates/mashup_content.html:120 templates/mashup_edit.html:180
+#: templates/mashup_edit.html.py:248 templates/mashup_hashcut.html:126
 msgid "Tags:"
 msgstr "Mots-clés :"
 
-#: templates/mashup_content.html:99
+#: templates/mashup_content.html:127
 msgid "Hashcuts using this video"
 msgstr "Hashcuts utilisant cette vidéo"
 
@@ -102,93 +114,93 @@
 msgid "Hashcut editor"
 msgstr "Éditeur de Hashcut"
 
-#: templates/mashup_edit.html:23 templates/mashup_edit.html.py:38
+#: templates/mashup_edit.html:57 templates/mashup_edit.html.py:72
 msgid "Untitled Hashcut"
 msgstr "Hashcut sans titre"
 
-#: templates/mashup_edit.html:57
+#: templates/mashup_edit.html:91
 msgid "Select videos"
 msgstr "Sélectionner les vidéos"
 
-#: templates/mashup_edit.html:58
+#: templates/mashup_edit.html:92
 msgid "Search videos"
 msgstr "Rechercher une vidéo"
 
-#: templates/mashup_edit.html:68
+#: templates/mashup_edit.html:102
 msgid "Segment"
 msgstr "Segmenter"
 
-#: templates/mashup_edit.html:69
+#: templates/mashup_edit.html:103
 msgid "Preview and publish"
 msgstr "Prévisualiser et publier"
 
-#: templates/mashup_edit.html:74
+#: templates/mashup_edit.html:108
 msgid "Creating a hashcut is easy!"
 msgstr "Créer un Hashcut, c’est facile !"
 
-#: templates/mashup_edit.html:76
+#: templates/mashup_edit.html:110
 msgid "Start by selecting a video in the left hand column."
 msgstr "Commencez par choisir une vidéo dans le volet de gauche"
 
-#: templates/mashup_edit.html:77
+#: templates/mashup_edit.html:111
 msgid "Create a segment in your video and annotate it."
 msgstr ""
 "Créez un segment dans la vidéo et profitez-en pour annoter votre segment"
 
-#: templates/mashup_edit.html:78
+#: templates/mashup_edit.html:112
 msgid "Append your segment to the hashcut and reorder the segments"
 msgstr "Ajoutez votre segment à la liste, réorganisez les segments entre eux"
 
-#: templates/mashup_edit.html:79
+#: templates/mashup_edit.html:113
 msgid "Add a few comments to your hashcut. You are ready to publish!"
 msgstr ""
 "Rajoutez quelques commentaires à votre Hashcut. Vous êtes prêts à publier !"
 
-#: templates/mashup_edit.html:97
+#: templates/mashup_edit.html:131
 msgid "Begin segment here"
 msgstr "Débuter le segment ici"
 
-#: templates/mashup_edit.html:99
+#: templates/mashup_edit.html:133
 msgid "End segment here"
 msgstr "Finir le segment ici"
 
-#: templates/mashup_edit.html:131
+#: templates/mashup_edit.html:165
 msgid "Create a new segment"
 msgstr "Créer un nouveau segment"
 
-#: templates/mashup_edit.html:132
+#: templates/mashup_edit.html:166
 msgid "from"
 msgstr "de"
 
-#: templates/mashup_edit.html:134
+#: templates/mashup_edit.html:168
 msgid "to"
 msgstr "à"
 
-#: templates/mashup_edit.html:136
+#: templates/mashup_edit.html:170
 msgid "duration:"
 msgstr "durée :"
 
-#: templates/mashup_edit.html:156
+#: templates/mashup_edit.html:190
 msgid "Add to hashcut"
 msgstr "Ajouter au Hashcut"
 
-#: templates/mashup_edit.html:163
+#: templates/mashup_edit.html:197
 msgid "My segments on this media:"
 msgstr "Mes segments sur cette vidéo :"
 
-#: templates/mashup_edit.html:169
+#: templates/mashup_edit.html:203
 msgid "Existing segments on this media:"
 msgstr "Segments existants sur cette vidéo :"
 
-#: templates/mashup_edit.html:206 templates/mashup_hashcut.html:90
+#: templates/mashup_edit.html:240 templates/mashup_hashcut.html:118
 msgid "Excerpt from:"
 msgstr "Extrait de :"
 
-#: templates/mashup_edit.html:230
+#: templates/mashup_edit.html:264
 msgid "Segment list"
 msgstr "Liste des segments"
 
-#: templates/mashup_edit.html:232
+#: templates/mashup_edit.html:266
 msgid "No segment"
 msgstr "Aucun segment"
 
@@ -197,64 +209,64 @@
 msgid "Playing hashcut %(title)s"
 msgstr "Lecture du Hashcut « %(title)s »"
 
-#: templates/mashup_hashcut.html:18 templates/mashup_home.html:15
+#: templates/mashup_hashcut.html:46 templates/mashup_home.html:15
 msgid "Hashcut"
 msgstr "Hashcut"
 
-#: templates/mashup_hashcut.html:109
+#: templates/mashup_hashcut.html:137
 msgid "More information"
 msgstr "Plus d'informations"
 
-#: templates/mashup_hashcut.html:122
+#: templates/mashup_hashcut.html:150
 msgid "Author:"
 msgstr "Auteur :"
 
-#: templates/mashup_hashcut.html:132
+#: templates/mashup_hashcut.html:160
 msgid "Videos used in this Hashcut"
 msgstr "Vidéos utilisées dans ce Hashcut"
 
-#: templates/mashup_home.html:42
+#: templates/mashup_home.html:61
 msgid "Create a new hashcut!"
 msgstr "Créer un Hashcut !"
 
-#: templates/mashup_home.html:59
+#: templates/mashup_home.html:78
 msgid "Featured Hashcuts"
 msgstr "Hashcuts à la Une"
 
-#: templates/mashup_home.html:64 templates/mashup_home.html.py:70
-#: templates/mashup_home.html:80
+#: templates/mashup_home.html:83 templates/mashup_home.html.py:89
+#: templates/mashup_home.html:99
 msgid "by"
 msgstr "par"
 
-#: templates/mashup_home.html:75
+#: templates/mashup_home.html:94
 msgid "Newest Hashcuts"
 msgstr "Derniers Hashcuts"
 
-#: templates/mashup_home.html:86
+#: templates/mashup_home.html:105
 msgid "All Hashcuts"
 msgstr "Tous les Hashcuts"
 
-#: templates/mashup_home.html:92
+#: templates/mashup_home.html:111
 msgid "What's a Hashcut?"
 msgstr "Hashcut ?"
 
-#: templates/mashup_home.html:97
+#: templates/mashup_home.html:116
 msgid "How to?"
 msgstr "Comment faire ?"
 
-#: templates/mashup_home.html:100
+#: templates/mashup_home.html:119
 msgid "Sign up"
 msgstr "S'inscrire"
 
-#: templates/mashup_home.html:101
+#: templates/mashup_home.html:120
 msgid "Start by creating your own profile on this platform."
 msgstr "Commencez par créer votre espace personnel sur cette plateforme."
 
-#: templates/mashup_home.html:105
+#: templates/mashup_home.html:124
 msgid "Create a new hashcut"
 msgstr "Créer un Hashcut"
 
-#: templates/mashup_home.html:106
+#: templates/mashup_home.html:125
 msgid ""
 "Choose videos, define and organize segments and comment them to create your "
 "own hashcut."
@@ -262,11 +274,11 @@
 "Choisissez des médias, segmentez les, assemblez les segments et rajoutez des "
 "commentaires sur le Hashcut."
 
-#: templates/mashup_home.html:110
+#: templates/mashup_home.html:129
 msgid "Publish and share"
 msgstr "Publier et partager"
 
-#: templates/mashup_home.html:111
+#: templates/mashup_home.html:130
 msgid ""
 "Once your hashcut is done, publish it here and share your work on social "
 "networks."
@@ -274,12 +286,12 @@
 "Une fois le hashcut terminé, publiez-le sur cette plateforme et partagez "
 "votre création sur les réseaux sociaux"
 
-#: templates/mashup_profile.html:6
+#: templates/mashup_profile.html:7
 #, python-format
 msgid "%(username)s's profile"
 msgstr "Profil de %(username)s"
 
-#: templates/mashup_profile.html:18
+#: templates/mashup_profile.html:19
 msgid "Profile"
 msgstr "Profil"
 
--- a/src/hashcut/static/hashcut/js/hashcut.js	Wed Dec 05 10:55:06 2012 +0100
+++ b/src/hashcut/static/hashcut/js/hashcut.js	Wed Dec 05 11:17:58 2012 +0100
@@ -3063,7 +3063,7 @@
             success: function(data, status, request){
                 var location = request.getResponseHeader("Location"),
                     projid = location.match(/([^/]+)\/?$/)[1],
-                    destination = IriSP.endpoints.hashcut_page + projid;
+                    destination = IriSP.endpoints.hashcut_page.replace('__PROJECT_ID__', projid);
                 $(window).off("beforeunload", onLeave);
                 document.location.href = destination;
             },
@@ -3084,14 +3084,14 @@
     
     var directory = new IriSP.Model.Directory(),
         project = directory.remoteSource({
-            url: IriSP.endpoints.ldt + options.id,
+            url: IriSP.endpoints.ldt.replace('__PROJECT_ID__', options.id),
             serializer: IriSP.serializers.ldt
         }),
         apidirectory = new IriSP.Model.Directory(),
         mashup,
         mediatemplate = _.template('<li class="item-video media" data-media-id="<%= media.id %>">'
-            + '<a href="<%= IriSP.endpoints.media_page + media.id %>"><img class="thumbnail" alt="<%= media.title %>" src="<%= media.thumbnail %>"></a><div class="video-info">'
-            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.media_page + media.id %>"><%= media.title %></a></h3><p class="description"><%= media.description %></p>'
+            + '<a href="<%= IriSP.endpoints.media_page.replace("__CONTENT_ID__", media.id) %>"><img class="thumbnail" alt="<%= media.title %>" src="<%= media.thumbnail %>"></a><div class="video-info">'
+            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.media_page.replace("__CONTENT_ID__", media.id) %>"><%= media.title %></a></h3><p class="description"><%= media.description %></p>'
             + '<p class="time-length">Durée : <span><%= media.duration.toString() %></span></p><div class="frise">'
             + '<div class="frise-overflow"><div class="frise-segments"><%= segments %></div></div></div></div></li>');
         segmenttemplate = _.template('<div style="background-color:<%= annotation.color %>; left:<%= left %>%; width: <%= width %>%;"'
@@ -3193,7 +3193,7 @@
             + '<div class="popin media-segment-popin" style="left:<%= popleft %>px; top: <%= 5+top %>px;"><div style="left:<%= pointerpos %>px;" class="pointer"></div><div class="popin-content">'
             + '<h3><%= annotation.title %></h3>'
             + '<p><%= gettext("From:") %> <span><%= annotation.begin.toString() %></span> <%= gettext("to:") %> <span><%= annotation.end.toString() %></span> (<%= gettext("duration:") %> <span><%= annotation.getDuration().toString() %></span>)</p>'
-            + '<p class="mashup-link"><%= gettext("From hashcut:") %> <a href="<%= IriSP.endpoints.hashcut_page + annotation.project_id %>"></a></p>'
+            + '<p class="mashup-link"><%= gettext("From hashcut:") %> <a href="<%= IriSP.endpoints.hashcut_page.replace("__PROJECT_ID__", annotation.project_id) %>"></a></p>'
             + '</div></div></div>'
         ),
         segmentlisttemplate = _.template(
@@ -3201,8 +3201,8 @@
         ),
         projtemplate = _.template(
             '<li class="item-video mashup" data-mashup-id="<%= ldt_id %>">'
-            + '<a href="<%= IriSP.endpoints.hashcut_page + ldt_id %>"><img class="thumbnail" alt="<%= title %>" src="<%= image %>"></a><div class="video-info">'
-            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.hashcut_page + ldt_id %>"><%= title %></a></h3><p class="description"><%= description %></p>'
+            + '<a href="<%= IriSP.endpoints.hashcut_page.replace("__PROJECT_ID__", ldt_id) %>"><img class="thumbnail" alt="<%= title %>" src="<%= image %>"></a><div class="video-info">'
+            + '<h3 class="title-video"><a href="<%= IriSP.endpoints.hashcut_page.replace("__PROJECT_ID__", ldt_id) %>"><%= title %></a></h3><p class="description"><%= description %></p>'
             + '</p></div></li>'
         ),
         media;
--- a/src/hashcut/templates/mashup_all_mashups.html	Wed Dec 05 10:55:06 2012 +0100
+++ b/src/hashcut/templates/mashup_all_mashups.html	Wed Dec 05 11:17:58 2012 +0100
@@ -33,7 +33,7 @@
     
     <div class="pagination">
             {% if results.has_previous %}
-                <a href="{% url mashup_all branding=branding %}?page={{ results.previous_page_number }}" >Précédent</a>
+                <a href="{% url mashup_all branding=branding %}?page={{ results.previous_page_number }}" >{% trans "Previous" %}</a>
             {% endif %}
             {% if results.paginator.num_pages > 1 %}
               {% for i in results.paginator.num_pages|get_range %}
@@ -41,10 +41,10 @@
               {% endfor %}
             {% endif %}
             {% if results.has_next %}
-                <a href="{% url mashup_all branding=branding %}?page={{ results.next_page_number }}">Suivant</a>
+                <a href="{% url mashup_all branding=branding %}?page={{ results.next_page_number }}">{% trans "Next" %}</a>
             {% endif %}
             {% if results.paginator.num_pages > 1 %}
-                <a href="{% url mashup_all branding=branding %}?page=x">(Tous)</a>
+                <a href="{% url mashup_all branding=branding %}?page=x">({% trans "All" %})</a>
             {% endif %}
             </p>
     </div>
--- a/src/hashcut/templates/mashup_content.html	Wed Dec 05 10:55:06 2012 +0100
+++ b/src/hashcut/templates/mashup_content.html	Wed Dec 05 11:17:58 2012 +0100
@@ -18,7 +18,7 @@
             content: "{% url api_dispatch_list api_name='1.0' resource_name='contents' %}",
             project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}",
             segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}",
-            ldt: "{% url projectjson_id id='' %}",
+            ldt: "{% url projectjson_id id='__PROJECT_ID__' %}",
             hashcut_page: "{% url mashup_hashcut branding=branding ldt_id='__PROJECT_ID__' %}"
         };
         
--- a/src/hashcut/templates/mashup_edit.html	Wed Dec 05 10:55:06 2012 +0100
+++ b/src/hashcut/templates/mashup_edit.html	Wed Dec 05 11:17:58 2012 +0100
@@ -21,7 +21,7 @@
             //project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}",
             project: "{% url mashup_save branding=branding %}",
             segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}",
-            ldt: "{% url projectjson_id id='' %}",
+            ldt: "{% url projectjson_id id='__PROJECT_ID__' %}",
             hashcut_page: "{% url mashup_hashcut branding=branding ldt_id='__PROJECT_ID__' %}"
         };
         $(function() {
@@ -35,7 +35,7 @@
                 creator: "{{user.username}}",
                 csrf_token: "{{csrf_token}}",
                 filter: {
-                    tags__icontains: "{{branding}}"
+                    tags__icontains: "Hashcut"//"{{branding}}"
                 }
            });
            $(".change-account").remove();
--- a/src/hashcut/templates/mashup_hashcut.html	Wed Dec 05 10:55:06 2012 +0100
+++ b/src/hashcut/templates/mashup_hashcut.html	Wed Dec 05 11:17:58 2012 +0100
@@ -18,7 +18,7 @@
             content: "{% url api_dispatch_list api_name='1.0' resource_name='contents' %}",
             project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}",
             segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}",
-            ldt: "{% url projectjson_id id='' %}",
+            ldt: "{% url projectjson_id id='__PROJECT_ID__' %}",
             media_page: "{% url mashup_content branding=branding ctt_id='__CONTENT_ID__' %}"
         };