<metal:block metal:use-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 fill-slot="head">
        <link rel="alternate" type="application/rdf+xml" title="RDF"
              tal:attributes="href here/absolute_url" />
    </metal:block>

    <metal:block tal:define="is_ratable here/is_ratable;
                              site_object_index python:(here.getFormsTool()
                                                .getForm('site_object_index'))"
                 fill-slot="body">
        <h1><metal:block use-macro="site_object_index/macros/icon"/>
            <span tal:replace="here/title_or_id" />
            <tal:block condition="is_ratable"
                            replace="structure here/user_rating_view|nothing"/>
            <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 use-macro="site_object_index/macros/action_buttons"/>

        <!-- Map widget -->
        <tal:block condition="python:here.prop_details('geo_location')['show']"
            content="structure python:here.portal_map.render_object_map(here.geo_location)"/>

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

        <p tal:condition="here/start_date"><a tal:attributes="href string:${here/absolute_url}/get_ics"
              i18n:translate="">Download as iCalendar</a></p>

        <table border="0" cellspacing="2" cellpadding="2" tal:define="portal_map here/getGeoMapTool;">
        <tr tal:condition="here/start_date">
            <th i18n:translate="">Period</th>
            <td>
            <tal:block condition="python:here.end_date and here.start_date != here.end_date">
                [<span tal:replace="python:here.utShowDateTime(here.start_date)"/> - <span tal:replace="python:here.utShowDateTime(here.end_date)"/>]
            </tal:block>
            <tal:block condition="python:here.end_date is None or here.start_date == here.end_date">
                <span tal:replace="python:here.utShowDateTime(here.start_date)"/>
            </tal:block>
            </td>
        </tr>
        <tr tal:condition="here/location">
            <th i18n:translate="" tal:content="python: here.prop_details('location')['label']" />
            <td>
                <tal:block tal:condition="python:here.location_url and (here.location_url != 'http://')">
                <a tal:attributes="href here/location_url"
                    tal:content="here/location"
                    title="[Hold down the Shift key when you click on a link to open it in a new window]"
                    i18n:attributes="title" />
                        <span tal:replace="here/location_address" />
                </tal:block>
                <tal:block tal:condition="python:(here.location_url == '') or (here.location_url == 'http://')">
                <span tal:replace="here/location" /> <span tal:replace="here/location_address" />
                </tal:block>
            </td>
        </tr>
        <tal:block content="structure python: here.prop_display_tr('host')" />
        <tal:block content="structure python: here.prop_display_tr('agenda_url', label='See the agenda', as_href=True)" />
        <tal:block content="structure python: here.prop_display_tr('event_url', as_href=True)" />
        <tr tal:define="
                contact_person python:here.prop_details('contact_person');
                contact_email python:here.prop_details('contact_email');
                contact_phone python:here.prop_details('contact_phone');
                contact_fax python:here.prop_details('contact_fax')"
            tal:condition="python:contact_person['show'] or contact_email['show'] or contact_phone['show'] or contact_fax['show']">
            <th style="vertical-align: top" i18n:translate="" tal:content="contact_person/label" />
            <td>
                <span tal:replace="contact_person/value"/>
                <tal:block condition="contact_email/show">
                    <br /><span i18n:translate="Email address: " /> <span tal:replace="contact_email/value"/>
                </tal:block>
                <tal:block condition="contact_phone/show">
                    <br /><span i18n:translate="Phone: " /> <span tal:replace="contact_phone/value"/>
                </tal:block>
                <tal:block condition="contact_fax/show">
                    <br /><span i18n:translate="Fax: " /> <span tal:replace="contact_fax/value"/>
                </tal:block>
            </td>
        </tr>
        <tal:block condition="here/checkPermissionPublishObjects" content="structure python: here.prop_display_tr('releasedate')" />
        <metal:block tal:condition="here/checkPermissionPublishObjects"
            use-macro="site_object_index/macros/contributor_tr" />
        <tal:block content="structure python: here.prop_display_tr('coverage')" />
		<tal:block condition="here/is_geo_enabled">
			<tr tal:define="title python:portal_map.getSymbolTitle(here.geo_type);
			picture python:portal_map.getSymbolPicture(here.geo_type)"
				tal:condition="python: title != '' and here.geo_location">
					<th i18n:translate="Type (translate as a noun)">Type</th>
					<td>
				<img tal:condition="picture" tal:attributes="src string:${portal_map/absolute_url}/getSymbolPicture?id=${here/geo_type}; alt title; title title" />
				<span tal:replace="title" i18n:translate="" />
					</td>
			</tr>
		</tal:block>

        <tal:block content="structure python: here.prop_display_tr('keywords')" />

        </table>

        <p tal:define="details python:here.prop_value_or_none('details')"
            tal:condition="details" tal:content="structure details" />

        <tal:block content="structure here/set_content_rating" />

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