<!--
Copyright (c) 2002-2008 Infrae. All rights reserved.
See also LICENSE.txt
Version of this file: $Revision: 1.16 $
-->
<h1 tal:replace="structure here/manage_page_header">Header</h1>

<h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
    tal:replace="structure here/manage_tabs">Tabs</h2>

<h4><a href="../manage_services">Silva Services</a></h4>

<div style="margin-left:1em">
<h2 i18n:translate="">
  Configure Silva Extension Products
</h2>

<h3 i18n:translate="">General actions</h3>
<form action="." method="post">
  <input type="submit" name="refresh_all:method" value="refresh all" i18n:attributes="value"/>
  <tal:block condition="python: hasattr(modules['Products'], 'SilvaDocument') and 'SilvaDocument' in here.get_names() and here.is_installed('SilvaDocument') and not hasattr(here, 'silva_docs')">
    <input type="submit" name="manage_installDocumentation:method" value="install documentation" i18n:attributes="value"/>
  </tal:block>
  <input type="submit" name="refresh_catalog:method" value="rebuild catalog" i18n:attributes="value"/>
  <tal:condition tal:condition="here/get_quota_subsystem_status">
    <input type="submit" name="disable_quota_subsystem:method" value="disable quota subsystem" i18n:attributes="value"/>
  </tal:condition>
  <tal:condition tal:condition="not:here/get_quota_subsystem_status">
    <input type="submit" name="enable_quota_subsystem:method" value="enable quota subsystem" i18n:attributes="value"/>
  </tal:condition>
  <input type="submit" name="upgrade_all:method" value="upgrade content" onclick="if (!confirm('This will upgrade all Silva content, and may take a long time on a large site.\nThis is, however, necessary to make old Silva content work with new versions.\nAre you sure you want to continue?')) return false;" />
  <span class="std-text">(Software - <span tal:replace="python:here.get_root().get_silva_software_version()">version</span> /
   Content - <span tal:replace="python:here.get_root().get_silva_content_version()">version</span>)</span>
</form>
</div>
<div tal:repeat="module_name here/get_names"
  tal:attributes="
    style python:'width:70%%;; border:solid 1px;; padding:1ex;; margin:1ex;; background:%s;;' % test(here.is_installed(module_name), 'White', 'LightGrey')" >
  <!--<span tal:content="module_name" />-->
 <div style="float:right; width:40%;">
  <h4 class="form-title"
    style="margin: 0">Dependencies</h4>
  <ul tal:define="dep python:here.get_depends_on(module_name)"
      style="padding-left: 0;list-style-position:inside;margin-top:0;">
   <li class="list-item"
     tal:repeat="d dep">
    <span tal:content="python:here.get_description(d)"
          tal:on-error="string:$d (not available)" />
   </li>
   <li class="list-item"
     tal:condition="not:dep">None</li>
  </ul>
 </div>

   <h3 style="margin: 0 0 0.5ex;" tal:content="python:here.get_description(module_name)" />
   <p style="margin: 0 0 1ex;" tal:content="python:here.get_version_info(module_name)"/>

 <form action="." method="post" style="margin-bottom: 0;" tal:attributes="name module_name">
  <input type="hidden" name="name" tal:attributes="value module_name" />
  <tal:cond tal:condition="python:module_name != 'Silva'">
   <input type="submit"
     tal:define="blerk python:test(here.is_installed(module_name), 'uninstall', 'install')"
     tal:attributes="name string:${blerk}:method; value python:blerk == 'install' and 'activate' or 'deactivate';"
     i18n:attributes="value" />
   <input type="submit" name="refresh:method" value="refresh" tal:condition="python:here.is_installed(module_name)"
     i18n:attributes="value" />
  </tal:cond>
  <tal:cond tal:condition="python:module_name == 'Silva'">
   <input type="submit" name="refresh:method" value="refresh"
     i18n:attributes="value"/>
   <input type="submit" name="install_layout:method" value="install default layout"
     i18n:attributes="value"/>
  </tal:cond>
 </form>
</div>

<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
