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

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

	$('.ldt_link').nyroModal({
           	type: 'iframe',
           	forceType: 'iframe',
       		height:662, 
       		width:1022,
       		bgColor: 'rgb(239, 239, 239)',
       		padding: 5,
       		titleFromIframe: false
          	});
        	
     $('.ldt_link_create').nyroModal({
            type: 'iframe',
            forceType: 'iframe',
            height:662, 
            width:1022,
            bgColor: 'rgb(239, 239, 239)',
            padding: 5,
            titleFromIframe: false,
            beforeHideContent: function(elts, settings, callback){
	             try {
		              var res = $('#ldtInitSwf',$('#nyroModalIframe').contents());
		              if(res.length > 0)
		              {
		              	   res.get(0).forceSave();
		              }
	             }
	             catch(err)
	             {
	              // do nothing
	             }                   
	             callback();
            }
        });

});
</script>

{% endblock %}

{% block css_import %}
{{block.super}}
    <link rel="stylesheet" type="text/css" href="{{ BASE_URL }}static/ldt/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.index content.iri_id %}" class="ldt_link">{{ content.title }}</a></td>
        <td><a href="{% url ldt.ldt_utils.views.create_project content.iri_id %}" class="ldt_link_create">{% trans "create project" %}</a></td>
    </tr>
{% endfor %}
    </tbody>
</table>
</div>

{% endblock %}
