{* factory_template_prize *}

{* remove inline css *}

{literal}
<style type="text/css">

img.left {
    float: left;
	margin-right: 20px;	
}

img.right {
    float: right;
	margin-left: 20px;	
}

</style>
{/literal}

{* /remove inline css *}

{capture assign='period_title'}{/capture}  

{capture assign='bullet_links'}

{foreach from=$items item="item" name="loop"}
    {if $smarty.foreach.loop.index == 0}

<b>{$item->action_title}: {$item->action_start_date|date_format:"%d %B %Y"} - {$item->action_end_date|date_format:"%d %B %Y"}</b>
<ul>
    {/if}
    
    {if $period_title != $item->period_title} 
<li>{$item->period_title}: {$item->period_start_date|date_format:"%d %B %Y"} - {$item->period_end_date|date_format:"%d %B %Y"}</li>
    {/if}
    {capture assign='period_title'}{$item->period_title}{/capture} 
{/foreach}    
</ul>
{/capture}

{capture assign='period_title'}{/capture}  

{foreach from=$items item="item" name="loop"}

    {* display action data *}
    {if $smarty.foreach.loop.index == 0}
<h1>{$item->action_title}</h1>
{*<h1>{$item->action_start_date|date_format:"%d %B %Y"} - {$item->action_end_date|date_format:"%d %B %Y"}</h1>*}

<p>
<br /><b>{$item->action_description}</b><br /><br />


{$bullet_links}

</p>
    {/if}
 
    {* display period data *}
    {if $period_title != $item->period_title} 
<a name="item-{$smarty.foreach.loop.index}"></a>  
<br /><h3>{$item->period_title}: {$item->period_start_date|date_format:"%d %B %Y"} - {$item->period_end_date|date_format:"%d %B %Y"}</h3>
<hr />

    {/if}

    {capture assign='period_title'}{$item->period_title}{/capture}      
    
    {* display prize data *}
    
<h4>{$item->prize_number}x {$item->prize_title}{*$item->prize_code*}</h4>    

{if $item->period_final}
<br /><font color=#FF0000><b>Dit is de finale, wat een prijs!</b></font><br />
{/if}

<p>
{eval var=$item->prize_description} <br /><br />
</p>

{/foreach}

<br /><br />

{* /factory_template_prize *}
