<metal:block metal:define-macro="page" metal:extend-macro="here/standard_template_macro">
<metal:block fill-slot="meta">
	<meta tal:define="description here/description;
					  content python:here.html2text(description);"
		  tal:condition="content"
		  tal:attributes="content content" name="description" />
	<meta tal:condition="here/keywords"
		  tal:attributes="content here/keywords" name="keywords" />
	<meta tal:attributes="content here/contributor" name="author" />
	<meta tal:attributes="content here/gl_get_selected_language"
		  name="dc.language" />
	<meta tal:attributes="content string:${here/title} | ${here/site_title}"
		  name="title" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</metal:block>

<metal:block metal:fill-slot="header-title">
	<title tal:content="string:${here/title} | ${here/site_title}" />
</metal:block>

<metal:block metal:fill-slot="head"></metal:block>

<metal:block fill-slot="body">
<div id="center_content">
	<metal:block metal:define-slot="page-middle">
	<metal:block define-macro="folder-title">

	<div class="folder_social">
		<tal:block content="structure here/set_content_rating" />
		<div class="folder_social_icons">
		<a class="feed_link"
			tal:attributes="href string:${here/absolute_url}/index_atom">
			&nbsp;</a>
		<a class="facebook_link"
			tal:attributes="href string:http://www.facebook.com/sharer.php?u=${here/absolute_url}">
			&nbsp;</a>
		<a class="twitter_link"
			tal:attributes="href string:http://twitter.com/intent/tweet?text=${here/absolute_url}">
			&nbsp;</a>
		</div>
	</div>

	<h1>
		<metal:block use-macro="python: here.getFormsTool().getForm('site_object_index').macros['icon']"></metal:block>
		<tal:block tal:replace="here/title_or_id" />
		<tal:block tal:condition="python: here.can_be_seen() and here.has_restrictions()" i18n:translate="">
			[Limited access]
		</tal:block>
		<tal:block tal:condition="python:not here.can_be_seen()" i18n:translate="">
			[Restricted access]
		</tal:block>
		<span class="available_langs" tal:condition="python:here.item_has_title(here, here.title)">
			<span i18n:translate="">Item only translated in </span>
			<span tal:repeat="lang here/gl_get_languages_map">
				<a tal:content="python:' %s' % lang['title']"
					tal:condition="python:not lang['selected'] and here.getLocalProperty('title', lang['id'])"
					tal:attributes="href python:'gl_changeLanguage?old_lang=%s' % (lang['id'])" />
			</span>
		</span>
	</h1>

	</metal:block>

	<div class="folder_description">
	    <p tal:condition="python:here.description!=''"
		    tal:content="structure here/description" />
	</div>

	<div class="folder_content">
	<metal:block use-macro="python:here.getFormsTool().getForm('folder_listing').macros['listing']">
		<metal:block fill-slot="menu_extension">
			<span tal:replace="structure here/menusubmissions" />
		</metal:block>
	</metal:block>
	</div>
	</metal:block>

	<metal:block metal:define-slot="folder_footer">
	<div id="folder_footer" class="folder_footer"
		tal:define="listing_info folder_listing_info|here/folder_listing_info;
					folders_list object_list_custom|python:listing_info['folders'];
					objects_list object_list_custom|python:listing_info['objects'];">
		<a class="download_link"
			rel="nofollow" href="./zip_export/do_export"
			title="Download the contents of this folder to a Zip file"
			tal:condition="python: here.checkPermissionZipExport() and len(folders_list) + len(objects_list)> 0"
			i18n:attributes="title"
			i18n:translate="">Zip download</a>
	</div>
	<div class="clearer"></div>
	</metal:block>

</div>

<span tal:replace="structure here/comments_box" />
</metal:block>

</metal:block>
