{*
  Output of search results/browselist
  $Id: list.tpl,v 2.30 2005/09/27 07:31:00 andig2 Exp $

	#1 Clubs
	#2 Competitions
	#3 Stadiums
	#4 Persons
	#Default Persons
*}

{if $actorlistcolumns == 1}
    {assign var=IMGWIDTH value="35"}
    {assign var=IMGHEIGHT value="48"}
    {assign var=ROWSPAN value="2"}
{else}
    {assign var=IMGWIDTH value="75"}
    {assign var=IMGHEIGHT value="75"}
    {assign var=ROWSPAN value="3"}
{/if}

{if $cat == 1}
{assign var=link value="show_clubs"}
{elseif $cat == 2}
{assign var=link value="show_competitions"}
{elseif $cat == 3}
{assign var=link value="show_stadiums"}
{elseif $cat == 4}
{assign var=link value="show_persons"}
{else}
{assign var=link value="show_persons"}
{/if}

{* 		Comments list for item				*}

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

<script language="JavaScript" type="text/javascript" src="javascript/look.js"></script>
<!-- content begin -->

<div id="content">
<br>
<div id="toppage"><a href="{$link}.php?id={$subcat}">{$item.title}</a></div>
<table id="tableshow" width="100%" cellspacing="0" cellpadding="0">
{if $commentable}
	<tr>
		<td>
				<form action="comments.php" name="mkcommentform">
					<input type="hidden" name="subcat" value="{$subcat}"/>
					<input type="hidden" name="cat" value="{$cat}" />
					<input type="hidden" name="new" value="1" />
					{if $idcomment}
					<input type="hidden" name="idcomment" value="{$idcomment}" />
					<span class="onglet-admin">
					<input type="submit" value="{$lang.respond}"/>
					</span>
					{else}			
					<span class="onglet-admin">
					<input type="submit" value="{$lang.add}"/>
					</span>
					{/if}
				</form>
		</td>
	</tr>
{/if}
	<tr>
		<td>
			<div id="barre-onglet">
			<form action="{$link}.php" name="mkcommentform">
					<input type="hidden" name="id" value="{$subcat}"/>
					<span class="onglet">
					<input type="submit" value="{$lang.card}" />
					</span>
			</form>
		{if $seegallery || $addgallery || $commentable}
			{if $seegallery}
				<form action="gallery.php" name="galleryform">
					<input type="hidden" name="subcat" value="{$subcat}"/>
					<input type="hidden" name="cat" value="{$cat}" />
					<span class="onglet">
					<input type="submit" value="{$lang.gallery}" />
					</span>
				</form>
			{/if}
			{if $commentable}
				<form action="comments.php" name="mkcommentform">
					<input type="hidden" name="subcat" value="{$subcat}"/>
					<input type="hidden" name="cat" value="{$cat}" />
					<span class="onglet">
					<input type="submit" value="{$lang.comment}" />
					</span>
				</form>
			{/if}
			{if $video.prev_id || $video.next_id}
				<form action="{$link}.php" name="prevform">
					<input type="hidden" name="id" value="{$video.prev_id}"/>
					<span class="onglet">
					<input type="submit" value="<" {if !$video.prev_id}disabled="disabled"{/if} accesskey="," />
					</span>
				</form>
				<form action="{$link}.php" name="nextform">
					<input type="hidden" name="id" value="{$video.next_id}"/>
					<span class="onglet">
					<input type="submit" value=">" {if !$video.next_id}disabled="disabled"{/if} accesskey="." />
					</span>
				</form>
			 {/if}
			</div>
		</td>
	</tr>
</table>
</div>

{/if}



<div id="showheader">
{if $mycomment}
<table id="tableshow" width="100%" border="0" cellpadding=0 cellspacing="5">
        <tr>
            <td width="90%"><b><u><a href="comments.php?cat={$cat}&subcat={$subcat}&idcomment={$mycomment.id}">{$mycomment.title}</a></u></b></td>
			{if $mycomment.editable}
			<td nowrap="nowrap" rowspan="2">            
                <form action="edit_comment.php" method="get">
                    <input type="hidden" name="id" value="{$comment.id}"/>
                    <span class="onglet-admin">
					<input type="submit" value="{$lang.edit}"/>
					</span>
                </form>
                <form action="delete_comment.php" method="get">
                    <input type="hidden" name="id" value="{$comment.id}"/>
                    <span class="onglet-admin">
					<input type="submit" value="{$lang.del}" onclick="return(confirm('{$comment.lastname|escape:javascript}: {$lang.really_del}?'))"/>
					</span>
                </form>            
            </td>
			{/if}
		</tr>
		<tr>
			<td>				
				{if $mycomment.comment}
                <span class="list_plot">				
                {$mycomment.comment}
                </span>
				{/if}
            </td>
        </tr>
        </table>
{/if}



