<kupu:feature name="mmbase" implementation="mmbase"
              xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
              xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
              xmlns:jsp="http://java.sun.com/JSP/Page"
              xmlns:kupu="http://kupu.oscom.org/namespaces/dist" >

  <kupu:part name="tools-div">
    <div id="mmbase-tools">
      <mm:import externid="tools" from="this,parameters" vartype="list">empty</mm:import>
      <mm:stringlist referid="tools">
        <mm:isnotempty>
          <mm:include page="tools/${_}.jspx" />
        </mm:isnotempty>
      </mm:stringlist>
    </div>
  </kupu:part>

  <kupu:part name="node-div">
    <div id="nodefields">
      <mm:include page="node.jspx" />
    </div>
  </kupu:part>

  <kupu:part name="preview-div">
    <div id="node-preview">
      <mm:include page="preview.jspx" />
    </div>
  </kupu:part>

  <kupu:part name="kupu-div">
    <div id="kupu">
      <kupu:insert-part feature="body" part="fulleditor" />
    </div>
  </kupu:part>
  <kupu:part name="header">
    <div id="header">
      <fmt:bundle basename="org.mmbase.kupu.Messages">
        <div id="back">
          <a href="${back}">
            <mm:link page="/mmbase/style/images/previous.png">
              <img src="${_}" alt="&amp;lt;" />
            </mm:link>
          </a>
        </div>
        <fmt:message key="Richtext editor" />
        <mm:node number="${node}" notfound="skip">
          <jsp:text> (<mm:nodeinfo type="guitype" />)</jsp:text>
        </mm:node>
        <div id="languageSelector">
          <form name="languageform" method="get" action=".">
            <input type="hidden" name="objectnumber" value="${node}" />
            <input type="hidden" name="tools" value="${tools}" />
            <input type="hidden" name="kupu_back" value="${back}" />
            <select onChange="document.forms['languageform'].submit();" name="language">
              <mm:compare referid="rich_language" value="client">
                <option value="client" selected="selected"><fmt:message key="default" /></option>
              </mm:compare>
              <mm:compare referid="rich_language" value="client" inverse="true">
                <option value="client"><fmt:message key="default" /></option>
              </mm:compare>
              <mm:import id="languages" vartype="list">en,zh,ja,de,fr,pt,nl,da,cs,fi,el,sr,eo,hi</mm:import>
              <mm:stringlist referid="languages">
                <mm:import id="gui"><mm:locale language="${_}" jspvar="locale"><jsp:expression>locale.getDisplayName(locale)</jsp:expression></mm:locale></mm:import>
                <mm:option value="${_}" compare="${rich_language}">${gui}</mm:option>
              </mm:stringlist>
            </select>
          </form>
        </div>
      </fmt:bundle>
    </div>
  </kupu:part>

  <kupu:part name="navigate">
    <div id="leftColumn">
      <div id="leftColumnContent">
        <kupu:insert-part feature="mmbase"     part="tools-div" />
        <kupu:insert-part feature="mmbase"     part="node-div" />
        <kupu:insert-part feature="mmbase"     part="preview-div" />
      </div>
    </div>
  </kupu:part>

  <kupu:part name="kupu-edit">
    <div id="centerColumn">
      <div id="centerColumnContent">
        <kupu:insert-part feature="mmbase"     part="kupu-div" />
      </div>
    </div>
  </kupu:part>

</kupu:feature>
