{*
  Output of search results/browselist
  $Id: list.tpl,v 1.00 2006/10/24 22:00:00
*}

{if $competitionslistcolumns == 1}
    {assign var=IMGWIDTH value="75"}
    {assign var=IMGHEIGHT value="75"}
    {assign var=ROWSPAN value="2"}
{else}
    {assign var=IMGWIDTH value="150"}
    {assign var=IMGHEIGHT value="150"}
    {assign var=ROWSPAN value="3"}
{/if}


<div id="docpart_list_target">

<div id="docpart_list_target_loading">
Loading...
</div>

<div id="content">
{counter start=0 print=false name=competitioncount}
{foreach item=competition from=$list}

{if $count == 0}
    {cycle values="listeven,listodd" assign=CLASS print=false}
    <div class="{$CLASS}">
        <table width="100%" style="top:0px" border="2" cellpadding="0" cellspacing="5">
        <tr>
{/if}

    <td id="vignette" align="center" width="{math equation="floor(100/x)" x=$competitionslistcolumns}%">
			<div id="theme"><a href="show_competitions.php?id={$competition.id}">{$competition.shortname}</a></div>
			{if $competition.imgurl && $showimg}
			<a title="{$competition.longname}" href="show_competitions.php?id={$competition.id}">
			<img alt="{$competition.longname}" src="{$competition.imgurl}" border="0" hspace="5" vspace="5" width="{$IMGWIDTH}">
			</a> 
			{/if}
            {if $competition.editable}
                <form action="edit_club.php" method="get">
                    <input type="hidden" name="id" value="{$competition.id}"/>
                    <input type="submit" value="{$lang.edit}" class="button"/>
                </form>
                <form action="delete_club.php" method="get">
                    <input type="hidden" name="id" value="{$competition.id}"/>
                    <input type="submit" value="{$lang.del}" onclick="return(confirm('{$competition.lastname|escape:javascript}: {$lang.really_del}?'))" class="button"/>
                </form>
            {/if}
    </td>


{counter assign=count name=competitioncount}
{if $count == $competitionslistcolumns}
    {counter start=0 print=false name=competitioncount}
    </tr>
	</table>
    </div>
{/if}
{php}flush();{/php}
{/foreach}

{if $count != 0}
    {section name="columnLoop" start=$count loop=$competitionslistcolumns}
        <td class="{$CLASS}">&nbsp;</td>
    {/section}
    </tr>
	</table>
    </div>
{/if}

</div>
<!-- /content -->

</div>