{% extends "base.html" %}

{% block content %}
<script src="{{ url_for('static', filename='open_form.js') }}"></script>
<script src="{{ url_for('static', filename='post_and_read.js') }}"></script>
<div id="left-pane">
    <div class="command-tree" id="command-tree">
		<h2>Plugins</h2>
        <ul>
            {%- for command in tree.childs recursive %}
                <li title="{{ command.help|replace('\b', '')|escape }}">
                    {% if command.is_group %}
                        {{ command.name|title }}
                        <div class="help">{{ command.short_help }}</div>
                    {% else %}
                        <a title="{{ command.help|replace('\b', '')|escape }}"
                           href="#" onclick="openCommand('{{ command.path }}', true, this);">{{ command.name }}</a>
                    {% endif %}
                    {%- if command.childs -%}
                        <ul>{{ loop(command.childs) }}</ul>
                    {%- endif %}</li>
            {%- endfor %}
        </ul>

    </div>
</div>

<div class="split content split-horizontal" id="right-pane">

    <div id="form-div">
        <p>Select a command to run above.</p>
    </div>
</div>

{% endblock %}
