{% extends "base.html" %}
{% load i18n %}

{% block js_import %}
{{block.super}}
	<script type="text/javascript" src="{{MEDIA_URL}}js/projectscontents.js" ></script>
{% endblock %}

{% block js_declaration %}
{{block.super}}
<script type="text/javascript">

content_filter_url = "{% url franceculture.views.contentsfilter filter='__FILTER__' %}";

function init_events(base_node) {

	init_events_contents(base_node, "{% url franceculture.views.popup_embed %}");		
}

$(document).ready(function(){

	input_list_init = [
		{'input_selector':"#searchcontentsinput", 'container_selector':"#contentslistcontainer", 'url':content_filter_url},
	];
	           	
	
	searchFieldInit(input_list_init);

	$("#searchcontentsinput").keyup(function (e) {
		var container_selector="#contentslistcontainer";
		searchCallback(e.target, container_selector, searchcontentfilterurl);		
	});
	
	init_events(document);

});
</script>

{% endblock %}

{% block css_import %}
{{block.super}}
    <link rel="stylesheet" href="{{BASE_URL}}static/css/workspace.css" type="text/css"/>
{% endblock %}

{% block content %}
<div class="span-24" id="allcontentsdiv">
	<div class="span-12" id="contentsdiv">
	    <div class="span-12 last titlediv" >
			<div class="span-8 projectscontentstitle">{% trans "content list" %}</div>
			<div class="span-4 last searchfielddiv" >
			    <div class="searchfield rounded"><input id="searchcontentsinput" class="searchfieldinput searchfieldinputbase" value="{% trans 'search' %}" type="text" /><img id="contentsajaxloader" class="searchajaxloader" src="{{MEDIA_URL}}/img/ajax-loader-16x16.gif" alt="loader"/></div>
			</div>
		</div>
		<div class="span-12 last projectscontentsdiv" id="contentslistcontainer">
		{% include "franceculture/partial/contentslist.html" %}
		</div>
	</div>		
	<div class="span-12 last" id="createcontentsdiv">
	</div>		
</div>
{% endblock %}
