{% extends "base_for_react.html" %}
{% load render_bundle from webpack_loader %}

{% block extra_style %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}seafile-editor/seafile-editor-font.css" />
{% render_bundle 'draft' 'css' %}
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
    window.draft = {
        config: {
            draftID: '{{ draft_id }}',
            draftRepoID: '{{ draft_repo_id }}',
            draftFilePath: '{{ draft_file_path|escapejs }}',
            draftOriginFilePath: '{{ draft_origin_file_path|escapejs }}',
            draftFileName: '{{ draft_file_name|escapejs }}',
            perm: '{{ permission }}',
            author: '{{ author }}',
            authorAvatar: '{{ author_avatar_url }}',
            originFileExists: {% if origin_file_exists %} true {% else %} false {% endif %},
            draftFileExists: {% if draft_file_exists %} true {% else %} false {% endif %},
            draftStatus: '{{ draft_status }}',
            draftPublishVersion: '{{ publish_file_version }}',
            originFileVersion: '{{ origin_file_version }}',
         }
     };
</script>

{% render_bundle 'draft' 'js' %}
{% endblock %}
