{*
  Output of search results/browselist
  $Id: list.tpl,v 1.8 2005/10/05 07:24:10 andig2 Exp $
*}

{assign var=newslistcolumns value=1}
{if $newslistcolumns == 1}
    {assign var=IMGWIDTH value="115"}
    {assign var=IMGHEIGHT value="115"}
	{assign var=VIGHEIGHT value="130"}   
    {assign var=ROWSPAN value="2"}
{else}
    {assign var=IMGWIDTH value="100"}
    {assign var=IMGHEIGHT value="100"}
	{assign var=VIGHEIGHT value="130"}    
    {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=videocount}
{foreach item=news from=$list}

{if $count == 0}
    {cycle values="listeven,listodd" assign=CLASS print=false}
    <div class="{$CLASS}">
{/if}

			<table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    {if $news.imgurl && $showimg}
					<td height="{$IMGHEIGHT}" class="list_summary"{if $editable} rowspan="4"{else} rowspan="3"{/if}>
					<a title="{$news.title}" href="show_news.php?id={$news.id}">
					<img alt="{$news.title}" src="{$news.imgurl}" border="0" hspace="5" vspace="5" align="left" width="{$IMGWIDTH}" />
					</a>
					</td>
					{else}
					<td height="{$IMGHEIGHT}" class="list_summary"{if $editable} rowspan="4"{else} rowspan="3"{/if}> </td>
                    {/if}

					<td class="list_summary">	
						 <div class="catnews">
						<b>{$news.pubdate|date_format:"%d/%m/%y"}</b> {if $news.category}- <a href="index.php?categoryselect={$news.category}">{$news.category}</a><br />{/if}
						</div>
						<a class="title-news" href={if $news.link}"{$news.link}" target="_blank"{else}"show_news.php?id={$news.id}"{/if}>{$news.title}</a>
					</td>
				</tr>
				<tr>
					<td class="list_summary" valign="top">
						{$news.summary}<br />
					</td>
				</tr>
				<tr>
					<td class="list_summary">	
						<b><a href={if $news.link}"{$news.link}" target="_blank"{else}"show_news.php?id={$news.id}"{/if}>{$news.newsfrom} - {$lang.knowmore}</a></b>
					</td>
				</tr>
				{if $editable}
				<tr>
					<td valign="top">
						<table border="0" cellpadding="0" cellspacing="0">
							<tr>
							<form action="edit_news.php" method="post" name="edit">
							<td>
							<input type="hidden" name="id" value="{$news.id}" />
							<span class="onglet-admin">
							<input type="submit" value="{$lang.edit}" />
							</span>
							</td>
							</form>
							<form action="delete.php" method="post" name="delete">
							<td>
							<input type="hidden" name="id" value="{$news.id}" />
							<input type="hidden" name="cat" value="7"/>
							<span class="onglet-admin">
							<input type="submit" value="{$lang.del}" onclick="return(confirm('{$news.title|escape:javascript}: {$lang.msg_really_del}?'))"/>
							</span>
							</td>
							</form>
							</tr>
						</table>
					</td>
				</tr>
				{/if}
            </table>


{counter assign=count name=videocount}
{if $count == $newslistcolumns}
    {counter start=0 print=false name=videocount}
    </div>

{/if}

{php}flush();{/php}
{/foreach}

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

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

</div>