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

  <require>org.nuxeo.ecm.platform.routing.layouts</require>

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

    <widgetType name="current_route_description">
      <configuration>
        <sinceVersion>5.6</sinceVersion>
        <title>Description</title>
        <description>
          <p>This widget displays the name, description, author and
            creation
            date
            of the current route started on the current
            document.
          </p>
        </description>
        <categories>
          <category>routing</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/route/current_route_description_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="current_route_show_graph">
      <configuration>
        <sinceVersion>5.6</sinceVersion>
        <title>Description</title>
        <description>
          <p>
            This widget displays the graph of the current route in a
            Fancybox
            popup.
          </p>
          A field to map the id of the document representing
          the workflow
          instance is required.
        </description>
        <categories>
          <category>routing</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
          <fields>
            <list>false</list>
            <complex>false</complex>
            <supportedTypes>
              <type>string</type>
            </supportedTypes>
          </fields>
        </supportedModes>
        <!-- no configurable properties -->
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/route/current_route_show_graph_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="current_route_abandon">
      <configuration>
        <sinceVersion>5.6</sinceVersion>
        <title>Description</title>
        <description>
          <p>
            This widget displays an 'Abandon' action to cancel the
            current
            route
            started on the current document.
          </p>
        </description>
        <categories>
          <category>routing</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/route/current_route_abandon_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="current_route_user_tasks">
      <configuration>
        <sinceVersion>5.6</sinceVersion>
        <title>Description</title>
        <description>
          <p>
            This widget displays the user tasks of the current route on
            the
            current document. Duplicate of
            "summary_current_document_single_tasks" widget.
          </p>
        </description>
        <handlingLabels>true</handlingLabels>
        <categories>
          <category>routing</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <containingForm>true</containingForm>
        <!-- no configurable properties -->
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/summary/single_tasks_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="current_route_open_tasks">
      <configuration>
        <sinceVersion>5.6</sinceVersion>
        <title>Description</title>
        <description>
          <p>
            This widget displays all the open tasks of the current
            route
            on the
            current document.
          </p>
        </description>
        <handlingLabels>true</handlingLabels>
        <categories>
          <category>routing</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/route/current_route_open_tasks_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="task_workflow_title">
      <configuration>
        <title>
          Task workflow title
        </title>
        <description>
          <p>
            Displays the name of the worklow for a task, inside a h1 tag.
          </p>
          Two fields are required:
          <ul>
            <li>A field to map the task</li>
            <li>A field to map the task name</li>
          </ul>
        </description>
        <sinceVersion>5.8</sinceVersion>
        <categories>
          <category>routing</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <fields>
          <list>false</list>
          <complex>false</complex>
          <supportedTypes>
            <type>string</type>
          </supportedTypes>
        </fields>
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/task/task_workflow_title_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="task_workflow_name">
      <configuration>
        <title>
          Task workflow name
        </title>
        <description>
          <p>
            Displays the name of the worklow for a task.
          </p>
          Two fields are required:
          <ul>
            <li>A field to map the task</li>
            <li>A field to map the task name</li>
          </ul>
        </description>
        <sinceVersion>5.8</sinceVersion>
        <categories>
          <category>routing</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <fields>
          <list>false</list>
          <complex>false</complex>
          <supportedTypes>
            <type>string</type>
          </supportedTypes>
        </fields>
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/task/task_workflow_name_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="task_layout_with_actions">
      <configuration>
        <title>Listing the layout configured on Studio for the task or
          default
          actions for non routing tasks
        </title>
        <documentation>
          Two fields are required:
          <ul>
            <li>A field to map the task</li>
            <li>A field to map the task id</li>
          </ul>
        </documentation>
        <sinceVersion>5.8</sinceVersion>
        <categories>
          <category>routing</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <fields>
          <list>false</list>
          <complex>false</complex>
          <supportedTypes>
            <type>string</type>
          </supportedTypes>
        </fields>
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/task/task_layout_with_actions_widget.xhtml
      </property>
    </widgetType>

  </extension>

</component>
