<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %> <%@ page import="com.ecyrd.jspwiki.*" %> <%@ page import="com.ecyrd.jspwiki.auth.*" %> <%@ page import="com.ecyrd.jspwiki.auth.permissions.*" %> <%@ page import="com.ecyrd.jspwiki.attachment.*" %> <%@ page import="java.security.Permission" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <% WikiContext c = WikiContext.findContext(pageContext); WikiPage wikiPage = c.getPage(); int attCount = c.getEngine().getAttachmentManager().listAttachments( c.getPage() ).size(); String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab"); if( attCount != 0 ) attTitle += " (" + attCount + ")"; String creationAuthor =""; //FIXME -- seems not to work correctly for attachments !! WikiPage firstPage = c.getEngine().getPage( wikiPage.getName(), 1 ); if( firstPage != null ) { creationAuthor = firstPage.getAuthor(); } int itemcount = 0; //number of page versions try { itemcount = wikiPage.getVersion(); /* highest version */ } catch( Exception e ) { /* dont care */ } int pagesize = 20; int startitem = itemcount; String parm_start = (String)request.getParameter( "start" ); if( parm_start != null ) startitem = Integer.parseInt( parm_start ) ; /*round to start of a pagination block */ if( startitem > -1 ) startitem = ( (startitem/pagesize) * pagesize ); %> <%-- part 1 : normal wiki pages --%> <%-- --%> <%-- actual infopage content --%>

1 [RSS]

<%= creationAuthor %>

  

') && Wiki.submitOnce(this) );">

<%-- DIFF section --%> <%-- DIFF section --%> <%-- if( itemcount > 1 ) { --%>
<% if( ( startitem == -1 ) || ( ( currentPage.getVersion() >= startitem ) && ( currentPage.getVersion() < startitem + pagesize ) ) ) { %> <% } %>
<%-- Kb--%> | <% String changeNote = (String)currentPage.getAttribute( WikiPage.CHANGENOTE ); changeNote = (changeNote != null) ? TextUtil.replaceEntities( changeNote ) : "" ; %> <%= changeNote %>
${pagination} <%-- } /* itemcount > 1 */ --%>
<%-- part 2 : attachments --%> <% int MAXATTACHNAMELENGTH = 30; String progressId = c.getEngine().getProgressManager().getNewProgressIdentifier(); %>

<%-- Do NOT change the order of wikiname and content, otherwise the servlet won't find its parts. --%>

') && Wiki.submitOnce(this) );" >
<%-- FIXME why not add pagination here - no need for large amounts of attach versions on one page --%>

<%----%> <%-- --%> <%-- --%> <% String name = att.getName(); //att.getFileName(); int dot = name.lastIndexOf("."); String attachtype = ( dot != -1 ) ? name.substring(dot+1) : ""; String sname = name; if( sname.length() > MAXATTACHNAMELENGTH ) sname = sname.substring(0,MAXATTACHNAMELENGTH) + "..."; %> <%----%> <%--FIXME classs parameter throws java exception --%> <%-- // FIXME: This needs to be added, once we figure out what is going on. --%> <%-- --%>
<%= attachtype %>
<%= sname %>   <% String changeNote = (String)att.getAttribute(WikiPage.CHANGENOTE); if( changeNote != null ) { changeNote = TextUtil.replaceEntities(changeNote); %><%=changeNote%><% } %>
<%-- end of .tabs --%>