# HG changeset patch # User cavaliet # Date 1374578321 -7200 # Node ID cf2c41ea531984acd5186c8942c3e0ef1de66c0a # Parent 4645fbf981b2f6aad6532ceca1759ac9a570d58a little debug diff -r 4645fbf981b2 -r cf2c41ea5319 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html Mon Jul 22 18:56:30 2013 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html Tue Jul 23 13:18:41 2013 +0200 @@ -8,7 +8,6 @@ {% block js_import %} {{ block.super }} - {{ content_form.media.js }} diff -r 4645fbf981b2 -r cf2c41ea5319 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Mon Jul 22 18:56:30 2013 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Tue Jul 23 13:18:41 2013 +0200 @@ -2,6 +2,7 @@ {% load i18n %} {% load static %} {% block js_import %} +{% load absstatic %} {{block.super}} @@ -51,7 +52,7 @@ init_events(document); - $(".update_group_projects").live("click", function(){ + $(".update_group_projects").click(function(){ //alert("group id = " + $(this).attr('id') + ", url = " + get_group_projects_url); var id_group = $(this).attr('id'); // Remove icons from all the lines diff -r 4645fbf981b2 -r cf2c41ea5319 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Mon Jul 22 18:56:30 2013 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Tue Jul 23 13:18:41 2013 +0200 @@ -48,11 +48,9 @@
{% trans 'copy project' %}
- {% if project.state == 2 %} {% trans 'link json by id' %} - {% endif %}
diff -r 4645fbf981b2 -r cf2c41ea5319 src/ldt/ldt/ldt_utils/views/workspace.py --- a/src/ldt/ldt/ldt_utils/views/workspace.py Mon Jul 22 18:56:30 2013 +0200 +++ b/src/ldt/ldt/ldt_utils/views/workspace.py Tue Jul 23 13:18:41 2013 +0200 @@ -227,7 +227,7 @@ def get_datas_for_embed(request, json_url, player_id, ldt_id): - project = Project.safe_objects.prefetch_related("contents").get(ldt_id=ldt_id) #@UndefinedVariable + project = Project.safe_objects.prefetch_related("contents", "owner").get(ldt_id=ldt_id) #@UndefinedVariable project_contents = project.contents.all() content = project_contents[0] WEB_URL = get_web_url(request) @@ -244,7 +244,13 @@ stream_mode = 'radio' if not ldt_auth.check_access(request.user, project): - return HttpResponseForbidden(_("You can not access this project")) + # If the project is unpublished AND if the user is the owner, we display few datas + #TODO : enhance rend_dict and display in this case + if project.state==1 and project.owner==request.user: + pass + else: + #return HttpResponseForbidden(_("You can not access this project")) + return {'ldt_id': ldt_id} LANGUAGE_CODE = settings.LANGUAGE_CODE ps = ProjectJsonSerializer(project, from_contents=True, from_display=True) annotations = ps.get_annotations(first_cutting=True)