<trans-reg project="update_client"/>
<define tag="cat-list" scope="cat">
  <br />
  <table bgcolor="&usr.obox-titlebg;" width="100%">
    <tr><td><font size="+1" color="&usr.obox-titlefg;"><b>&_.title;</b></font></td></tr>
  </table>
  <rul>
  <update-package type="&_.name;" limit="5">
    <eval><rli>&_.title; <a href="update.html?page=details&details=&_.id;">
      <translate id="3">[Details...]</translate></a></rli></eval>
    <set variable="var._&cat.name;" value='foo'/>
  </update-package>
  </rul>
  <if not="1" variable="var._&_.name;">
     &nbsp; <translate id="4">Currently no packages in this category.</translate><br />
  </if>
  <else>
    <a href="update.html?page=category&category=&_.name;">
      <translate id="5">[More..]</translate></a><br />
  </else>
  &nbsp;
</define>


<if variable="form.install">
  <redirect to="update.html?page=install&install=&form.install;" />
</if>


<if variable="form.download">
  <update-start-download package="&form.details;" />
  <redirect to="update.html?bar" />
</if>

<if variable="form.uninstall_package">
  <update-uninstall-package package="&form.uninstall_package;">
</if>


<h1><translate id="6">Roxen Update System</translate></h1>

<if variable="form.update_list">
  <update-update-list/>
  <update-scan-local-packages/>
  <translate id="7">Launched a package list update request.</translate><br />
</if>

<eval><translate id="8">This information was last synchronized with the main server
 &var.last_updated; ago.</translate></eval>

<translate id="9" variable="var.title">Products</translate>
<cat-list name="idonex" title="&var.title;" />
<translate id="10" variable="var.title">Security fixes</translate>
<cat-list name="security" title="&var.title;" />
<translate id="11" variable="var.title">Bug fixes</translate>
<cat-list name="bugfixes" title="&var.title;" />
<translate id="12" variable="var.title">Third party modules</translate>
<cat-list name="3rdpart" title="&var.title;" /> 


<?comment --- Information boxes ------------------------- ?>

<define variable="var.dip" preparse="">
  <update-download-progress>
  <tr>
    <td nowrap="nowrap">&_.title;
      <a href="update.html?details=&_.id;">[Details...]</a></td>
    <td nowrap="nowrap">&_.size;</td>
    <td nowrap="nowrap">&_.progress;%</td>
  </tr>
  </update-download-progress>
</define>

<define variable="var.dp" preparse="">
  <update-downloaded-packages>
  <tr>
    <td nowrap="nowrap">&_.title;
      <a href="update.html?page=details&details=&_.id;">[Details...]</a></td>
    <td nowrap="nowrap">&_.size;</td>
    <td nowrap="nowrap">
      <a href="update.html?install=&_.id;">[Install...]</a>
    </td>
  </tr>
  </update-downloaded-packages>
</define>

<set variable="var.both" from="var.dip" />
<append variable="var.both" from="var.dp" />

<if sizeof="var.both > 8">
<hr size="1" width="95%" />
<table>
<tr valign="top">

<if sizeof="var.dip > 4">
<td>
  <translate id="13" variable="var.title">Downloads&nbsp;in&nbsp;progress</translate>
  <cv-obox title="&var.title;">
    <table cellpadding="4">
      <tr>
	<td nowrap="nowrap"><b><translate id="14">Description</translate></b></td>
	<td nowrap="nowrap"><b><translate id="15">Size</translate></b></td>
	<td nowrap="nowrap"><b><translate id="16">Downloaded</translate></b></td>
     </tr>
     &var.dip:none;
    </table>
  </cv-obox>
</td>
</if>
<if sizeof="var.dp > 4">
<td>
  <translate id="17" variable="var.title">Downloaded&nbsp;packages</translate>
  <cv-obox title="&var.title;">
    <table cellpadding="4">
      <tr>
	<td nowrap="nowrap"><b><translate id="14">Description</translate></b></td>
	<td nowrap="nowrap"><b><translate id="15">Size</translate></b></td>
	<td nowrap="nowrap"></td>
      </tr>
      &var.dp:none;
    </table>
  </cv-obox>
</td>
</if>
</tr></table>  
</if>
