{*
@author: Javier Reyes Gomez (jreyes@escire.com)
@date: 27/01/2006
@copyright (C) 2006 Javier Reyes Gomez (eScire.com)
@license http://www.gnu.org/copyleft/lgpl.html GNU/LGPL
*}
<p class="pagetitle">{tr}Workspace Types Resources{/tr}</p>

<form name="form1" method="post" action="tiki-workspaces_types_resources.php">
  <input name="wstypeId" type="hidden" id="wstypeId" value="{$wstype.id}"> 
  <input name="resourceId" type="hidden" id="resourceId" value="{$resourceId}"> 
  <table class="normal">
    <tr> 
      <td class="formcolor"><label>{tr}Workspace type name{/tr}</label></td>
      <td class="formcolor"><a href="tiki-workspaces_types.php?edit={$wstype.id}">({$wstype.code}) {$wstype.name}</a></td>
    </tr>
    <tr> 
      <td class="formcolor"><label for="name">{tr}Resource name{/tr}</label></td>
      <td class="formcolor"><input name="name" type="text" id="name" value="{$resource.name}" size="60" maxlength="100"></td>
    </tr>
    <tr> 
      <td class="formcolor" ><label for="desc">{tr}Resource description{/tr}</label></td>
      <td class="formcolor"><textarea name="desc" size="60" cols="60" rows="4">{$resource.desc}</textarea></td>
    </tr>
	<tr>
    <td class="formcolor" ><label for="workspaceResources">{tr}Resource type{/tr}</label></td>
    <td class="formcolor">
		{include file="tiki-workspaces_resource_types.tpl" value=$resource.type listName="type" multiple="false" showlabel="false" listsize="10"} 
	</td>
	</tr>
 
     <tr> 
      <td class="formcolor" colspan="2"><center><input class="edubutton" type="submit" name="send" value="Guardar"></center></td>
    </tr>
  </table>
</form>

<br/>

<table class="normal" width="100%">
    <tr> 
      <td class="heading" width="10%">ID</td>
      <td class="heading" width="15%">{tr}Name{/tr}</td>
      <td class="heading" width="65%">{tr}Description{/tr}</a></td>
      <td class="heading" width="10%">{tr}type{/tr}</td>
      <td class="heading"> </td>
      <td class="heading"> </td>
    </tr>
{assign var=resources value=$wstype.resources}
{section name=i loop=$resources}
	{assign var=index value=$smarty.section.i.index}
    {cycle values="odd,even" assign="parImpar"}
    <tr> 
      <td class="{$parImpar}">{$index}</td>
      <td class="{$parImpar}">{$wstype.resources[i].name}</td>
      <td class="{$parImpar}">{$wstype.resources[i].desc}</td>
      <td class="{$parImpar}">{$wstype.resources[i].type}</td>
      <td class="{$parImpar}"> <a class="link" href="tiki-workspaces_types_resources.php?edit={$index}&wstypeId={$wstype.id}">
           <img src='img/icons/edit.gif' border='0' alt='Editar' title='Editar' /></a></td>
       <td class="{$parImpar}"><a class="link" href="tiki-workspaces_types_resources.php?delete={$index}&wstypeId={$wstype.id}">
      	   <img src='img/icons2/delete.gif' border='0' alt='Borrar' title='Borrar' /></a>
      </td>
    </tr>
{/section}
</table>