<!--
Copyright 2019 EveryUP srl

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an  BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% extends "base.html" %}
{% load get %}
{% load staticfiles %}



{% block head_block %}
    {{ block.super }}

<!-- TopologyComposer D3 -->
    <link rel="stylesheet" href="/static/TopologyComposer/css/composer.css">
    <link rel="stylesheet" href="/static/TopologyComposer/css/d3-context-menu.css">


{% endblock %}
{% block title_header_big %}
    {{ block.super }}
    {{ type|upper }} Composer
{% endblock %}
{% block left_sidebar %}
    {% include 'osm/osm_project_left_sidebar.html' %}
{% endblock %}


{% block breadcrumb_body %}
    {{ block.super }}
    <li><a href="#"><i class="fa fa-sitemap"></i> {{ type|upper }} Composer</a></li>
{% endblock %}

{% block content_body %}
    {{ block.super }}
    {% csrf_token %}

    <div class="container-fluid">
        <div id="main" class="row">
            <div id="leftside">
                <div class="section">
                    <span style="font-weight: 500;">Select Element</span>
                </div>
                <div id="palette">


                </div>

            </div>
            <div id="graph_editor_container" class="col">
                <div class="btn-group left-tool-bar-monitoring">
                    <button id="topology_force" type="button" class="btn btn btn-default" onclick="handleForce(this)"
                            data-toggle="button" aria-pressed="false" autocomplete="off"><i
                            class="fas fa-thumbtack"></i></button>
                    <button id="reset_filter" type="button" data-container="body" data-toggle="tooltip" data-placement="top" title="Text view"  class="btn btn btn-default" onclick="openTextedit(this)"><i
                            class="fa fa-edit"></i></button>
                    <button id="info_button" type="button" data-container="body" data-toggle="tooltip" data-placement="top" title="Help"  class="btn btn btn-default "onclick="openHelp(this)" ><i class="fa fa-info"></i></button>
                </div>
                <div id="legenda">
                </div>
            </div>
            <div id="side">
                <form id="side_form" method="post" enctype="multipart/form-data" action="">
                    {% csrf_token %}
                </form>
            </div>
        </div>
    </div>

    {% include 'modal/modal_keyboard_info_base.html' %}
{% endblock %}

{% block resource_block %}
    {{ block.super }}

    <!-- d3.js -->
    <script src="/static/node_modules/d3/build/d3.js"></script>
    <script src="/static/node_modules/moment/moment.js"></script>

    <!-- TopologyComposer D3 -->
    <script src="/static/TopologyComposer/js/event.js"></script>
    <script src="/static/TopologyComposer/js/settings.js"></script>
    <script src="/static/TopologyComposer/js/graph_editor.js"></script>
    <script src="/static/TopologyComposer/js/model_graph_editor.js"></script>
    <script src="/static/TopologyComposer/js/d3-context-menu.js"></script>

    <script src="/static/src/osm_gui_properties.js"></script>
    <script src="/static/src/descriptorhandler/controller.js"></script>
    <script src="/static/src/descriptorhandler/composer.js"></script>

{% endblock %}

{% block footer %}
    {% include "footer.html" %}
{% endblock %}
