<%@ taglib uri="struts-template" prefix="template" %>
<%@ taglib uri="struts-html"     prefix="html"     %>
<%@ taglib uri="struts-bean"     prefix="bean"     %>
<%@ taglib uri="struts-logic"    prefix="logic"    %>
<%@ taglib uri="vkc-taglib"      prefix="vkc"      %>

<%-- JSP-Seite gibt die Daten zu einem virtuellen Dokument an einer Kategorie aus --%>
<bean:define id="form"   name="form" scope="request"/>
<bean:define id="doc"   name="virtualDocument" scope="request" type="vkc.db.entities.VKCDocument"/>
<bean:define id="documentId" name="doc" property="documentId" type="java.lang.Integer"/>
<bean:define id="ctxPath" name="ctxPath" type="java.lang.String"/>
<bean:define id="template" name="template" type="java.lang.String"/>
<bean:define id="currentUser" name="form" property="user" type="vkc.db.entities.VKCUser" toScope="request"/>

<table cellspacing="0" cellpadding="0" width="100%" border="0">
  <tr><td><a name='doc<vkc:write name="doc" property="documentId"/>'></a><vkc:img page="/templates/${template.name}/gfx/trans.gif" height="10" width="10" alt=""/></td></tr>
  <tr>
    <td>
      <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr class="color_doctitle">
          <td><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="5"/></td>
          <logic:equal name="form" property='<%= "showDocDetails[" + documentId + "]" %>' value="false">
            <td><vkc:link href='<%= "javascript:showDocumentDetails(" + documentId + ");" %>'><vkc:img page="/templates/${template.name}/gfx/plus.gif" border="0" titleKey="vkc.tooltip.show.document.details"/></vkc:link></td>
          </logic:equal>
          <logic:equal name="form" property='<%= "showDocDetails[" + documentId + "]" %>' value="true">
            <td><vkc:link href='<%= "javascript:hideDocumentDetails(" + documentId + ");" %>'><vkc:img page="/templates/${template.name}/gfx/minus.gif" border="0" titleKey="vkc.tooltip.hide.document.details"/></vkc:link></td>
          </logic:equal>
          <td><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="5"/></td>
          <td><vkc:img page='<%="/templates/${template.name}" + doc.getVirtualDocumentIcon()%>' alt='' border='0'/></td>
          <td><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="5"/></td>
          <td align="left" width="100%"><b><vkc:write name="doc" property="header"/></b></td>
          <%-- go to documents real page --%>
          <td><vkc:img page="/templates/${template.name}/gfx/crumb-spacer.gif" alt="|"/></td>
          <td><a href="<%=ctxPath%><vkc:write name="doc" property="documentLink" />"><vkc:img border="0" page="/templates/${template.name}/gfx/document-jump.gif" titleKey="vkc.string.jump_to_real_doc"/></a></td>
          <%-- top of page --%>
          <td><vkc:img page="/templates/${template.name}/gfx/crumb-spacer.gif" alt="|"/></td>
          <td><a href="#top" onclick="this.blur();" onfocus="this.blur();"><vkc:img page="/templates/${template.name}/gfx/button-top.gif" border="0" alt="" titleKey="vkc.tooltip.gototop"/></a></td>
          <td><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="5"/></td>
        </tr>
      </table>
    </td>
  </tr>
  <bean:define id="document" name="doc" type="vkc.db.entities.VKCDocument" toScope="request" />
  <jsp:include page='<%="/templates/" + template + "/common/DocumentView.jsp"%>'/>
</table>