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

{if $actorlistcolumns == 1}
    {assign var=IMGWIDTH value="35"}
    {assign var=IMGHEIGHT value="48"}
    {assign var=ROWSPAN value="2"}
{else}
    {assign var=IMGWIDTH value="97"}
    {assign var=IMGHEIGHT value="144"}
    {assign var=ROWSPAN value="3"}
{/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">
<div id="title"><a href="{if $cat==1}show_clubs.php{elseif $cat==2}show_competitions.php{elseif $cat==3}show_stadiums.php{else}show_persons.php{/if}">{$item.title}</a></div>
<div id="actions">
    <div id="barre-onglet">
	<form action="{if $cat==1}show_clubs.php{elseif $cat==2}show_competitions.php{elseif $cat==3}show_stadiums.php{else}show_persons.php{/if}" name="mkcommentform">
            <input type="hidden" name="id" value="{$subcat}"/>
            <input type="submit" value="{$lang.card}" class="onglet"/>
    </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="2" />
            <input type="submit" value="{$lang.gallery}" class="onglet"/>
        </form>
	{/if}
	{if $commentable}
        <form action="comments.php" name="mkcommentform">
            <input type="hidden" name="subcat" value="{$subcat}"/>
            <input type="hidden" name="cat" value="2" />
            <input type="submit" value="{$lang.comment}" class="onglet"/>
        </form>
	{/if}
	{if $video.prev_id || $video.next_id}
        <form action="{if $cat==1}show_clubs.php{elseif $cat==2}show_competitions.php{elseif $cat==3}show_stadiums.php{else}show_persons.php{/if}" name="prevform">
            <input type="hidden" name="id" value="{$video.prev_id}"/>
            <input type="submit" class="onglet" value="<" {if !$video.prev_id}disabled="disabled"{/if} accesskey="," />
        </form>
        <form action="{if $cat==1}show_clubs.php{elseif $cat==2}show_competitions.php{elseif $cat==3}show_stadiums.php{else}show_persons.php{/if}" name="nextform">
            <input type="hidden" name="id" value="{$video.next_id}"/>
            <input type="submit" class="onglet" value=">" {if !$video.next_id}disabled="disabled"{/if} accesskey="." />
        </form>
     {/if}
    </div>
{if $commentable}
	<div id="barre-season">
	
		<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}" />
			<input type="submit" value="{$lang.response}" class="onglet"/>
			{else}			
            <input type="submit" value="{$lang.mkcomment}" class="onglet"/>
			{/if}
        </form>
	</div>
{/if}	
</div>

{/if}



<div id="showheader">
{if $mycomment}
<table id="listitems" 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}"/>
                    <input type="submit" value="{$lang.edit}" class="button"/>
                </form>
                <form action="delete_comment.php" method="get">
                    <input type="hidden" name="id" value="{$comment.id}"/>
                    <input type="submit" value="{$lang.del}" onclick="return(confirm('{$comment.lastname|escape:javascript}: {$lang.really_del}?'))" class="button"/>
                </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 width="100%" border=0 class="show_info" cellspacing="5">
	<tr>
		<td>{$lang.title}
		<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>{$lang.comment} :<br/>
		<textarea cols="40" rows="8" 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}" />
			<input type="submit" value="{$lang.response}" class="button"/>
			{else}
			<input type="hidden" name="idcomment" value="{if $editmycomment.comment_id}{$editmycomment.comment_id}{else}0{/if}" />
			<input type="submit" value="{$lang.save}" class="button"/>
			{/if}
            
            
		</td>
	</tr>
</table>
</form>
{/if}
</div>


<div id="docpart_list_target">

<table id="listitems" width="100%" cellpadding=0 cellspacing="5">
{counter start=0 print=false name=actorcount}
{foreach item=comment from=$list}


    {cycle values="even,odd" assign=CLASS print=false}
    <tr class="{$CLASS}">
    <td>
        <table id="listitems" width="100%" border="0" cellpadding=0 cellspacing="5">
        <tr>
            <td width="90%"><b><u><a href="comments.php?cat={$cat}&subcat={$subcat}&idcomment={$comment.id}">{$comment.title}</a></u></b></td>
			{if $comment.editable || $comment.deletable}
			<td nowrap="nowrap" rowspan="2">
			{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"/>                    
                    <input type="submit" style="width:100%;" value="{$lang.edit}" class="button"/>
                </form>
			{/if}
			{if $comment.deletable}
                <form action="delete_comment.php" method="get">
                    <input type="hidden" name="id" value="{$comment.id}"/>
                    <input type="submit" style="width:100%;" value="{$lang.del}" onclick="return(confirm('{$comment.lastname|escape:javascript}: {$lang.really_del}?'))" class="button"/>
                </form>
			{/if}	            
            </td>
			{/if}
			
		</tr>
		<tr>
			<td>				
				{if $comment.plot}
                <span class="list_plot">				
                {$comment.plot}
                </span>
				{/if}
            </td>
        </tr>
        </table>
	</td>
  </tr>
{/foreach}  
</table>

</div>