# HG changeset patch # User cavaliet # Date 1326725610 -3600 # Node ID 08172df3074deeb6139a5f3c030bf4ad3e4806e0 # Parent db8697ff4594d7b7df8ca03e073671591d4d5a5b update search result link to MDP. diff -r db8697ff4594 -r 08172df3074d 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 15:42:06 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html Mon Jan 16 15:53:30 2012 +0100 @@ -142,10 +142,10 @@
  • - +
    -

    +

    {% if segment.title %}{{ segment.title }}{% else %}{% trans "No title" %}{% endif %}

    {% if segment.context %}{{ segment.context }}{% endif %}
    {% trans "Begin" %} : {{ segment.begin|str_duration:"::" }} - {% trans "duration" %} : {{ segment.duration|str_duration:"::" }}

  • diff -r db8697ff4594 -r 08172df3074d src/ldt/ldt/ldt_utils/urls.py --- a/src/ldt/ldt/ldt_utils/urls.py Mon Jan 16 15:42:06 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/urls.py Mon Jan 16 15:53:30 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 db8697ff4594 -r 08172df3074d src/ldt/ldt/ldt_utils/views/front.py --- a/src/ldt/ldt/ldt_utils/views/front.py Mon Jan 16 15:42:06 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/views/front.py Mon Jan 16 15:53:30 2012 +0100 @@ -61,15 +61,19 @@ @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