{% extends "ClarolineCoreBundle:Administration:layout.html.twig" %}

{% block title %}
    {{ 'competence' | trans({}, 'platform') | striptags | raw }}
{% endblock %}

{% block breadcrumb %}
    {{
        macros.breadcrumbs([
            {
                'icon': 'icon-cog',
                'name': 'administration'|trans({}, 'platform'),
                'href': path('claro_admin_index')
            },
            {
                'name': 'competence'|trans({}, 'platform'),
                'href': path('claro_admin_competences')
            }
        ])
    }}
{% endblock %}

{% block content %}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">
                {{ "competence_move_in" | trans({}, "platform" )}}
            </h3>
        </div>
        <form action="#" method="post" id="myForm" class="form-horizontal">
            <div class="panel-body">
                <h3>{{ competenceNode.getCompetence().getName() }}</h3>
                <div class="panel-body">
                    {% for node in competenceHierarchy %}
                        {{ node.getCompetence().getName() }}
                        <input type="checkbox" class="checkbox" name="competences_link" value="{{ node.getId() }}" />
                    {% endfor %}	
                </div>
                <input type="hidden"
                       name="competences_link_form_parent"
                       id="competences_link_form_parent"
                       value="{{ competenceNode.getId() }}"
                >
            </div>
            <div class="panel-footer">
                <button type="button" class="btn btn-primary" id="move">
                    {{ 'move'|trans({}, 'platform') }}
                </button>
            </div>
        </form>
    </div>
{% endblock %}

{% block javascripts %}
 {{ parent() }}
	<script type='text/javascript'src='{{ asset('bundles/clarolinecore/js/administration/competences.js') }}'></script>
{% endblock %}