{% block body %}
	<div id="HTMLDEP">
		{% set js = '' %}
		{% for liste in noDep %}
			{% set js = js ~ " $('#QUEST-" ~ liste[0]['ID_THEME'] ~ "-" ~ liste[0]['ID_QUEST'] ~ "').remove();" %}
		{% endfor %}

		{% for liste in listeQuestionPropose %}
			{% if dep[liste[0]['ID_THEME'] ~ '-' ~ liste[0]['ID_QUEST']] is defined %}

				{% else %}
					{# {% if count == 0 %}
					{% set count = 1 %} #}
					<div class="dep{{liste[0]['ID_THEME']}}_{{liste[0]['ID_QUEST']}}">
						{{ getInputQuestion(liste, true, trad) }}


						{% set js = js ~ " if(document.getElementById('qestionsDependante_" ~ liste[0]['ID_THEME'] ~ "') )
                        {
                            $('#qestionsDependante_" ~ liste[0]['ID_THEME'] ~ "').append($('.dep" ~ liste[0]['ID_THEME'] ~ "_" ~ liste[0]['ID_QUEST'] ~ "').html());
                        } else  if(document.getElementById('qestionsDependante_" ~ liste[0]['ID_PERE'] ~ "') ){
                        
                            $('#qestionsDependante_" ~ liste[0]['ID_PERE'] ~ "').append($('.dep" ~ liste[0]['ID_THEME'] ~ "_" ~ liste[0]['ID_QUEST'] ~ "').html());
                        
                        }else {
                            $('#mg-multisidetabs').append('<a class=\"list-group-item separateur_bottom clearfix\" id=\"zone" ~ liste[0]['ID_PERE'] ~ "\"><span>" ~ liste[0]['libTheme']|e('js')|raw ~ "</span><span class=\"glyphicon glyphicon-chevron-down mg-icon pull-right\"></span></a><div class=\"panel list-sub mg-show\" style=\"display:block;\"> <div class=\"panel-body\"><div class=\"list-group\" id=\"id_" ~ liste[0]['ID_PERE'] ~ "\">'+
                            $(\".dep" ~ liste[0]['ID_THEME'] ~ "_" ~ liste[0]['ID_QUEST'] ~ "\").html()+'<br /><div id=\"qestionsDependante_" ~ liste[0]['ID_PERE'] ~ "\" style=\"background-color: #fbfbfb;\"></div><br /></div></div></div>');
                        }" %}


					</div>
				{# {% endif %} #}
			{% endif %}
		{% endfor %}


	</div>
	<div id="JSDEP">
		{{ js }}
	</div>


{% endblock %}
