<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.forms.layouts.webapp.override">

  <require>org.nuxeo.ecm.platform.forms.layouts.webapp</require>

  <extension point="widgettypes" target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager">

    <widgetType name="info_box">
      <configuration>
        <sinceVersion>6.0</sinceVersion>
        <title>Info box</title>
        <description>
          <p>
            This widget displays common information about the document, like
            creation date, creator, version, state, contributors, ...
          </p>
        </description>
        <categories>
          <category>summary</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <!-- no configurable properties -->
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/info_box_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="extendedFile">
      <configuration>
        <sinceVersion>7.3</sinceVersion>
        <title>Extended File</title>
        <description>
          <p>
            The file widget displays a file uploader/editor in create or edit
            mode, with additional message tag for errors, and a link to the file
            in other modes.
          </p>
          <p>
            Widgets using this type can provide properties accepted on a
            &lt;nxu:inputFile /&gt; tag in create or edit mode, and properties
            accepted on a &lt;nxu:outputFile /&gt; tag in other modes.
          </p>
        </description>
        <categories>
          <category>configuration_not_ready</category>
        </categories>
        <supportedModes>
          <mode>edit</mode>
          <mode>view</mode>
        </supportedModes>
        <fields>
          <list>false</list>
          <complex>false</complex>
          <supportedTypes>
            <type>blob</type>
          </supportedTypes>
        </fields>
        <properties>
          <layouts mode="view">
            <layout name="file_widget_type_properties_view">
              <rows>
                <row>
                  <widget category="widgetTypeConf">file_downloadLabel</widget>
                </row>
                <row>
                  <widget category="widgetTypeConf">file_iconRendered</widget>
                </row>
              </rows>
            </layout>
          </layouts>
          <layouts mode="edit">
            <layout name="file_widget_type_properties_edit">
              <rows>
                <row>
                  <widget category="widgetTypeConf">required</widget>
                </row>
                <row>
                  <widget category="widgetTypeConf">file_downloadLabel</widget>
                </row>
                <row>
                  <widget category="widgetTypeConf">file_iconRendered</widget>
                </row>
              </rows>
            </layout>
          </layouts>
        </properties>
      </configuration>
      <property name="template">/widgets/extended_file_widget.xhtml</property>
    </widgetType>

  </extension>

</component>
