src/ldt/ldt/ldt_utils/views/front.py
changeset 833 20acf3b3b2f0
parent 795 923429f142ea
child 995 94f9d36371f6
equal deleted inserted replaced
826:cfa5e38dfc07 833:20acf3b3b2f0
    97 
    97 
    98 def annot_content(request, content_iri_id, project_id=None, cutting_id=None):
    98 def annot_content(request, content_iri_id, project_id=None, cutting_id=None):
    99     # Get the wanted content
    99     # Get the wanted content
   100     content = Content.objects.get(iri_id=content_iri_id)
   100     content = Content.objects.get(iri_id=content_iri_id)
   101     # Get the content src to see if it is a youtube/dailymotion video
   101     # Get the content src to see if it is a youtube/dailymotion video
       
   102     annotation_block = True
   102     external_url = None
   103     external_url = None
   103     if content.src is not None:
   104     if content.src is not None:
   104         for external_src in settings.EXTERNAL_STREAM_SRC:
   105         for external_src in settings.EXTERNAL_STREAM_SRC:
   105             if  external_src in content.src:
   106             if  external_src in content.src:
   106                 external_url = content.src
   107                 external_url = content.src
   129 
   130 
   130 
   131 
   131     return render_to_response("front/front_player.html",
   132     return render_to_response("front/front_player.html",
   132                               {'content': content, 'project':proj, 'player_id': player_id, 
   133                               {'content': content, 'project':proj, 'player_id': player_id, 
   133                               'json_url': json_url, 'player_width':player_width, 'player_height':player_height, 'stream_mode':stream_mode, 'external_url':external_url,
   134                               'json_url': json_url, 'player_width':player_width, 'player_height':player_height, 'stream_mode':stream_mode, 'external_url':external_url,
   134                                'is_gecko': is_gecko},
   135                                'is_gecko': is_gecko, 'annotation_block':annotation_block},
   135                               context_instance=RequestContext(request))
   136                               context_instance=RequestContext(request))
   136 
   137 
   137 
   138 
   138 def search_index(request):
   139 def search_index(request):
   139     language_code = request.LANGUAGE_CODE[:2]
   140     language_code = request.LANGUAGE_CODE[:2]