{tpl_array_rearrange arr=$definitions index_of_index="code" index_of_value="name" assign="defs"}
<div style="height:24px; background-color: #005996; margin-top: 20px; padding: 2px 5px;">
	<img src="/mod_bin/general/arrow.php?h=9&&w=5&d=l&fc=FFCC00"> <a href="/event/" style="font-weight:bold; color:white;font-size:11px;"> Back to the index</a>
</div>

<div id="agenda_detail_container" style="padding: 10px 0;">

{if $agendapoint}

	<div class="date_info" style="float:left; width: 15%; text-align:center;">
		<strong style="font-size: 18px;font-weight: bold;">{$agendapoint.startdate|substr:0:2|trim}{if $agendapoint.enddate && $agendapoint.startdate|substr:0:2|trim != $agendapoint.enddate|substr:0:2|trim}-{$agendapoint.enddate|substr:0:2|trim}{/if}</strong>
		<br><br>
		{if !$agendapoint.enddate}
			{$agendapoint.startdate|substr:2|trim|replace:" 00:00":""}
		{else}
			{if $agendapoint.startdate|substr:2:4|trim|replace:" 00:00":"" != $agendapoint.enddate|substr:2:4|trim|replace:" 00:00":""}
				
				{$agendapoint.startdate|substr:2:4|trim|replace:" 00:00":""} - {$agendapoint.enddate|substr:2:9|trim|replace:" 00:00":""}
			{else}
				{$agendapoint.startdate|substr:2:9|trim|replace:" 00:00":""}
			{/if}

		{/if}
		{if 0 && $agendapoint.enddate}
			- {$agendapoint.enddate|replace:" 00:00":""}
		{/if}
	</div>
	
	<div style="width:85%; margin:0 0 0 16%;">
		<div class="def_name" style="color:#005996; font-size:10px;">{$defs[$agendapoint.def_code]}</div>
		<h3 style="font-size:11px; margin: 10px 0 15px 0;">{$agendapoint.name}</h3>
		{foreach from=$agendapoint.attributes item=att}

			{if $att.value}

				{if $att.code == 'GATT_DESC'}
					<div style="position:relative; padding:0 10px 20px 0;">{$att.value}</div>

				{elseif $att.code == 'GATT_EMAIL'}
					<div style="float:left; width:120px; background:#FCF4D2; margin:0 0 1px 0; padding:2px 3px 2px 3px;">
						<span style="font-weight:bold; font-size:10px; color:#005996;">{$att.label}:</span>
					</div>  
					<div style="padding:2px 0 2px 0; position:relative; margin:0 0 0 130px;"><a href="mailto:{$att.value}">{$att.value}</a></div>
					<p style="clear:both; margin:0;" />

				{elseif $att.code == 'GATT_URL'}

					<div style="float:left; width:120px; background:#FCF4D2; margin:0 0 1px 0; padding:2px 3px 2px 3px;">
						<span style="font-weight:bold; font-size:10px; color:#005996;">{$att.label}:</span>
					</div>
					<div style="padding:2px 0 2px 0; position:relative; margin:0 0 0 130px;"><a href="http://{$att.value|replace:"http://":""}" target="_blank">{$att.value}</a></div>
					<p style="clear:both; margin:0;" />

				{elseif $att.code != 'GATT_PAYED'}
				
					<div style="float:left; width:120px; background:#FCF4D2; margin:0 0 1px 0; padding:2px 3px 2px 3px;">
						<span style="font-weight:bold; font-size:10px; color:#005996;">{$att.label}:</span>
					</div> 
					<div style="padding:2px 0 2px 0; position:relative; margin:0 0 0 130px;">{$att.value|nl2br}</div>
					<p style="clear:both; margin:0;" />
				{/if}
				
			{/if}
		{/foreach}

		<div class="date" style="margin:10px 0 10px 0;">{$agendapoint.startdate|replace:" 00:00":""}{if $agendapoint.enddate} - {$agendapoint.enddate|replace:" 00:00":""}{/if}</div>
	
	</div>

	<br style="clear:both;"/>
	<div style="border-top: 5px solid #FFE680; clear:both; padding-left: 10px;">
		{$agendapoint.document.data}
	</div>
	<br style="clear:both;">
	<br style="clear:both;">

{/if}

</div>