{if $action===""}
  <h3>Generovanie testov</h3>
  <div class="indent">
    {if $informationText!=""}
      <div>{$informationText}</div>
      <br />
    {/if}
    <table>
      <tr>
        <td>&nbsp;</td>
        <td style="padding-left: 20px;"><div class="bold">testy pri PC</div></td>
        <td style="padding-left: 20px;"><div class="bold">papierové testy</div></td>
      </tr>
      <tr>
        <td><div class="bold">počet vygenerovaných testov</div></td>
        <td style="padding-left: 20px;">
          <form action="index.php?site=testGenerating&amp;action=deleteTests&amp;courseID={$courseID}" method="post">
            {$countPCTests}
            <input name="submit" type="submit" value="vymaž" />
          </form>
        </td>
        <td style="padding-left: 20px;">
          <form action="index.php?site=testGenerating&amp;action=deletePaperTests&amp;courseID={$courseID}" method="post">
            {$countPrintedTests}
            <input name="submit" type="submit" value="vymaž" />
          </form>
        </td>
      </tr>
      <tr>
        <td><div class="bold">nové generovanie</div></td>
        <td style="padding-left: 20px;">
          <form action="index.php?site=testGenerating&amp;action=generateTests&amp;courseID={$courseID}" method="post">
            <input name="number" type="text" value="0" size="3" />
            <input name="submit" type="submit" value="generuj" />
          </form>
        </td>
        <td style="padding-left: 20px;">
          <form action="index.php?site=testGenerating&amp;action=generatePaperTests&amp;courseID={$courseID}" method="post">
            <input name="number" type="text" value="0" size="3" />
            <input name="submit" type="submit" value="generuj" />
          </form>
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="padding-left: 20px;">
          <form action="index.php?site=testGenerating&amp;action=generateDemoTest&amp;courseID={$courseID}" method="post">
            <input name="submit" type="submit" value="generuj demo test" />
          </form>
        </td>
        <td style="padding-left: 20px;">
          &nbsp;
        </td>
      </tr>
    </table>
    <br />
    <a href="index.php?site=testGenerating&amp;action=setup&amp;courseID={$courseID}">nastavenie generovania</a>
  </div>
{elseif $action==="setup"}
  <h3>Nastavenie generovania</h3>
  <div class="indent">
    {if $saved}
      <div>
        Zmeny boli uložené.
      </div>
      <br />
    {/if}
    <form action="index.php?site=testGenerating&amp;action=saveSetup&amp;courseID={$courseID}" method="post">
      Počet testových otázok: 
      <input name="questionCount" type="text" value="{$questionCount}" size="5" />
      <br />
      <br />
      <table>
        <tr>
          <td>
            <div class="bold">
              Okruh tém
            </div>
          </td>
          <td style="padding-left: 20px;">
            <div class="bold">
              Počet otázok
            </div>
          </td>
        </tr>
        {foreach from=$domains item=menuItem}
          <tr>
            <td style="padding-left: {$menuItem.left}px;">
              <div>
                <img alt="" src="images/domain.jpg" />&nbsp;<a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$menuItem.id}">{$menuItem.subject}</a>
              </div>
            </td>
            <td style="padding-left: 20px;">
              min:<input name="min{$menuItem.id}" type="text" value="{$menuItem.min}" size="5" />
              max:<input name="max{$menuItem.id}" type="text" value="{$menuItem.max}" size="5" />
            </td>
          </tr>
        {/foreach}
      </table>
      <input name="submit" type="submit" value="Ulož" />
    </form>
    <br />
    <a href="index.php?site=testGenerating&amp;courseID={$courseID}">Naspäť</a>
  </div>
{/if}
