{if !$no_display_message}
    <div class="space"></div>
{include file=$webdoc.template_dir|cat:"message.tpl"}
{/if}
{if !$no_display}
{if $record}
{if !isset($record.current) || $record.current!=1 }
    <p>Viewing older version.</p>
{/if}
    <table class="record">
      <tr><th>Name:</th></tr><tr><td>{$record.name}</td></tr><tr class="space"><td></td></tr>
      <tr><th>{if $webdoc.main_table=="product"}Family{else}Category{/if}:</th></tr><tr><td>{if !isset($record.category)}-{else}{$record.category}{/if}</td></tr><tr class="space"><td></td></tr>
      <tr><th>Parent:</th></tr><tr><td>{if !isset($record.parent)}-{else}{$record.parent}{/if}</td></tr><tr class="space"><td></td></tr>
      <tr><th>Created:</th></tr><tr><td>{$record.created}{if $record.creator}<br />{$record.creator}{/if}</td></tr><tr class="space"><td></td></tr>
      <tr><th>Approved:</th></tr><tr><td>{if !isset($record.approved)}No{else}{$record.approved}{if isset($record.approver)}<br />{$record.approver}{/if}{/if}</td></tr><tr class="space"><td></td></tr>
{if $webdoc.main_table=="requirement"}        
      <tr><th>Active:</th></tr><tr><td>{if $record.active==1}Yes{else}No{/if}</td></tr><tr class="space"><td></td></tr>
{/if}
      <tr><th>Description:</th></tr><tr><td>{$record.description}</td></tr><tr class="space"><td></td></tr>
      <tr><th>Comments:</th></tr><tr><td>{$record.comments}</td></tr>
{if $webdoc.main_table=="product"}
<tr class="space"><td></td></tr>
      <tr><th>Requirements (state, priority):</th></tr><tr><td>
{assign var=i value=0}
{foreach from=$record.requirements key=key item=requirement}
{assign var=i value=$i+1}
{$requirement} ({$record.states.$key}, {$record.priorities.$key})
{if $i<count($record.requirements)}<br />{/if}
{/foreach}
{if !isset($record.requirements)}No{/if}
{/if}
{if $webdoc.main_table=="requirement"}
<tr class="space"><td></td></tr>
      <tr><th>Dependences:</th></tr><tr><td>
{assign var=i value=0}
{foreach from=$record.dependences key=key item=dependence}
{assign var=i value=$i+1}
{$dependence}
{if $i<count($record.dependences)}<br />{/if}
{/foreach}
{if !isset($record.dependences)}No{/if}
      </td></tr><tr class="space"><td></td></tr>
      <tr><th>Is product specific:</th></tr><tr><td>{if $record.is_product_specific}Yes{else}No{/if}</td></tr></tr>
{/if}
    </table>
{/if}
{/if}