<!--#set global $pane="Categories"#-->
<!--#set global $help_uri="configure-categories-0-7"#-->
<!--#include $webdir + "/_inc_header.tmpl"#-->

<div style="padding:10px; overflow:auto;">

  <div style="font-size:100%">
    $T('explain-configCat')
    $T('explain-catTags') $T('explain-catTags2')<br/>
    $T('explain-relFolder'): <i>$defdir</i>
  </div>
  <br/>

  <!--#set $odd = False#-->
  <!--#set $cur = 0#-->
  <!--#for $slot in $slotinfo#-->
  <!--#set $odd = not $odd#-->
  <!--#set $cur = $cur+1#-->

  <form action="save" method="get">

  <table class="catTable">

  <!--#if $cur == 1#-->
    <tr>
      <th align="center">$T('category')</th>
      <th align="center">$T('priority')</th>
      <th align="center">$T('mode')</th>
      <!--#if $script_list#--><th align="center">$T('script')</th><!--#end if#-->
      <th align="center">$T('catFolderPath')</th>
      <th align="center">$T('catTags')</th>
      <th>&nbsp;</th>
    </tr>
  <!--#end if#-->

  <tr class="<!--#if $odd then "odd" else "even"#-->" <!--#if $slot.name == '*'#-->style="background-color:lightyellow;"<!--#end if#-->>


  <td>
    <input type="hidden" name="session" value="$session">
    <input type="hidden" value="$slot.name" name="name"/>
    <!--#if $slot.name != '*'#-->
      <input type="text" name="newname" size="15" value="$slot.name"/>
    <!--#else#-->
      <input type="text" name="newname" size="15" value="$T('default')" disabled="disabled"/>
    <!--#end if#-->
  </td>

  <td>
    <select name="priority">
      <!--#if $slot.name != '*'#-->
        <option value="-100" <!--#if $slot.priority == -100 then 'selected' else ''#-->>$T('default')</option>
      <!--#end if#-->
      <option value="2" <!--#if $slot.priority == 2 then 'selected' else ''#-->>$T('pr-force')</option>
      <option value="1" <!--#if $slot.priority == 1 then 'selected' else ''#-->>$T('pr-high')</option>
      <option value="0" <!--#if $slot.priority == 0 then 'selected' else ''#-->>$T('pr-normal')</option>
      <option value="-1" <!--#if $slot.priority == -1 then 'selected' else ''#-->>$T('pr-low')</option>
      <option value="-2" <!--#if $slot.priority == -2 then 'selected' else ''#-->>$T('pr-paused')</option>
    </select>
  </td>

  <td>
    <select name="pp">
      <!--#if $slot.name != '*'#-->
        <option value=""  <!--#if $slot.pp == ""  then "selected" else ""#-->>$T('default')</option>
      <!--#end if#-->
      <option value="0" <!--#if $slot.pp == "0" then "selected" else ""#-->>$T('pp-none')</option>
      <option value="1" <!--#if $slot.pp == "1" then "selected" else ""#-->>$T('pp-repair')</option>
      <option value="2" <!--#if $slot.pp == "2" then "selected" else ""#-->>$T('pp-unpack')</option>
      <option value="3" <!--#if $slot.pp == "3" then "selected" else ""#-->>$T('pp-delete')</option>
    </select>
  </td>

  <!--#if $script_list#-->
  <td>
    <select name="script">
    <!--#for $sc in $script_list#-->
      <!--#if not ($sc == 'Default' and $slot.name == '*')#-->
        <option value="$sc" <!--#if $slot.script.lower() == $sc.lower() then "selected" else ""#-->>$Tspec($sc)</option>
      <!--#end if#-->
    <!--#end for#-->
    </select>
  </td>
  <!--#end if#-->

  <td><input type="text" size="30" name="dir" value="$slot.dir"/></td>

  <td><input type="text" size="30" name="newzbin" value="$slot.newzbin"/></td>

  <td class="lastCol" nowrap>

  <input type="submit" class="Save juiButton" style="padding:4px" value="<!--#if $cur == 2 then $T('button-add') else $T('button-save')#-->"/>

  <!--#if $slot.name and $slot.name != '*'#-->
  <input type="button" class="Delete juiButton" style="padding:4px" value="$T('button-delCat')" name="$slot.name" />
  <!--#end if#-->

  </td>

  </tr>
  </table>
  </form>
<!--#end for#-->

</div>

<!--#include $webdir + "/_inc_footer.tmpl"#-->
