{% extends "course_flow/base.html" %}
<!-- -->
{% load static i18n %}
<!-- -->
{% block header %}{% endblock %}
<!-- -->
{% block title %}{% 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 create_path_this_project = {
      activity:"{% url 'course_flow:activity-create' projectPk=object.pk %}",
      course:"{% url 'course_flow:course-create' projectPk=object.pk %}",
      program:"{% url 'course_flow:program-create' projectPk=object.pk %}"
  }

  const project_data= {{project_data|safe}};
  const disciplines = {{disciplines | safe}};

  $(".menubar").removeClass("hidden");

  var library_renderer;
  const user_id = {{ user.id | default:0}};

  window.addEventListener("load",function(){
      library_renderer = new library_renderers.ProjectRenderer(project_data,disciplines);
      $(document).ajaxError(renderers.fail_function);
      library_renderer.render($("#container"));
        makeActiveSidebar("#project"+project_data.id);
  });
</script>
{% endblock %}
