<%perl>
my $rightText = $m->scomp( '/widgets/profile/imageSubmit.mc',
  formName => "theForm",
  callback => $widget . "|trail_cb",
  image    => "view_trail_teal"
) . '&nbsp;';

$rightText .= $m->scomp( '/widgets/profile/imageSubmit.mc',
  formName => "theForm",
  callback => $widget . "|notes_cb",
  value    => 'view',
  image    => %{ $fa->get_notes } ? 'note_fill' : "note",
  useGlobalImage => 1,
);

$m->comp("/widgets/wrappers/sharky/table_top.mc",
  	 caption   => "Information",
	 number    => 1,
         rightText => $rightText);
</%perl>

<table border="0" width="578" cellpadding="0" cellspacing="0">
  <tr>
  <td class="medHeader"><img src="/media/images/spacer.gif" height="18" width="1" /></td>
  <td width="<% $infoIndent %>" align="right" class="medHeader"><span class="label"><% $lang->maketext('Template Type') %>:&nbsp;</span></td>
  <td width="470" colspan="2">&nbsp;<% $fa->get_tplate_type_string %></td>
  </tr>
  <tr>
  <td bgcolor="white"><img src="/media/images/spacer.gif" width="1" height="1" /></td>
  </tr>

  <tr>
  <td class="medHeader"><img src="/media/images/spacer.gif" height="18" width="1" /></td>
% if ($fa->get_tplate_type == Bric::Biz::Asset::Formatting::ELEMENT_TEMPLATE) {
    <td width="<% $infoIndent %>" align="right" class="medHeader"><span class="label"><% $lang->maketext('Element') %>:&nbsp;</span></td>
    <td width="470">&nbsp;<% $fa->get_element_name %></td>
% } else {
    <td width="<% $infoIndent %>" align="right" class="medHeader"><span class="label"><% $lang->maketext('Name') %>:&nbsp;</span></td>
    <td width="470">&nbsp;<% $fa->get_name %></td>
% }
  </tr>
  <tr>
  <td bgcolor="white"><img src="/media/images/spacer.gif" width="1" height="1" /></td>
  </tr>


  <tr>
  <td class="medHeader"><img src="/media/images/spacer.gif" height="18" width="1" /></td>
  <td width="<% $infoIndent %>" align="right" class="medHeader"><span class="label"><% $lang->maketext('Description') %>:&nbsp;</span></td>
  <td width="470" colspan="2">&nbsp;<% $fa->get_description %></td>
  </tr>
  <tr>
  <td bgcolor="white"><img src="/media/images/spacer.gif" width="1" height="1" /></td>
  </tr>


  <tr>
  <td class="medHeader"><img src="/media/images/spacer.gif" height="18" width="1" /></td>
  <td width="<% $infoIndent %>" align="right" class="medHeader"><span class="label"><% $lang->maketext('Output Channel') %>:&nbsp;</span></td>
  <td width="470" colspan="2">&nbsp;<% $oc_name %></td>
  </tr>
  <tr>
  <td bgcolor="white"><img src="/media/images/spacer.gif" width="1" height="1" /></td>
  </tr>

  <tr>
  <td class="medHeader"><img src="/media/images/spacer.gif" height="18" width="1" /></td>
  <td width="<% $infoIndent %>" align="right" class="medHeader"><span class="label"><% $lang->maketext('Category') %>:&nbsp;</span></td>
  <td width="470" colspan="2">&nbsp;<% $cat_name %></td>
  </tr>
</table>

% $m->comp("/widgets/wrappers/sharky/table_bottom.mc");

% $m->comp("/widgets/wrappers/sharky/table_top.mc",
%   	 caption   => "Template Code",
% 	 number    => 2);
<table border="0" width="578" cellpadding="0" cellspacing="0">
  <tr>
  <td width="20">&nbsp;</td>
  <td width="465"><pre><% $code %></pre></td>
  </tr>
</table>
% $m->comp("/widgets/wrappers/sharky/table_bottom.mc");

<form>
<input type="image" src="/media/images/<% $lang_key %>/return_dgreen.gif" border="0" name="<% $widget %>|return_cb" value="Return">
</form>

<%args>
$widget
</%args>

<%init>
my $fa       = get_state_data($widget, 'fa');
my $cat_name = $fa->get_category_name;
my $oc_name  = $fa->get_output_channel_name;

my $code = $fa->get_data;
$code =~ s/</&#60;/g;
$code =~ s/>/&#62;/g;
my $agent = detect_agent();
my $infoIndent = $agent->nav4 ? FIELD_INDENT - 5 : FIELD_INDENT + 8;

</%init>
