# HG changeset patch
# User hamidouk
# Date 1326729469 -3600
# Node ID f47353222ac077da8e7cc7b54f88341fdebecde6
# Parent c68470699447cdb7fe355972a0f017c43de2ebcb# Parent 6f507891791a02b96779ed7d8d054dd936ec01df
Merge with upstream
diff -r c68470699447 -r f47353222ac0 src/ldt/ldt/ldt_utils/templates/front/front_search_results.html
--- a/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Mon Jan 16 16:57:19 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Mon Jan 16 16:57:49 2012 +0100
@@ -142,10 +142,10 @@
-

+
-
diff -r c68470699447 -r f47353222ac0 src/ldt/ldt/ldt_utils/urls.py
--- a/src/ldt/ldt/ldt_utils/urls.py Mon Jan 16 16:57:19 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/urls.py Mon Jan 16 16:57:49 2012 +0100
@@ -43,8 +43,8 @@
url(r'^updateGroup/(?P.*)$', 'views.group.update_group'),
url(r'^front/$', 'views.front.front_home'),
url(r'^front/group/(?P.*)$', 'views.front.group_info'),
- url(r'^front/playerCutting/(?P.*)/(?P.*)/$', 'views.front.annot_content'),
- url(r'^front/player/(?P.*)$', 'views.front.annot_content'),
+ url(r'^front/player/(?P.*)/$', 'views.front.annot_content'),
+ url(r'^front/player/(?P.*)/(?P.*)/(?P.*)$', 'views.front.annot_content'),
url(r'^front/search/$', 'views.front.search_index'),
url(r'^front/searchListing', 'views.front.search_listing'),
url(r'^front/medias', 'views.front.all_contents'),
diff -r c68470699447 -r f47353222ac0 src/ldt/ldt/ldt_utils/views/front.py
--- a/src/ldt/ldt/ldt_utils/views/front.py Mon Jan 16 16:57:19 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/front.py Mon Jan 16 16:57:49 2012 +0100
@@ -61,19 +61,26 @@
@login_required
-def annot_content(request, content_iri_id, cutting_id=None):
+def annot_content(request, content_iri_id, project_id=None, cutting_id=None):
# Get the wanted content
content = Content.objects.get(iri_id=content_iri_id)
# Get the content src to see if it is a youtube video
youtube_url = None
if content.src is not None and "youtube.com" in content.src:
youtube_url = content.src
- # The main project for the content
- proj = Project.objects.filter(contents__in=[content])[0]
+ # If project id is not set, we get the default project for the content
+ if project_id is None :
+ # The main project for the content
+ proj = Project.objects.filter(contents__in=[content])[0]
+ else :
+ proj = Project.objects.get(ldt_id=project_id)
# Vars for player
player_id = "player_project_" + proj.ldt_id
- json_url = reverse("ldt.ldt_utils.views.json.project_json_cutting_id", args=[proj.ldt_id, cutting_id])
+ if cutting_id is None :
+ json_url = reverse("ldt.ldt_utils.views.json.project_json_id", args=[proj.ldt_id])
+ else :
+ json_url = reverse("ldt.ldt_utils.views.json.project_json_cutting_id", args=[proj.ldt_id, cutting_id])
player_width = 550
player_height = 380
stream_mode = proj.stream_mode