{% extends "course_flow/base.html" %}
<!-- -->
{% load static i18n %}
<!-- -->
{% block header %}{% endblock %}
<!-- -->
{% block title %}
  {%if object.title != "" %}
    {{ object.title }}
  {% else %}
    {% trans "Untitled" %}
  {% endif %}
  - CourseFlow
{% endblock %}
<!-- -->
{% block metadescription %} {% endblock %}
<!-- -->
{% block body %}
<!-- -->
{% endblock %}
<!-- -->
{% block foot %} {% endblock %}
<!-- -->
{% csrf_token %}
<!-- -->
{% block read_only_scripts %}

{% endblock %}
<!-- -->
{% block scripts %} {{ block.super }}
<script nonce="{{request.csp_nonce}}">

  const iconpath = "{% static 'course_flow/img/images_svg/' %}";
  
  
  const project_data= {{project_data|safe}};
  const live_project_data= {{live_project_data|safe}};
  const user_role = {{user_role|safe}};
  const user_permission = {{user_permission|safe}};
  var live_project_renderer;

  if(user_role>0)$(".menubar").removeClass("hidden");
  const user_id = {{ user.id }};

  window.addEventListener("load",function(){
      live_project_renderer = new live_renderers.LiveProjectRenderer(live_project_data,project_data);
      $(document).ajaxError(renderers.fail_function);
      live_project_renderer.render($("#container"));
  });
</script>
{% endblock %}
