<h1>{i18n}Document Fields{/i18n}</h1>

{ if $fieldsets}
<h2>{i18n}Existing generic document fields{/i18n}</h2>

<table class="pretty" cellspacing="0" cellpadding="0">
  <thead>
    <tr>
      <th colspan="2">{i18n}Name{/i18n}</th>
      <th>{i18n}Generic{/i18n}</th>
      <th>{i18n}Fields{/i18n}</th>
    </tr>
  </thead>
  <tbody>
{foreach from=$fieldsets item=oFieldset}
    <tr>
	  <td>
        <a href="{addQS}action=edit&fFieldsetId={$oFieldset->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a> 	  
	  </td>
      <td>
        
		<a href="{addQS}action=edit&fFieldsetId={$oFieldset->getId()}{/addQS}">
		   { $oFieldset->getName() }
        </a>
      </td>
      <td>
{if $oFieldset->getIsGeneric()}
	{i18n}Yes{/i18n}
{else}
	{i18n}No{/i18n}
{/if}
      </td>
      <td>
<ul>
{foreach from=$oFieldset->getFields() item=oField}
  <li>{$oField->getName()}</li>
{/foreach}
</ul>
      </td>
    </tr>
  </tbody>
{/foreach}
</table>
{/if}

<h2>{i18n}Create a new document field set{/i18n}</h2>

<form method="POST">
<input type="hidden" name="action" value="new" />
<input type="textbox" name="name" />
<input type="submit" name="submit" value="{i18n}Create{/i18n}" />
</form>
