<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      metal:use-macro="context/main_template/macros/master"
      i18n:domain="plone">
<head>
    <metal:block fill-slot="top_slot"
                 tal:define="dummy python:request.set('disable_border',1);
                             disable_column_one python:request.set('disable_plone.leftcolumn',1);
                             disable_column_two python:request.set('disable_plone.rightcolumn',1);" />
</head>

<body>
  <metal:body fill-slot="body">
    <article id="content">

    <h1 class="documentFirstHeading">Cache Invalidation</h1>

    <div metal:use-macro="context/global_statusmessage/macros/portal_message">
      Portal status message
    </div>

    <tal:purged tal:condition="view/purged">
      <h3>Purged urls</h3>
      <p tal:condition="not: view/success" class="discreet">
        There was an error submitted the purge request
      </p>
      <ul class='purge-paths'>
        <tal:path tal:repeat="url python: sorted(view.purged)">
          <li tal:content="url" />
        </tal:path>
      </ul>
      <p class="discreet" tal:condition="python: view.cf_enabled and view.proxy_enabled">
        Purged cloudflare and caching proxies
      </p>
      <p class="discreet" tal:condition="python: view.cf_enabled and not view.proxy_enabled">
        Purged cloudflare
      </p>
      <p class="discreet" tal:condition="python: not view.cf_enabled and view.proxy_enabled">
        Purged caching proxies
      </p>

    </tal:purged>

    <form method="POST"
          action="${context/absolute_url}/@@castle-purge">
      <span tal:replace="structure context/@@authenticator/authenticator"/>
      <div class="formControls">
        <input type="submit" class="submit-widget button-field"
               name="purge-button" value="Purge again" />
      </div>
    </form>
  </metal:body>
</body>
</html>
