<html>
<body>
<span tal:replace="structure here/manage_tabs" />

<div >
    <h2> installable products </h2>
    <form action="installProducts" tal:attributes="action python:here.absolute_url()+'/installProducts'" method="POST">
    
        <table>
            <tr tal:repeat="product here/listInstallableProducts">
                <td><input type=checkbox name=products:list tal:attributes="value product/id"></td>
                <td tal:content="product/id">product name</td>
                <td><a tal:condition="product/hasError" tal:attributes="href product/id">
                        <img  src="/misc_/PageTemplates/exclamation.gif"></a>
                </td>
                <td tal:content="python:here.getProductVersion(product['id'])"> </td>
            </tr>
        </table>
        <input type=submit i18n:attributes="value" value="Install">
    </form>

    <h2> installed products </h2>
    <form action="uninstallProducts" tal:attributes="action here/absolute_url" method="POST">
    
        <table>
            <tr>
                <td></td>
                <th>Product</th>
                <th>Version at Install time</th>
                <th>Product version</th>
            </tr>
            <tal:block tal:repeat="product here/listInstalledProducts" >
                <tr tal:define="prodver python:here.getProductVersion(product['id'])">
                    <td><input tal:condition="not:product/isLocked" type=checkbox name=products:list tal:attributes="value product/id"></td>
                    <td>
                         <a tal:attributes="href product/id" tal:content="product/id" >product name</a>
                    </td>
                    <td tal:content="product/installedVersion" >product version
                    </td>
                    <td tal:condition="python:here.isProductAvailable(product['id'])"> <font tal:attributes="color python:test(prodver != product['installedVersion'],'#ff0000','#000000')" tal:content="prodver" >product version</font></td>
                    <td tal:condition="python:not here.isProductAvailable(product['id'])"> <font color="#ff0000"  >removed from Products folder</font></td>
                </tr>
            </tal:block>
        </table>
        <input type=submit i18n:attributes="value" value="Uninstall" name="uninstallProducts:method">
        <input type=submit i18n:attributes="value" value="Reinstall" name="reinstallProducts:method">
    </form>

</div>
</body>
</html>
