<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</mm:import>
              <mm:stringlist referid="languages">
                <mm:locale language="${_}" jspvar="locale">
                  <mm:compare referid2="rich_language">
                    <option value="${_}" selected="selected"><jsp:expression>locale.getDisplayName(locale)</jsp:expression></option>
                  </mm:compare>
                  <mm:compare referid2="rich_language" inverse="true">
                    <option value="${_}"><jsp:expression>locale.getDisplayName(locale)</jsp:expression></option>
                  </mm:compare>
                </mm:locale>
              </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>
