<define tag="item">
  <tr valign="top">
    <td align="right"><b>&_.title;:</b></td>
    <if match="&_.type; is pre">
      <td><pre><insert variable="pkg.&_.name;" /></pre></td>
    </if>
    <else>
      <td><insert variable="pkg.&_.name;" /></td>
    </else>
  </tr>
</define>

<update-package package="&form.details;">
  <table bgcolor="&usr.obox-titlebg;" width="100%">
    <tr><td><font size="+1" color="&usr.obox-titlefg;"><b>&_.title;</b></font></td></tr>
  </table>
</update-package>
<update-package package="&form.details;" scope="pkg">
<table>
  <item title="Description" name="description" type="pre" />
  <item title="Size" name="size" />
  <item title="Organization" name="organization" />
  <item title="Author" name="author-name" />
  <item title="License" name="license" />
  <item title="Date" name="date" />
</table>
</update-package>

<update-package-is-downloaded package="&form.details;"
   variable="downloaded" installed_variable="installed" />
<if variable="form.installed">
  <input type="hidden" name="uninstall_package" value="&form.details;" />
  <input type="submit" name="do_uninstall" value="Uninstall this package" />
</if>
<else>
<if not variable="form.downloaded">
  <input type="hidden" name="details" value="&form.details;" />
  <input type="submit" name="download" value="Download this package" />
</if>
<else>
  <input type="hidden" name="install" value="&form.details;" />
  <input type="submit" name="do_install" value="Install this package" />
</else>
</else>
