<%inherit file="//layout/base.html" />
<!-- 
     # template arguments:
     #   notices : list of string notices
     #   args : list of (arg,perc) pairs
     #   nexts : list of (next,perc) pairs
     #   command : dict of strings ('name', 'shortdesc', 'details', 'syntax', 'related', 'aliases') 
                   and 'examples' pair of (example, comment)
-->

<%def name="css()">
	<style type="text/css">
		* { padding: 0; margin: 0; }
		body { font-family: helvetica, arial, sans-serif; padding: 0; margin: 0; }
		p, td, label, ul, ol { font-size: 11px; }
		.sahead { font-family: helvetica, arial, sans-serif; font-size:13px; color:orange;   }
		.sahelp { font-family: helvetica, arial, sans-serif; font-size:11px; color: #AAAACC; }
		.satype { font-family: helvetica, arial, sans-serif; font-size:13px; color: #AAAABB; }
		.satext { font-family: helvetica, arial, sans-serif; font-size:11px; color: #AAAA88; }
	</style>
</%def>

<table width="100%" border=2><tr><td>

<table width="100%"  bgcolor="#445566">
<tr valign=top>


% if len(typeahead) > 0:
  <td>
  <span  class="sahead"><%doc>TRANS: Heading for list of keywords</%doc>${_('keywords')}</span><br/>
  <span  class="satext">
  <ul>
  % for token,count in typeahead:
    <li><nobr>${token|h} (${count|h})</nobr></li>
  % endfor
  </ul>
  </span>
  </td>
  <td>
% endif

% if len(notices) > 0:
  <td>
  <span  class="sahead"><%doc>TRANS: Heading for list of notices</%doc>${_('notices')}</span><br/>
  <span  class="satext">
  <ul>
  % for note in notices:
    <li>${note|h}</li>
  % endfor
  </ul>
  </span>
  </td>
  <td>
% endif

<% import splunk.searchhelp.describer as describer %>

% if len(args) > 0 or len(nexts) > 0:
  <td>
  <span  class="sahead">next</span><br/>
  % if len(args) > 0:
    <span  class="satype"><%doc>TRANS: Heading for list of arguments</%doc>${_('arguments')}</span><br/>
    <span  class="satext">
    <ul>
    % for arg,perc in args[:5]:
      <% cleanedarg = describer.stylizeVariables(arg) %>
      <li>${cleanedarg}</li>
    % endfor
    </ul>
    </span><br/>
  % endif
  % if len(nexts) > 0:
    <span  class="satype"<%doc>TRANS: Heading for list of commands</%doc>${_('commands')}</span><br/>
    <span  class="satext">
    % for next,perc in nexts[:5]:
      ${next|h}
    % endfor
    </span><br/>
  % endif
  </td>
% endif

% if len(command) > 0:
  <td>
  <span  class="sahead">${command['name']}</span>
  <span  class="satext">${_(command['shortdesc'])}</span><br/>
  <span  class="satype"><%doc>TRANS: Command details</%doc>${_('details')}</span><br/>
  <span  class="satext">${_(command['details'])}</span><br/>
  <span  class="satype"><%doc>TRANS: Command syntax heading</%doc>${_('syntax')}</span><br/>
  <span  class="satext">${command['syntax']}</span><br/>
  % if len(command['examples']) > 0:
    <span  class="satype"><%doc>TRANS: Command usage examples heading</%doc>${_('examples')}</span><br/>
    % for example,comment in command['examples'][:5]:
      <span  class="satext">${_(comment)}<br/>&nbsp;&nbsp;&nbsp;&nbsp;<code>${example|h}</code></span><br/>
    % endfor
  % endif

  % if len(command['related']) > 0:
    <span  class="satype"><%doc>TRANS: Related commands heading</%doc>${_('related')}</span><br/>
    <span  class="satext">${command['related']|h}</span><br/>
  % endif

  % if len(command['aliases']) > 0:
    <span  class="satype"><%doc>TRANS: Commands alias names heading</%doc>${_('aliases')}</span><br/>
    <span  class="satext">${command['aliases']|h}</span><br/>
  % endif

  </td>
% endif

<td align=right width="70px">
<a href="help" class="sahelp">${_('Help')}</a>
<a href="help" class="sahelp">${_('Settings')}</a>
</td>
</tr>
</table>

</td></tr></table>
