{% extends "ldt/user/user_base.html" %}
{% load i18n %}

{% block js_declaration %}
{{block.super}}
<script type="text/javascript">
$(document).ready(function(){

	$('.ldt_link').each(function(i) {
		$(this).attr("target","_blank");
	});
	$('.ldt_link').nyroModal({
	    filters: ['iframe'],
	    sizes: {
	    	minH: 662,
	    	minW: 1022
	    },
	    callbacks: {
	        afterShowCont: function(nm) {
	              nm.store.iframe.height(662);
	              nm.store.iframe.width(1022);
	          }
	    }
    });
	
    $('.ldt_link_create').each(function(i) {
        $(this).attr("target","_iri");
    });
    $('.ldt_link_create').nyroModal({
    	   filters: ['iriIframe'],
           sizes: {
               minH: 662,
               minW: 1022
           },
           callbacks: {
               afterShowCont: function(nm) {
                     nm.store.iframe.height(662);
                     nm.store.iframe.width(1022);
               },
           }
    });

});
</script>

{% endblock %}

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

{% block breadcrumb %}
<li></li>
<li><a href="{% url ldt.userpanel.views.space %}">{% trans "Space" %}</a></li>
<li>{% trans "Ldt Project" %}</li>
{% endblock %}

{% block content_title %}{% trans "Contents" %}{%endblock %}

{% block iricontent %}
<div id='contentlist'><a
	href="#" class="create_content_link">{% trans 'Create new content'%}</a>

<table>
<caption>{% trans "Content" %}</caption>
	<thead>
		<tr>
			<th width="170">{% trans "title" %}</th>
			<th width="20">{% trans "create project" %}</th>
		</tr>
	</thead>
	<tbody>
{% for content in contents %}
    <tr>
        <td><a href="{% url ldt.ldt_utils.views.lignesdetemps.index content.iri_id %}" class="ldt_link">{{ content.title }}</a></td>
        <td><a href="{% url ldt.ldt_utils.views.project.create_project content.iri_id %}" class="ldt_link_create">{% trans "create project" %}</a></td>
    </tr>
{% endfor %}
    </tbody>
</table>
</div>

{% endblock %}
