<!--
    Produces: 'items' for attachments
    Needs: a request context 'drawer', containing a listcontainer 'query'.
-->
<mm:context
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
    id="drawer" scope="request">
  <jsp:output omit-xml-declaration="yes" />
  <mm:content type="text/xml">
    <mm:listnodescontainer referid="query">
      <items>
        <mm:context>
          <mm:include page="uploadfields.jspx">
            <mm:param name="media">attachment</mm:param>
            <mm:param name="nodetype">attachments</mm:param>
          </mm:include>
          <mm:listnodes id="attachment">
            <resource id="${attachment.number}">
              <uri>mmbase://attachments/${attachment.number}</uri>
              <title>[<mm:field name="mimetype" />: <mm:field name="title" />]</title>
              <size><mm:field name="size" />b</size>
              <icon>
                <mm:function name="iconurl"/>
              </icon>
            </resource>
          </mm:listnodes>
        </mm:context>
      </items>
    </mm:listnodescontainer>
  </mm:content>
</mm:context>