{if $new}
<form action="comments.php" name="mkcommentform">
<table id="tableshow" width="100%" border=0 class="show_info" cellspacing="0">
	<tr>
		<td class="lineeven"><b>» {$lang.title} :</b>
		<input type="text" size="50" maxlength="255" name="title" value="{if $mycomment}[RE] {$mycomment.title}{/if}{if $editmycomment} {$editmycomment.title}{/if}">
		</td>
	</tr>
	<tr>
		<td class="lineodd" colspan="2"><b>» {$lang.comment} :</b></td>
	</tr>
	<tr>
		<td class="lineeven" align="center" colspan="2">
		<textarea style="width:95%; height:100px;" name="plot" id="plot" wrap="off">{if $editmycomment}{$editmycomment.plot}{/if}</textarea>
		</td>
	</tr>
	<tr>
    	<td class="center">
            <input type="hidden" name="subcat" value="{$subcat}"/>
            <input type="hidden" name="cat" value="{$cat}" />
			<input type="hidden" name="save" value="1" />
			{if $editmycomment.id}
			<input type="hidden" name="id" value="{$editmycomment.id}" />
			{/if}
			{if $idcomment}
			<input type="hidden" name="idcomment" value="{$idcomment}" />
			<span class="onglet-admin">
			<input type="submit" value="{$lang.respond}" class="button"/>
			</span>
			{else}
			<input type="hidden" name="idcomment" value="{if $editmycomment.comment_id}{$editmycomment.comment_id}{else}0{/if}" />
			<span class="onglet-admin">
			<input type="submit" value="{$lang.save}"/>
			</span>
			{/if}
            <span class="onglet-admin">
			<input type="button" value="{$lang.back}" onclick="javascript:history.go(-1);"/>
			</span>
			
            
		</td>
	</tr>
</table>
</form>
{/if}
</div>


<div id="docpart_list_target">

<table id="tableshow" width="100%" cellpadding=0 cellspacing="0">
{counter start=0 print=false name=actorcount}
{foreach item=comment from=$list}
{cycle values="listeven,listodd" assign=CLASS print=false}
    <tr>
    <td class="{$CLASS}"><br>
        <table id="tableshow" width="100%" border="0" cellpadding=2 cellspacing="0">
        <tr>
			{if {$comment.avatar}
			<td rowspan="3" height="{$IMGHEIGHT}"><img src="{$comment.avatar}" width="{$IMGWIDTH}" border="0"></td>
			{/if}
            <td class="lineodd" width="90%" style="height:15px;">
				<img src="templates/portal/images/th_avatar.gif" width="12" height="12" hspace="5" align="absmiddle" border="0">{$comment.name}
				<img src="templates/portal/images/th_date.gif" width="12" height="12" hspace="5" align="absmiddle" border="0">{$comment.created}
			</td>
		</tr>
		<tr>
			<td valign="top" style="{$IMGHEIGHT}">
			<b><u><a href="comments.php?cat={$cat}&subcat={$subcat}&idcomment={$comment.id}">{$comment.title}</a></u></b><br>
			{if $comment.plot}
                <span class="list_plot">				
                {$comment.plot}
                </span>
				{/if}	            
            </td>
		</tr>
		<tr>
			<td>				
			{if $comment.editable || $comment.deletable}
				{if $comment.editable}            
					<form action="comments.php" method="get">
						<input type="hidden" name="id" value="{$comment.id}"/>
						<input type="hidden" name="subcat" value="{$subcat}"/>
						<input type="hidden" name="cat" value="{$cat}"/>
						<input type="hidden" name="editcomment" value="1"/>
						<input type="hidden" name="new" value="1"/>                    
						<span class="onglet-admin">
						<input type="submit" style="width:100%;" value="{$lang.edit}" class="button"/>
						</span>
					</form>
				{/if}
				{if $comment.deletable}
					<form action="delete_comment.php" method="get">
						<input type="hidden" name="id" value="{$comment.id}"/>
						<span class="onglet-admin">
						<input type="submit" style="width:100%;" value="{$lang.del}" onclick="return(confirm('{$comment.lastname|escape:javascript}: {$lang.really_del}?'))"/>
						</span>
					</form>
				{/if}
	        {/if}
			</td>
        </tr>
       </table>
	</td>
  </tr>
{/foreach}  
</table>

</div>