<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      i18n:domain="plone">

  <head><title></title></head>

  <body>

    <!-- Epoz Widgets -->
    <metal:view_macro define-macro="view"
                      tal:replace="structure accessor" />

    <metal:define
        define-macro="edit_area">
      <tal:define
          define="base python:hasattr(value, 'isUnit');
                  binary python:base and value.isBinary() or context.isBinary(fieldName);
                  content python: not not base and value.getRaw() or value;
                  content python: not binary and content or '';
                  inputname fieldName;
                  inputvalue content;
                  rows widget/rows;
                  cols widget/cols;
                  ">
        <div metal:use-macro="context/wysiwyg_support/macros/wysiwygEditorBox"/>
      </tal:define>
      <metal:block define-slot="text_format">
        <input type="hidden"
               tal:attributes="name string:${fieldName}_text_format;"
               value="text/html"/>
      </metal:block>
    </metal:define>

    <metal:define define-macro="edit">
      <metal:use use-macro="field_macro | context/widgets/field/macros/edit">
        <metal:fill metal:fill-slot="widget_body">
          <metal:widget use-macro="context/widgets/epoz/macros/edit_area">
            The Widget
          </metal:widget>
        </metal:fill>
      </metal:use>
    </metal:define>

    <div metal:define-macro="search">
      <div metal:use-macro="context/widgets/string/macros/edit">
      </div>
    </div>

  </body>

</html>

