You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by br...@apache.org on 2014/02/14 18:24:35 UTC
svn commit: r1568367 [11/13] - in /jspwiki/trunk: ./ jspwiki-war/
jspwiki-war/src/main/config/wro/ jspwiki-war/src/main/java/org/apache/wiki/
jspwiki-war/src/main/scripts/dynamic-styles/
jspwiki-war/src/main/scripts/lib/ jspwiki-war/src/main/scripts/mo...
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ConflictContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ConflictContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ConflictContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ConflictContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,41 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<div class="page-content">
+
+<h4><%=LocaleSupport.getLocalizedMessage(pageContext, "conflict.oops.title")%></h4>
+ <div class="error">
+ <fmt:message key="conflict.oops" />
+ </div>
+ <fmt:message key="conflict.goedit" >
+ <fmt:param><wiki:EditLink><wiki:PageName /></wiki:EditLink></fmt:param>
+ </fmt:message>
+
+<h4><%=LocaleSupport.getLocalizedMessage(pageContext, "conflict.modified")%></h4>
+ <tt><%=pageContext.getAttribute("conflicttext",PageContext.REQUEST_SCOPE)%></tt>
+
+<h4><%=LocaleSupport.getLocalizedMessage(pageContext, "conflict.yourtext")%></h4>
+ <tt><%=pageContext.getAttribute("usertext",PageContext.REQUEST_SCOPE)%></tt>
+
+</div>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,73 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ page import="org.apache.wiki.tags.InsertDiffTag" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="java.util.*" %>
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ WikiContext c = WikiContext.findContext( pageContext );
+ List history = c.getEngine().getVersionHistory(c.getPage().getName());
+ pageContext.setAttribute( "history", history );
+ pageContext.setAttribute( "diffprovider", c.getEngine().getVariable(c,"jspwiki.diffProvider"));
+%>
+<wiki:PageExists>
+<form action="<wiki:Link jsp='Diff.jsp' format='url' />" method="get" accept-charset="UTF-8">
+ <input type="hidden" name="page" value="<wiki:PageName />" />
+
+ <div class="diffbody">
+
+ <p class="form-control btn btn-primary">
+ <fmt:message key="diff.difference">
+ <fmt:param>
+ <select id="r1" name="r1" onchange="this.form.submit();" >
+ <c:forEach items="${history}" var="i">
+ <option value="<c:out value='${i.version}'/>" <c:if test="${i.version == olddiff}">selected="selected"</c:if> ><c:out value="${i.version}"/></option>
+ </c:forEach>
+ </select>
+ </fmt:param>
+ <fmt:param>
+ <select id="r2" name="r2" onchange="this.form.submit();" >
+ <c:forEach items="${history}" var="i">
+ <option value="<c:out value='${i.version}'/>" <c:if test="${i.version == newdiff}">selected="selected"</c:if> ><c:out value="${i.version}"/></option>
+ </c:forEach>
+ </select>
+ </fmt:param>
+ </fmt:message>
+ </p>
+
+ <c:if test='${diffprovider eq "ContextualDiffProvider"}' >
+ <div class="diffnote">
+ <a href="#change-1" title="<fmt:message key='diff.gotofirst.title'/>" class="diff-nextprev" >
+ <fmt:message key="diff.gotofirst"/>
+ </a>
+ </div>
+ </c:if>
+
+ <wiki:InsertDiff><i><fmt:message key="diff.nodiff"/></i></wiki:InsertDiff>
+
+ </div>
+
+</form>
+</wiki:PageExists>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,56 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+
+<%--
+ WikiContext c = WikiContext.findContext( pageContext );
+--%>
+
+<%-- Main Content Section --%>
+<%-- This has been source ordered to come first in the markup (and on small devices)
+ but to be to the right of the nav on larger screens --%>
+<div class="page-content">
+
+ <wiki:CheckLock mode="locked" id="lock">
+ <div class="error">
+ <fmt:message key="edit.locked">
+ <fmt:param><c:out value="${lock.locker}"/></fmt:param>
+ <fmt:param><c:out value="${lock.timeLeft}"/></fmt:param>
+ </fmt:message>
+ </div>
+ </wiki:CheckLock>
+
+ <wiki:CheckVersion mode="notlatest">
+ <div class="warning">
+ <fmt:message key="edit.restoring">
+ <fmt:param><wiki:PageVersion/></fmt:param>
+ </fmt:message>
+ </div>
+ </wiki:CheckVersion>
+
+ <wiki:Editor />
+
+</div>
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditGroupContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditGroupContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditGroupContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditGroupContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,124 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="java.security.Principal" %>
+<%@ page import="java.util.Arrays" %>
+<%@ page import="org.apache.wiki.auth.PrincipalComparator" %>
+<%@ page import="org.apache.wiki.auth.authorize.Group" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.util.TextUtil" %>
+<%@ page import="org.apache.log4j.*" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<%@ page errorPage="/Error.jsp" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%!
+ Logger log = Logger.getLogger("JSPWiki");
+%>
+
+<%
+ WikiContext c = WikiContext.findContext( pageContext );
+
+ // Extract the group name and members
+ String name = request.getParameter( "group" );
+ Group group = (Group)pageContext.getAttribute( "Group",PageContext.REQUEST_SCOPE );
+ Principal[] members = null;
+
+ if ( group != null )
+ {
+ name = group.getName();
+ members = group.members();
+ Arrays.sort( members, new PrincipalComparator() );
+ }
+ name = TextUtil.replaceEntities(name);
+%>
+<div class="page-content">
+
+ <h3>
+ <%=LocaleSupport.getLocalizedMessage(pageContext, "editgroup.tab")%>
+ <code><%=name%></code>
+ </h3>
+
+ <form action="<wiki:Link format='url' jsp='EditGroup.jsp'/>"
+ class=""
+ id="editGroup"
+ method="POST" accept-charset="UTF-8">
+
+ <!-- Members -->
+ <%
+ StringBuffer s = new StringBuffer();
+ for ( int i = 0; i < members.length; i++ )
+ {
+ s.append( members[i].getName().trim() );
+ s.append( '\n' );
+ }
+ %>
+ <div class="help-block">
+ <fmt:message key="editgroup.instructions">
+ <fmt:param><%=name%></fmt:param>
+ </fmt:message>
+ </div>
+ <div class="help-block">
+ <wiki:Messages div="error" topic="group" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"editgroup.saveerror") %>' />
+ </div>
+
+ <div class="form-group">
+ <label><fmt:message key="group.name"/></label>
+ <%=name%>
+ </div>
+ <div class="form-group">
+ <label><fmt:message key="group.members"/></label>
+
+ <textarea id="members" name="members" rows="10" cols="30"><%=TextUtil.replaceEntities(s.toString())%></textarea>
+ <div class="help-block"><fmt:message key="editgroup.memberlist"/></div>
+
+ </div>
+
+
+
+ <input class="btn btn-primary" type="submit" name="ok" value="<fmt:message key="editgroup.submit.save"/>" />
+ <input type="hidden" name="group" value="<%=name%>" />
+ <input type="hidden" name="action" value="save" />
+
+ <wiki:Permission permission="viewGroup">
+ <a class="btn btn-default" href="<wiki:Link format="url" jsp='Group.jsp'><wiki:Param name='group' value='<%=name%>'/></wiki:Link>" >
+ <%=LocaleSupport.getLocalizedMessage(pageContext, "actions.viewgroup")%>
+ </a>
+ </wiki:Permission>
+
+ <div class="help-block">
+ <fmt:message key="editgroup.savehelp"><fmt:param><%=name%></fmt:param></fmt:message>
+ </div>
+
+ </form>
+
+ <wiki:Permission permission="deleteGroup">
+ <form action="<wiki:Link format='url' jsp='DeleteGroup.jsp'/>"
+ class=""
+ id="deleteGroup"
+ onsubmit="return( confirm('<fmt:message key="grp.deletegroup.confirm"/>') && Wiki.submitOnce(this) );"
+ method="POST" accept-charset="UTF-8">
+ <input class="btn btn-danger" type="submit" name="ok" value="<fmt:message key="actions.deletegroup"/>" />
+ <input type="hidden" name="group" value="${param.group}" />
+ </form>
+ </wiki:Permission>
+
+</div>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,64 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<!doctype html>
+<html lang="en">
+ <head>
+
+ <title>
+ <wiki:CheckRequestContext context="edit">
+ <fmt:message key="edit.title.edit">
+ <fmt:param><wiki:Variable var="ApplicationName" /></fmt:param>
+ <fmt:param><wiki:PageName /></fmt:param>
+ </fmt:message>
+ </wiki:CheckRequestContext>
+ <wiki:CheckRequestContext context="comment">
+ <fmt:message key="comment.title.comment">
+ <fmt:param><wiki:Variable var="ApplicationName" /></fmt:param>
+ <fmt:param><wiki:PageName /></fmt:param>
+ </fmt:message>
+ </wiki:CheckRequestContext>
+ </title>
+ <meta name="robots" content="noindex,follow" />
+ <wiki:Include page="commonheader.jsp"/>
+</head>
+
+<body class="<wiki:Variable var='requestcontext' />" >
+
+<div class="container ${prefs.Orientation}">
+
+ <wiki:Include page="Header.jsp" />
+ <wiki:Include page="Nav.jsp" />
+ <div class="content" data-toggle="li#menu,.sidebar>.close" >
+ <div class="page">
+ <wiki:Content/>
+ <wiki:Include page="PageInfo.jsp"/>
+ </div>
+ <wiki:Include page="Sidebar.jsp"/>
+ </div>
+ <wiki:Include page="Footer.jsp" />
+
+</div>
+
+</body>
+</html>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/FindContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/FindContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/FindContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/FindContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,86 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.ui.*" %>
+<%@ page import="java.util.*" %>
+<%@ page import="org.apache.commons.lang.*" %>
+<%@ page import="java.net.URLEncoder" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<div class="page-content">
+
+<form action="<wiki:Link format='url' jsp='Search.jsp'/>"
+ class="form-frame"
+ id="searchform2"
+ accept-charset="<wiki:ContentEncoding/>">
+
+ <input type="text"
+ name="query" id="query2"
+ class="form-group form-control"
+ value="<c:out value='${query}'/>"
+ placeholder="<fmt:message key="find.input" />"
+ autofocus="autofocus"
+ size="32" />
+
+ <div class="form-inline form-group">
+
+ <input class="btn btn-primary" type="submit" name="ok" id="ok" value="<fmt:message key="find.submit.find"/>" />
+ <input class="btn btn-default" type="submit" name="go" id="go" value="<fmt:message key="find.submit.go"/>" />
+ <input type="hidden" name="start" id="start" value="0" />
+ <input type="hidden" name="maxitems" id="maxitems" value="20" />
+
+ <div class="btn-group" data-toggle="buttons">
+ <label class="btn btn-default btn-xs" >
+ <input type="checkbox" name="details" id="details" <c:if test='${param.details == "on"}'>checked='checked'</c:if> />
+ <fmt:message key="find.details" />
+ </label>
+ </div>
+
+ <div class="btn-group" data-toggle="buttons">
+ <label class="btn btn-default btn-xs">
+ <input type="radio" name="scope" <c:if test='${empty param.scope}'>checked='checked'</c:if> value=""><fmt:message key='find.scope.all' />
+ </label>
+ <label class="btn btn-default btn-xs" >
+ <input type="radio" name="scope" id="x" <c:if test='${param.scope eq "author:"}'>checked='checked'</c:if> value="author:"><fmt:message key='find.scope.authors' />
+ </label>
+ <label class="btn btn-default btn-xs">
+ <input type="radio" name="scope" <c:if test='${param.scope eq "name:"}'>checked='checked'</c:if> value="name:"><fmt:message key='find.scope.pagename' />
+ </label>
+ <label class="btn btn-default btn-xs">
+ <input type="radio" name="scope" <c:if test='${param.scope eq "contents:"}'>checked='checked'</c:if> value="contents:" ><fmt:message key='find.scope.content' />
+ </label>
+ <label class="btn btn-default btn-xs">
+ <input type="radio" name="scope" <c:if test='${param.scope eq "attachment:"}'>checked='checked'</c:if> value="attachment:" ><fmt:message key='find.scope.attach' />
+ </label>
+ </div>
+
+ </div>
+
+ <%-- loading progress bar / toggle .active class --%>
+ <span id="spin" class="spin" style="position:absolute;display:none;"></span>
+
+</form>
+
+<div><wiki:Include page="AJAXSearch.jsp"/></div>
+
+</div>
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Footer.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Footer.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Footer.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Footer.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,36 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<div class="footer">
+
+ <div class="watermark">jspωiki</div>
+
+ <div class="copyright"><wiki:InsertPage page="CopyrightNotice"/></div>
+
+ <div class="wiki-version"><%=Release.APPNAME%> v<%=Release.getVersionString()%>
+ <wiki:RSSImageLink title="Aggregate the RSS feed" />
+ </div>
+
+</div>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,170 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="java.security.Principal" %>
+<%@ page import="java.util.*" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.auth.PrincipalComparator" %>
+<%@ page import="org.apache.wiki.auth.authorize.Group" %>
+<%@ page import="org.apache.wiki.auth.authorize.GroupManager" %>
+<%@ page import="org.apache.wiki.preferences.Preferences" %>
+<%@ page import="org.apache.wiki.util.TextUtil" %>
+<%@ page import="org.apache.log4j.*" %>
+<%@ page errorPage="/Error.jsp" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%!
+ Logger log = Logger.getLogger("JSPWiki");
+%>
+
+<%
+ WikiContext c = WikiContext.findContext( pageContext );
+
+ // Extract the group name and members
+ String name = request.getParameter( "group" );
+ Group group = (Group)pageContext.getAttribute( "Group",PageContext.REQUEST_SCOPE );
+ Principal[] members = null;
+ String modified = "";
+ String created = "";
+ String modifier = "";
+ String creator = "";
+
+ if ( group != null )
+ {
+ name = group.getName();
+ members = group.members();
+ Arrays.sort( members, new PrincipalComparator() );
+ creator = group.getCreator();
+ if ( group.getCreated() != null )
+ {
+ created = Preferences.renderDate(WikiContext.findContext( pageContext ), group.getCreated(),Preferences.TimeFormat.DATETIME);
+ }
+ modifier = group.getModifier();
+ if ( group.getLastModified() != null )
+ {
+ modified = Preferences.renderDate(WikiContext.findContext( pageContext ), group.getLastModified(),Preferences.TimeFormat.DATETIME) ;
+ }
+ }
+ name = TextUtil.replaceEntities(name);
+%>
+
+<div class="page-content">
+
+ <h3><%=name%></h3>
+
+<%
+ if ( group == null )
+ {
+ if ( c.getWikiSession().getMessages( GroupManager.MESSAGES_KEY ).length == 0 )
+ {
+%>
+ <fmt:message key="group.doesnotexist"/>
+ <wiki:Permission permission="createGroups">
+ <fmt:message key="group.createsuggestion">
+ <fmt:param><wiki:Link jsp="NewGroup.jsp">
+ <wiki:Param name="group" value="<%=name%>" />
+ <wiki:Param name="group" value="<%=name%>" />
+ <fmt:message key="group.createit"/>
+ </wiki:Link>
+ </fmt:param>
+ </fmt:message>
+ </wiki:Permission>
+<%
+ }
+ else
+ {
+%>
+ <wiki:Messages div="error" topic="<%=GroupManager.MESSAGES_KEY%>" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"group.errorprefix")%>'/>
+<%
+ }
+ }
+ else
+ {
+%>
+ <table class="wikitable">
+ <tr>
+ <th><fmt:message key="group.name"/></th>
+ <td>
+ <fmt:message key="group.groupintro">
+ <fmt:param><em><%=name%></em></fmt:param>
+ </fmt:message>
+ </td>
+ </tr>
+ <!-- Members -->
+ <tr>
+ <th><fmt:message key="group.members"/>
+ </th>
+ <td><%
+ for ( int i = 0; i < members.length; i++ )
+ {
+ out.println( members[i].getName().trim() );
+ if ( i < ( members.length - 1 ) )
+ {
+ out.println( "<br/>" );
+ }
+ }
+ %></td>
+ <%--fmt:message key="group.membership"/--%>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <fmt:message key="group.modifier">
+ <fmt:param><%=modifier%></fmt:param>
+ <fmt:param><%=modified%></fmt:param>
+ </fmt:message>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <fmt:message key="group.creator">
+ <fmt:param><%=creator%></fmt:param>
+ <fmt:param><%=created%></fmt:param>
+ </fmt:message>
+ </td>
+ </tr>
+ </table>
+<%
+ }
+%>
+
+ <form action="<wiki:Link format='url' jsp='DeleteGroup.jsp'/>"
+ class="wikiform"
+ id="deleteGroup"
+ onsubmit="return( confirm('<fmt:message key="grp.deletegroup.confirm"/>')
+ && Wiki.submitOnce(this) );"
+ method="POST" accept-charset="UTF-8">
+
+ <wiki:Permission permission="editGroup">
+ <a class="btn btn-primary"
+ href="<wiki:Link format='url' jsp='EditGroup.jsp'><wiki:Param name='group' value='${param.group}' /></wiki:Link>" >
+ <%=LocaleSupport.getLocalizedMessage(pageContext, "actions.editgroup")%>
+ </a>
+ </wiki:Permission>
+
+ <wiki:Permission permission="deleteGroup">
+ <input class="btn btn-danger" type="submit" name="ok" value="<fmt:message key="actions.deletegroup"/>" />
+ <input type="hidden" name="group" value="${param.group}" />
+ </wiki:Permission>
+
+ </form>
+
+</div>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupTab.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupTab.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupTab.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupTab.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,196 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="java.security.Principal" %>
+<%@ page import="java.text.MessageFormat" %>
+<%@ page import="java.util.*" %>
+<%@ page import="org.apache.wiki.WikiContext" %>
+<%@ page import="org.apache.wiki.auth.*" %>
+<%@ page import="org.apache.wiki.auth.PrincipalComparator" %>
+<%@ page import="org.apache.wiki.auth.authorize.Group" %>
+<%@ page import="org.apache.wiki.auth.authorize.GroupManager" %>
+<%@ page import="org.apache.wiki.preferences.Preferences" %>
+<%@ page import="org.apache.log4j.*" %>
+<%@ page errorPage="/Error.jsp" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%!
+
+ /* json=[ group1, group2, .. ] */
+ String groupsToJson(PageContext pageContext,String groupname) throws NoSuchPrincipalException {
+
+ WikiContext c = WikiContext.findContext( pageContext );
+ Principal[] roles = c.getWikiSession().getRoles();
+
+ StringBuffer result = new StringBuffer();
+
+ result.append( "[" );
+ for( int i = 0; i < roles.length; i++ )
+ {
+ if ( roles[i] instanceof GroupPrincipal ) /* bugfix */
+ {
+ String name = roles[i].getName();
+ Group group = c.getEngine().getGroupManager().getGroup( name );
+
+ result.append( groupToJson( group, name, name.equals( groupname ), pageContext ) );
+
+ if( i+1<roles.length ){ result.append( ",\n" ); }
+ }
+ }
+ result.append( "\n]" );
+ return result.toString();
+
+ }
+
+/* json= {"name":"..","members":["a","b","c"] ,"createdon":"...","lastmodified":"...","cursor":yes|no} */
+
+ String groupToJson( Group group, String name, boolean cursor, PageContext pageContext )
+ {
+ Principal[] m = group.members();
+ java.util.Arrays.sort( m, new PrincipalComparator() );
+
+ StringBuffer ss = new StringBuffer();
+ MessageFormat mf = null;
+ Object[] args = null;
+
+ ss.append( "{ \"name\":\"" );
+
+ ss.append( name );
+ ss.append( "\",\"members\":[" );
+
+ for( int j=0; j < m.length; j++ ) {
+ ss.append( "\""+m[j].getName().trim()+"\"" );
+ if(j+1 < m.length) ss.append( "," );
+ }
+
+ ss.append( "],\"createdon\":\"" );
+ mf = new MessageFormat(LocaleSupport.getLocalizedMessage(pageContext, "grp.createdon") );
+ args = new Object[]{(group.getCreated()==null) ? "" : Preferences.renderDate(WikiContext.findContext( pageContext ), group.getCreated(),Preferences.TimeFormat.DATETIME), group.getCreator()};
+ ss.append( mf.format( args ) );
+
+ ss.append( "\",\"lastmodified\":\"" );
+ mf = new MessageFormat(LocaleSupport.getLocalizedMessage(pageContext, "grp.lastmodified") );
+ args = new Object[]{(group.getLastModified()==null) ? "" : Preferences.renderDate(WikiContext.findContext( pageContext ), group.getLastModified(),Preferences.TimeFormat.DATETIME), group.getModifier()};
+ ss.append( mf.format( args ) );
+
+ ss.append( "\",\"cursor\":" );
+ ss.append( ( cursor ) ? "true" : "false" );
+
+ ss.append( "}" );
+
+ return ss.toString();
+
+ }
+
+%>
+
+<h3><fmt:message key="group.tab" /></h3>
+
+
+<wiki:Messages div="error" topic="<%=GroupManager.MESSAGES_KEY%>" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"group.errorprefix")%>'/>
+
+<div class="form-group">
+ <label class="control-label form-col-20"><fmt:message key="group.name" /></label>
+
+ <%--
+ <div id="grouptemplate"
+ style="display:none; "
+ title='<fmt:message key="grp.groupnames.title"/>'
+ onclick="WikiGroup.toggle(); WikiGroup.onMouseOverGroup(this);"
+ onmouseover="WikiGroup.onMouseOverGroup(this);" >
+ </div>
+ --%>
+ <wiki:Permission permission="createGroups">
+ <input type="text" size="30"
+ class="form-control form-col-50"
+ id="newgroup"
+ value='<fmt:message key="grp.newgroupname"/>'
+ onblur="if( this.value == '' ) { this.value = this.defaultValue; }; "
+ onfocus="if( this.value == this.defaultValue ) { this.value = ''; WikiGroup.onClickNew(); }; ">
+ </wiki:Permission>
+</div>
+
+<div class="form-group">
+ <label class="control-label form-col-20"><fmt:message key="group.members" /></label>
+
+ <textarea class="form-control form-col-50" rows="8" cols="30" disabled="disabled"
+ name="membersfield" id="membersfield" ></textarea>
+</div>
+<div class="form-group">
+ <form action="<wiki:Link format='url' jsp='Group.jsp'/>"
+ id="groupForm"
+ method="post" accept-charset="<wiki:ContentEncoding />" >
+
+ <input type="hidden" name="group" value="" />
+ <input type="hidden" name="members" value="" />
+ <input type="hidden" name="action" value="save" />
+ <input type="button" disabled="disabled"
+ class="btn btn-primary form-col-offset-20"
+ name="saveButton" id="saveButton"
+ value='<fmt:message key="grp.savegroup"/>'
+ onclick="WikiGroup.onSubmit( this.form, '<wiki:Link format='url' jsp='EditGroup.jsp' />' );" />
+
+ <wiki:Permission permission="createGroups">
+ <input type="button" disabled="disabled"
+ class="btn btn-default"
+ name="createButton" id="createButton"
+ value='<fmt:message key="grp.savenewgroup"/>'
+ style="display:none; "
+ onclick="WikiGroup.onSubmitNew( this.form, '<wiki:Link format='url' jsp='NewGroup.jsp' />' );" />
+ </wiki:Permission>
+
+ <input type="button" disabled="disabled"
+ class="btn btn-default"
+ name="cancelButton" id="cancelButton"
+ value='<fmt:message key="grp.cancel"/>'
+ onclick="WikiGroup.toggle();" />
+
+ <wiki:Permission permission="deleteGroup">
+ <input type="button" disabled="disabled"
+ class="btn btn-danger"
+ name="deleteButton" id="deleteButton"
+ value='<fmt:message key="grp.deletegroup"/>'
+ onclick="confirm( '<fmt:message key="grp.deletegroup.confirm"/>' )
+ && WikiGroup.onSubmit( this.form, '<wiki:Link format='url' jsp='DeleteGroup.jsp' />' );" />
+ </wiki:Permission>
+ </form>
+
+ <p class="help-block form-col-offset-20"><fmt:message key="grp.formhelp"/></p>
+ <p id="groupinfo" class="help-block"></p>
+</div>
+
+<div class="form-group">
+ <label class="control-label form-col-20"><fmt:message key="grp.allgroups"/></label>
+ <p class="help-block form-col-75"><wiki:Translate>[{Groups}]</wiki:Translate></p>
+
+ <div id="groups" class="hidden json"><%= groupsToJson(pageContext,request.getParameter( "group" )) %></div>
+
+<%--
+<script>
+console.log( $('groups').get('text'), JSON.decode( $('groups').get('text') ) );
+</script>
+--%>
+<%--
+WikiGroup.putGroup( "Group1qsdf qsdf qsdf qsdf qsdffsdfq en nog een beetje langer he", "Member1\nMember2\nMember3\nMember4\nMember5\nMember6", "createdon", "createdby", "changedon", "changedby" );
+--%>
+
+</div>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,46 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="org.apache.wiki.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ WikiContext c = WikiContext.findContext(pageContext);
+ String frontpage = c.getEngine().getFrontPage();
+%>
+<div class="titlebox"><wiki:InsertPage page="TitleBox"/></div>
+
+<div class="header">
+
+ <div class="watermark">jspωiki</div>
+<%-- <div class="application-logo" >
+ <a href="<wiki:LinkTo page='<%=frontpage%>' format='url' />"
+ title="<fmt:message key='actions.home.title' ><fmt:param><%=frontpage%></fmt:param></fmt:message> ">jspωiki</a>
+ </div>
+--%>
+
+ <wiki:Include page="SearchBox.jsp" />
+
+ <div class="pagename"><wiki:PageName /></div>
+
+ <div class="breadcrumb"><fmt:message key="header.yourtrail"/><wiki:Breadcrumbs /></div>
+
+</div>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,409 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.auth.*" %>
+<%@ page import="org.apache.wiki.auth.permissions.*" %>
+<%@ page import="org.apache.wiki.attachment.*" %>
+<%@ page import="org.apache.wiki.i18n.InternationalizationManager" %>
+<%@ page import="org.apache.wiki.preferences.Preferences" %>
+<%@ page import="org.apache.wiki.util.TextUtil" %>
+<%@ 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" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ 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 parm_renameto = (String)request.getParameter( "renameto" );
+ if( parm_renameto == null ) parm_renameto = wikiPage.getName();
+
+ String creationAuthor ="";
+
+ //FIXME -- seems not to work correctly for attachments !!
+ WikiPage firstPage = c.getEngine().getPage( wikiPage.getName(), 1 );
+ if( firstPage != null )
+ {
+ creationAuthor = firstPage.getAuthor();
+
+ if( creationAuthor != null && creationAuthor.length() > 0 )
+ {
+ creationAuthor = TextUtil.replaceEntities(creationAuthor);
+ }
+ else
+ {
+ creationAuthor = Preferences.getBundle( c, InternationalizationManager.CORE_BUNDLE ).getString( "common.unknownauthor" );
+ }
+ }
+
+ int itemcount = 0; //number of page versions
+ try
+ {
+ itemcount = wikiPage.getVersion(); /* highest version */
+ }
+ catch( Exception e ) { /* dont care */ }
+
+ int pagesize = 20;
+ int startitem = itemcount-1; /* itemcount==1-20 -> startitem=0-19 ... */
+
+ String parm_start = (String)request.getParameter( "start" );
+ if( parm_start != null ) startitem = Integer.parseInt( parm_start ) ;
+
+ /* round to start of block: 0-19 becomes 0; 20-39 becomes 20 ... */
+ if( startitem > -1 ) startitem = ((startitem)/pagesize) * pagesize;
+
+ /* startitem drives the pagination logic */
+ /* startitem=-1:show all; startitem=0:show block 1-20; startitem=20:block 21-40 ... */
+%>
+
+<div class="page-content">
+
+<wiki:PageExists>
+
+
+<wiki:PageType type="page">
+<%-- part 1 : normal wiki pages
+
+ <wiki:TabbedSection defaultTab="info">
+
+ <wiki:Tab id="pagecontent"
+ title='<%=LocaleSupport.getLocalizedMessage(pageContext, "actions.view")%>'
+ accesskey="v"
+ url="<%=c.getURL(WikiContext.VIEW, c.getPage().getName())%>">
+ <%--<wiki:Include page="PageTab.jsp"/> -->
+ </wiki:Tab>
+--%>
+
+ <div class="form-frame">
+ <p>
+ <fmt:message key='info.lastmodified'>
+ <fmt:param><wiki:PageVersion >1</wiki:PageVersion></fmt:param>
+ <fmt:param>
+ <a href="<wiki:DiffLink format='url' version='latest' newVersion='previous' />"
+ title="<fmt:message key='info.pagediff.title' />" >
+ <fmt:formatDate value="<%= wikiPage.getLastModified() %>" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
+ </a>
+ </fmt:param>
+ <fmt:param><wiki:Author /></fmt:param>
+ </fmt:message>
+ <wiki:RSSImageLink mode="wiki"/>
+ </p>
+
+ <wiki:CheckVersion mode="notfirst">
+ <p>
+ <fmt:message key='info.createdon'>
+ <fmt:param>
+ <wiki:Link version="1">
+ <fmt:formatDate value="<%= firstPage.getLastModified() %>" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
+ </wiki:Link>
+ </fmt:param>
+ <fmt:param><%= creationAuthor %></fmt:param>
+ </fmt:message>
+ </p>
+ </wiki:CheckVersion>
+
+ <wiki:Permission permission="rename">
+
+ <wiki:Messages div="alert alert-danger" topic="rename" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"prefs.errorprefix.rename")%>'/>
+
+ <form action="<wiki:Link format='url' jsp='Rename.jsp'/>"
+ class="form-group"
+ id="renameform"
+ method="post" accept-charset="<wiki:ContentEncoding />" >
+
+ <input type="hidden" name="page" value="<wiki:Variable var='pagename' />" />
+ <input class="btn btn-primary" type="submit" name="rename" value="<fmt:message key='info.rename.submit' />" />
+ <input class="form-control form-col-50" type="text" name="renameto" value="<%= parm_renameto %>" size="40" />
+ <label class="btn btn-default" for="references">
+ <input class="checkbox-inline" type="checkbox" name="references" id="references" checked="checked" />
+ <fmt:message key="info.updatereferrers"/>
+ </label>
+ </form>
+ </wiki:Permission>
+ <wiki:Permission permission="!rename">
+ <p class="text-warning"><fmt:message key="info.rename.permission"/></p>
+ </wiki:Permission>
+
+ <wiki:Permission permission="delete">
+ <form action="<wiki:Link format='url' context='<%=WikiContext.DELETE%>' />"
+ class="form-group"
+ id="deleteForm"
+ method="post" accept-charset="<wiki:ContentEncoding />"
+ onsubmit="return( confirm('<fmt:message key="info.confirmdelete"/>') && Wiki.submitOnce(this) );">
+ <input class="btn btn-danger" type="submit" name="delete-all" id="delete-all"
+ value="<fmt:message key='info.delete.submit'/>" />
+ </form>
+ </wiki:Permission>
+ <wiki:Permission permission="!delete">
+ <p class="text-warning"><fmt:message key="info.delete.permission"/></p>
+ </wiki:Permission>
+
+ </div>
+
+
+ <div class="tabbedAccordion">
+ <div class="tab-History">
+ <%--
+ <wiki:CheckVersion mode="first"><fmt:message key="info.noversions"/></wiki:CheckVersion>
+ --%>
+ <%-- if( itemcount > 1 ) { --%>
+
+ <wiki:SetPagination start="<%=startitem%>" total="<%=itemcount%>" pagesize="<%=pagesize%>" maxlinks="9"
+ fmtkey="info.pagination"
+ href='<%=c.getURL(WikiContext.INFO, c.getPage().getName(), "start=%s")%>' />
+
+ <div class="zebra-table sortable table-filter">
+ <table class="wikitable" >
+ <tr>
+ <th><fmt:message key="info.version"/></th>
+ <th><fmt:message key="info.date"/></th>
+ <th><fmt:message key="info.size"/></th>
+ <th><fmt:message key="info.author"/></th>
+ <th><fmt:message key="info.changes"/></th>
+ <th><fmt:message key="info.changenote"/></th>
+ </tr>
+
+ <wiki:HistoryIterator id="currentPage">
+ <% if( ( startitem == -1 ) ||
+ ( ( currentPage.getVersion() > startitem )
+ && ( currentPage.getVersion() <= startitem + pagesize ) ) )
+ {
+ %>
+ <tr>
+ <td>
+ <wiki:Link version="<%=Integer.toString(currentPage.getVersion())%>">
+ <wiki:PageVersion/>
+ </wiki:Link>
+ </td>
+
+ <td class="nowrap" jspwiki:sortvalue="<%= currentPage.getLastModified().getTime() %>">
+ <fmt:formatDate value="<%= currentPage.getLastModified() %>" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
+ </td>
+ <td class="nowrap text-right">
+ <c:set var="ff"><wiki:PageSize /></c:set>
+ <fmt:formatNumber value='${ff/1000}' maxFractionDigits='3' minFractionDigits='1'/> <fmt:message key="info.kilobytes"/>
+ </td>
+ <td><wiki:Author /></td>
+
+ <td>
+ <wiki:CheckVersion mode="notfirst">
+ <wiki:DiffLink version="current" newVersion="previous"><fmt:message key="info.difftoprev"/></wiki:DiffLink>
+ <wiki:CheckVersion mode="notlatest"> | </wiki:CheckVersion>
+ </wiki:CheckVersion>
+
+ <wiki:CheckVersion mode="notlatest">
+ <wiki:DiffLink version="latest" newVersion="current"><fmt:message key="info.difftolast"/></wiki:DiffLink>
+ </wiki:CheckVersion>
+ </td>
+
+ <td class="changenote">
+ <% String changenote = (String) currentPage.getAttribute( WikiPage.CHANGENOTE ); %>
+ <%= (changenote==null) ? "" : changenote %>
+ </td>
+
+ </tr>
+ <% } %>
+ </wiki:HistoryIterator>
+
+ </table>
+ </div>
+ ${pagination}
+ <%-- } /* itemcount > 1 */ --%>
+
+ </div>
+ <div class="tab-PageReferences">
+ <table class="wikitable table-condensed">
+ <tr>
+ <th><fmt:message key="info.tab.incoming" /></th>
+ <th><fmt:message key="info.tab.outgoing" /></th>
+ </tr>
+ <tr>
+ <td>
+ <wiki:Link><wiki:PageName /></wiki:Link>
+ <wiki:Plugin plugin="ReferringPagesPlugin" args="before='*' after='\n' " />
+ </td>
+ <td>
+ <wiki:Plugin plugin="ReferredPagesPlugin" args="depth='1' type='local'" />
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <%-- DIFF section --%>
+ <wiki:CheckRequestContext context='diff'>
+ <div class="tab-Difference">
+ <wiki:Include page="DiffTab.jsp"/>
+ </div>
+ </wiki:CheckRequestContext>
+
+ </div>
+
+
+</wiki:PageType>
+
+
+<%-- part 2 : attachments --%>
+<wiki:PageType type="attachment">
+<%
+ int MAXATTACHNAMELENGTH = 30;
+ String progressId = c.getEngine().getProgressManager().getNewProgressIdentifier();
+%>
+
+<wiki:Permission permission="upload">
+
+ <form action="<wiki:Link jsp='attach' format='url' absolute='true'><wiki:Param name='progressid' value='<%=progressId%>'/></wiki:Link>"
+ class="accordion-close"
+ id="uploadform"
+ method="post" accept-charset="<wiki:ContentEncoding/>"
+ enctype="multipart/form-data" >
+
+ <%-- Do NOT change the order of wikiname and content, otherwise the
+ servlet won't find its parts. --%>
+
+ <h4><fmt:message key="info.uploadnew"/></h4>
+
+ <div class="form-group">
+ <label class="control-label form-col-20" for="files"><fmt:message key="attach.add.selectfile"/></label>
+ <ul class="list-group form-col-50">
+ <li class="list-group-item droppable">
+ <label>Select files <%--or drop them here!--%></label>
+ <input type="file" name="files" id="files" size="60"/>
+ <a class="hidden delete btn btn-danger btn-xs pull-right">Delete</a>
+ </li>
+ </ul>
+ </div>
+ <div class="form-group">
+ <label class="control-label form-col-20" for="changenote"><fmt:message key="attach.add.changenote"/></label>
+ <input class="form-control form-col-50" type="text" name="changenote" id="changenote" maxlength="80" size="60" />
+ </div>
+ <div class="form-group">
+ <input type="hidden" name="nextpage" value="<wiki:Link context='info' format='url'/>" /><%-- *** --%>
+ <input type="hidden" name="page" value="<wiki:Variable var="pagename"/>" />
+ <input class="btn btn-primary form-col-offset-20 form-col-50"
+ type="submit" name="upload" id="upload" disabled="disabled" value="<fmt:message key='attach.add.submit'/>" />
+ <%--<input type="hidden" name="action" value="upload" />--%>
+ </div>
+ <div class="hidden form-col-offset-20 form-col-80 progress progress-striped active">
+ <div class="progress-bar" data-progressid="<%=progressId%>" style="width: 100%;"></div>
+ </div>
+
+ </form>
+</wiki:Permission>
+<wiki:Permission permission="!upload">
+ <div class="block-help bg-warning"><fmt:message key="attach.add.permission"/></div>
+</wiki:Permission>
+
+<wiki:Permission permission="delete">
+ <%--<h4><fmt:message key="info.deleteattachment"/></h4>--%>
+ <form action="<wiki:Link format='url' context='<%=WikiContext.DELETE%>' />"
+ class="form-group"
+ id="deleteForm"
+ method="post" accept-charset="<wiki:ContentEncoding />"
+ onsubmit="return( confirm('<fmt:message key="info.confirmdelete"/>') );" >
+
+ <input class="btn btn-danger" type="submit" name="delete-all" id="delete-all"
+ value="<fmt:message key='info.deleteattachment.submit' />" />
+ </form>
+</wiki:Permission>
+
+<%-- FIXME why not add pagination here - number of attach versions of one page limited ?--%>
+<%--<h4><fmt:message key='info.attachment.history' /></h4>--%>
+
+ <div class="slimbox-attachments sortable table-filter-hover-sort table-filter">
+ <table class="table">
+ <tr>
+ <th><fmt:message key="info.attachment.type"/></th>
+ <%--<th><fmt:message key="info.attachment.name"/></th>--%>
+ <th><fmt:message key="info.version"/></th>
+ <th><fmt:message key="info.size"/></th>
+ <th><fmt:message key="info.date"/></th>
+ <th><fmt:message key="info.author"/></th>
+ <%--
+ <wiki:Permission permission="upload">
+ <th><fmt:message key="info.actions"/></th>
+ </wiki:Permission>
+ --%>
+ <th><fmt:message key="info.changenote"/></th>
+ </tr>
+
+ <wiki:HistoryIterator id="att"><%-- <wiki:AttachmentsIterator id="att"> --%>
+ <%
+ 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) + "...";
+ %>
+ <tr>
+ <td><div id="attach-<%= attachtype %>" class="attachtype"><%= attachtype %></div></td>
+ <%--<td><wiki:LinkTo title="<%= name %>" ><%= sname %></wiki:LinkTo></td>--%>
+ <%--FIXME classs parameter throws java exception
+ <td><wiki:Link version='<%=Integer.toString(att.getVersion())%>'
+ title="<%= name %>"
+ class="attachment" ><wiki:PageVersion /></wiki:Link></td>
+ --%>
+ <td class="center"><a href="<wiki:Link version='<%=Integer.toString(att.getVersion())%>' format='url' />"
+ title="<%= name %>"
+ class="attachment" ><wiki:PageVersion /></a></td>
+ <td class="nowrap text-right">
+ <fmt:formatNumber value='<%=Double.toString(att.getSize()/1000.0) %>' groupingUsed='false' maxFractionDigits='1' minFractionDigits='1'/> <fmt:message key="info.kilobytes"/>
+ </td>
+ <td class="nowrap" jspwiki:sortvalue="<%= att.getLastModified().getTime() %>">
+ <fmt:formatDate value="<%= att.getLastModified() %>" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
+ </td>
+ <td><wiki:Author /></td>
+ <%--
+ // FIXME: This needs to be added, once we figure out what is going on.
+ <wiki:Permission permission="upload">
+ <td>
+ <input type="button"
+ value="Restore"
+ url="<wiki:Link format='url' context='<%=WikiContext.UPLOAD%>'/>"/>
+ </td>
+ </wiki:Permission>
+ --%>
+ <td class='changenote'>
+ <% String changenote = (String) att.getAttribute( WikiPage.CHANGENOTE ); %>
+ <%= (changenote==null) ? "" : changenote %>
+ </td>
+ </tr>
+ </wiki:HistoryIterator><%-- </wiki:AttachmentsIterator> --%>
+
+ </table>
+ </div>
+
+</wiki:PageType>
+
+</wiki:PageExists>
+
+<wiki:NoSuchPage>
+ <fmt:message key="common.nopage">
+ <fmt:param><wiki:EditLink><fmt:message key="common.createit"/></wiki:EditLink></fmt:param>
+ </fmt:message>
+</wiki:NoSuchPage>
+
+</div>
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/LoginContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/LoginContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/LoginContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/LoginContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,187 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.auth.*" %>
+<%@ page errorPage="/Error.jsp" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ String postURL = "";
+ WikiContext ctx = WikiContext.findContext( pageContext );
+ AuthenticationManager mgr = ctx.getEngine().getAuthenticationManager();
+
+ if( mgr.isContainerAuthenticated() )
+ {
+ postURL = "j_security_check";
+ }
+ else
+ {
+ String redir = (String)ctx.getVariable("redirect");
+ if( redir == null ) redir = ctx.getEngine().getFrontPage();
+ postURL = ctx.getURL( WikiContext.LOGIN, redir );
+ }
+
+ boolean supportsCookieAuthentication = mgr.allowsCookieAuthentication();
+%>
+<div class="page-content">
+
+<%-- Login functionality --%>
+<wiki:UserCheck status="notauthenticated">
+<%--<wiki:Include page='LoginTab.jsp'/>--%>
+
+<div class="rightAccordion">
+
+<h4><fmt:message key="login.heading.login"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message></h4>
+<form action="<%=postURL%>"
+ id="login"
+ class=""
+ onsubmit="return Wiki.submitOnce(this);"
+ method="post" accept-charset="<wiki:ContentEncoding />" >
+
+
+ <div class="help-block"><fmt:message key="login.help"></fmt:message></div>
+
+ <div class="form-group">
+ <wiki:Messages div="error" topic="login"
+ prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"login.errorprefix")%>' />
+ </div>
+ <div class="form-group">
+ <td><label class="control-label form-col-20" for="j_username"><fmt:message key="login.login"/></label></td>
+ <td><input autofocus="autofocus" class="form-control form-col-50" type="text" size="24" value="<wiki:Variable var='uid' default='' />"
+ name="j_username" id="j_username" /></td>
+ </div>
+ <div class="form-group">
+ <td><label class="control-label form-col-20"for="j_password"><fmt:message key="login.password"/></label></td>
+ <td><input class="form-control form-col-50" type="password" size="24"
+ name="j_password" id="j_password" /></td>
+ </div>
+ <% if( supportsCookieAuthentication ) { %>
+ <div class="form-group">
+ <td><label class="control-label form-col-20" for="j_remember"><fmt:message key="login.remember"/></label></td>
+ <td><input type="checkbox"
+ name="j_remember" id="j_remember" /></td>
+ </div>
+ <% } %>
+ <div class="form-group">
+ <input type="hidden" name="redirect" value="<wiki:Variable var='redirect' default='' />" />
+ <input class="btn btn-primary form-col-offset-20" type="submit" name="submitlogin" value="<fmt:message key='login.submit.login'/>" />
+ </div>
+
+<%--
+ <div class="help-block">
+ <fmt:message key="login.lostpw"/>
+ <a href="#" onclick="$('menu-lostpassword').fireEvent('click');"
+ title="<fmt:message key='login.lostpw.title'/>" >
+ <fmt:message key="login.lostpw.getnew"/>
+ </a>
+ </div>
+ <div class="help-block">
+ <fmt:message key="login.nopassword"/>
+ <a href="#" onclick="$('menu-profile').fireEvent('click');"
+ title="<fmt:message key='login.registernow.title'/>" >
+ <fmt:message key="login.registernow">
+ <fmt:param><wiki:Variable var="applicationname" /></fmt:param>
+ </fmt:message>
+ </a>
+ </div>
+--%>
+
+</form>
+
+
+<%-- Lost pasword functionality --%>
+<h4><%=LocaleSupport.getLocalizedMessage(pageContext, "login.lostpw.tab")%></h4>
+
+<form action="<wiki:Link jsp='LostPassword.jsp' format='url'><wiki:Param name='tab' value='lostpassword'/></wiki:Link>"
+ id="lostpw"
+ class=""
+ method="post" accept-charset="<wiki:ContentEncoding />" >
+
+ <%--<h4><fmt:message key="login.lostpw.heading" /></h4>--%>
+
+ <c:choose>
+ <c:when test="${passwordreset == 'done' }">
+ <wiki:Messages div="information" topic="resetpw" prefix="" />
+ <p>
+ <fmt:message key="login.lostpw.reset.login">
+ <fmt:param><a href="<wiki:Link jsp='Login.jsp' />"><fmt:message key="login.lostpw.reset.clickhere"/></a></fmt:param>
+ </fmt:message>
+ </p>
+ </c:when>
+ <c:otherwise>
+
+
+ <c:if test="${param.tab eq 'lostpassword'}" >
+ <div class="form-group help-block">
+ <wiki:Messages div="error" topic="resetpw"
+ prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"login.errorprefix")%>' />
+ <wiki:Messages div="information" topic="resetpwok" />
+ </div>
+ </c:if>
+ <div class="form-group">
+ <td><label class="control-label form-col-20" for="name"><fmt:message key="login.lostpw.name"/></label></td>
+ <td><input class="form-control form-col-50" type="text" size="24" name="name" id="name" /></td>
+ </div>
+ <div class="help-block form-col-offset-20"><fmt:message key="login.lostpw.help"></fmt:message></div>
+ <div class="form-group">
+ <input type="hidden" name="action" value="resetPassword"/>
+ <input class="btn btn-primary form-col-offset-20" type="submit" name="Submit" value="<fmt:message key='login.lostpw.submit'/>" />
+ </div>
+
+<%--
+ <div class="form-group help-block">
+ <fmt:message key="login.invite"/>
+ <a href="#" onclick="$('menu-logincontent').fireEvent('click');"
+ title="<fmt:message key='login.title'/>" >
+ <fmt:message key="login.heading.login"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message>
+ </a>
+ </div>
+ <div class="form-group help-block">
+ <fmt:message key="login.nopassword"/>
+ <.--<a href="UserPreferences.jsp?tab=profile">--.>
+ <a href="#" onclick="$('menu-profile').fireEvent('click');"
+ title="<fmt:message key='login.registernow.title'/>" >
+ <fmt:message key="login.registernow">
+ <fmt:param><wiki:Variable var="applicationname" /></fmt:param>
+ </fmt:message>
+ </a>
+ </div>
+--%>
+ </c:otherwise>
+ </c:choose>
+
+</form>
+
+</wiki:UserCheck>
+
+<%-- Register new user profile --%>
+<wiki:Permission permission='editProfile'>
+<h4><%=LocaleSupport.getLocalizedMessage(pageContext, "login.register.tab")%></h4>
+ <wiki:Include page='ProfileTab.jsp'/>
+</wiki:Permission>
+
+</div>
+</div>
+
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,251 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.attachment.*" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ WikiContext c = WikiContext.findContext( pageContext );
+ pageContext.setAttribute( "attachments", c.getEngine().getAttachmentManager().listAttachments( c.getPage() ).size() );
+ String frontpage = c.getEngine().getFrontPage();
+%>
+
+<%-- navigation bar --%>
+<div class="row">
+
+<ul class="nav nav-pills pull-left">
+ <li>
+ <a class="logo" href="<wiki:Link page='<%=frontpage%>' format='url' />"
+ title="<fmt:message key='actions.home.title' ><fmt:param><%=frontpage%></fmt:param></fmt:message> ">apache jspωiki</a>
+ </li>
+</ul>
+
+<ul class="nav nav-pills pull-right">
+
+ <%-- toggle sidebar --%>
+ <li id="menu"><a href="#"><!--≡-->☰ Sidebar</a></li>
+
+ <%-- view --%>
+ <wiki:CheckRequestContext context='info|diff|upload|rename|edit'>
+ <li id="view">
+ <wiki:PageType type="page">
+ <wiki:Link>
+ <fmt:message key="view.tab"/>
+ </wiki:Link>
+ </wiki:PageType>
+ <wiki:PageType type="attachment">
+ <%--
+ <wiki:Link page="<wiki:ParentPageName />" title="<fmt:message key='actions.viewparent'/>" >
+ <fmt:message key="view.tab"/> Parent
+ </wiki:Link>
+ --%>
+ <wiki:LinkToParent><fmt:message key="view.tab"/> Parent</wiki:LinkToParent>
+ </wiki:PageType>
+ </li>
+ </wiki:CheckRequestContext>
+
+
+ <%-- attachment --%>
+ <wiki:CheckRequestContext context='view|info|rename|edit'>
+ <wiki:PageType type="page">
+ <li id="attach">
+ <wiki:Link context="upload" accessKey="a" title="<fmt:message key='actions.attach.title'/>" >
+ <fmt:message key='attach.tab'/>
+ <c:if test="${attachments > 0}">
+ <span class="badge">${ attachments }</span>
+ </c:if>
+ </wiki:Link>
+ </li>
+ </wiki:PageType>
+ </wiki:CheckRequestContext>
+
+ <%-- info --%>
+ <wiki:CheckRequestContext context='view|upload|rename|edit'>
+ <li id="info">
+ <wiki:Link context="info" accessKey="i">
+ <fmt:message key='info.tab'/>
+ </wiki:Link>
+ </li>
+ </wiki:CheckRequestContext>
+
+ <%-- edit --%>
+ <wiki:CheckRequestContext context='view|info|diff|upload|rename'>
+ <li id="edit"
+ class="<wiki:Permission permission='!edit'>disabled</wiki:Permission>">
+ <wiki:PageType type="page">
+ <wiki:Link context="edit" accessKey="e" title="<fmt:message key='actions.edit.title'/>" >
+ <fmt:message key='actions.edit'/>
+ </wiki:Link>
+ </wiki:PageType>
+ <wiki:PageType type="attachment">
+ <wiki:Link context="edit" page="<wiki:ParentPageName />" accessKey="e" title="<fmt:message key='actions.editparent'/>" >
+ <fmt:message key='actions.edit'/>
+ </wiki:Link>
+ </wiki:PageType>
+ </li>
+ </wiki:CheckRequestContext>
+
+
+ <%-- help slimbox-link --%>
+ <wiki:CheckRequestContext context='find'>
+ <li>
+ <a class="slimbox-link" href="<wiki:Link format='url' page='SearchPageHelp' ><wiki:Param name='skin' value='reader'/></wiki:Link>">
+ <fmt:message key="find.tab.help" />
+ </a>
+ </li>
+ </wiki:CheckRequestContext>
+ <wiki:CheckRequestContext context='edit|comment'>
+ <li>
+ <a class="slimbox-link" href="<wiki:Link format='url' page='EditPageHelp' ><wiki:Param name='skin' value='reader'/></wiki:Link>">
+ <fmt:message key="edit.tab.help" />
+ </a>
+ <%--
+ <wiki:NoSuchPage page="EditPageHelp">
+ <div class="error">
+ <fmt:message key="comment.edithelpmissing">
+ <fmt:param><wiki:EditLink page="EditPageHelp">EditPageHelp</wiki:EditLink></fmt:param>
+ </fmt:message>
+ </div>
+ </wiki:NoSuchPage>
+ --%>
+ </li>
+ </wiki:CheckRequestContext>
+ <wiki:CheckRequestContext context='login'>
+ <li>
+ <a class="slimbox-link" href="<wiki:Link format='url' page='LoginHelp' ><wiki:Param name='skin' value='reader'/></wiki:Link>">
+ <fmt:message key="login.tab.help" />
+ </a>
+ </li>
+ <%--
+ <wiki:NoSuchPage page="LoginHelp">
+ <div class="error">
+ <fmt:message key="login.loginhelpmissing">
+ <fmt:param><wiki:EditLink page="LoginHelp">LoginHelp</wiki:EditLink></fmt:param>
+ </fmt:message>
+ </div>
+ </wiki:NoSuchPage>
+ --%>
+ </wiki:CheckRequestContext>
+
+
+
+ <%-- more menu --%>
+ <li id="more">
+ <wiki:Link page="MoreMenu" >
+ <fmt:message key="actions.more"/><span class="caret"></span>
+ </wiki:Link>
+ <ul class="dropdown-menu pull-right" data-hover-parent="li">
+
+ <%-- VIEW RAW PAGE SOURCE --%>
+ <wiki:PageExists>
+ <wiki:CheckRequestContext context='view|info|diff|upload|edit|comment|preview' >
+ <li>
+ <wiki:CheckVersion mode="latest">
+ <%--FIXME: wiki:Link doesnt support class=".." yet ; should be changed to className=".." --%>
+ <a class="slimbox-link"
+ href="<wiki:Link format='url'><wiki:Param name='skin' value='raw'/></wiki:Link>"><fmt:message key='actions.rawpage' />
+ </a>
+ </wiki:CheckVersion>
+ <wiki:CheckVersion mode="notlatest">
+ <a class="slimbox-link"
+ href="<wiki:Link format='url' version='${param.version}'><wiki:Param name='skin' value='raw'/></wiki:Link>"><fmt:message key='actions.rawpage' />
+ </a>
+ </wiki:CheckVersion>
+ </li>
+ </wiki:CheckRequestContext>
+ </wiki:PageExists>
+
+ <%-- ADD COMMENT --%>
+ <wiki:CheckRequestContext context='view|info|diff|upload'>
+ <wiki:PageExists>
+ <wiki:Permission permission="comment">
+ <wiki:PageType type="page">
+ <li>
+ <wiki:Link context="comment" title="<fmt:message key='actions.comment.title' />">
+ <fmt:message key="actions.comment" />
+ </wiki:Link>
+ </li>
+ </wiki:PageType>
+ <wiki:PageType type="attachment">
+ <li>
+ <%--
+ <wiki:Link page="<wiki:ParentPageName />" context="comment" title="<fmt:message key='actions.comment.title' />">
+ <fmt:message key="actions.comment" />
+ </wiki:Link>
+ --%>
+ <wiki:LinkToParent><fmt:message key="actions.comment" /> To Parent</wiki:LinkToParent>
+ </li>
+ </wiki:PageType>
+ </wiki:Permission>
+ </wiki:PageExists>
+ </wiki:CheckRequestContext>
+
+ <%-- WORKFLOW --%>
+ <wiki:CheckRequestContext context='!workflow'>
+ <wiki:UserCheck status="authenticated">
+ <li>
+ <wiki:Link jsp='Workflow.jsp' title="<fmt:message key='actions.workflow.title' />">
+ <fmt:message key='actions.workflow' />
+ </wiki:Link>
+ </li>
+ </wiki:UserCheck>
+ </wiki:CheckRequestContext>
+
+ <%-- GROUPS --%>
+ <wiki:CheckRequestContext context='!creategroup' >
+ <wiki:Permission permission="createGroups">
+ <li>
+ <wiki:Link jsp="NewGroup.jsp" title="<fmt:message key='actions.creategroup.title' />">
+ <fmt:message key='actions.creategroup' />
+ </wiki:Link>
+ </li>
+ </wiki:Permission>
+ </wiki:CheckRequestContext>
+
+ <%-- divider --%>
+ <wiki:PageExists page="MoreMenu">
+
+ <wiki:CheckRequestContext context='view|info|diff|upload|edit|comment|prefs'>
+ <li class="divider "></li>
+ </wiki:CheckRequestContext>
+
+ <li class="more-menu"><wiki:InsertPage page="MoreMenu" /></li>
+ </wiki:PageExists>
+
+ </ul>
+ </li>
+
+</ul>
+
+</div>
+ <%--
+ <wiki:PageExists>
+ <wiki:PageType type="page">
+ <wiki:Tab id="attach" title="<%= attTitle %>" accesskey="a">
+ <wiki:Include page="AttachmentTab.jsp"/>
+ </wiki:Tab>
+ </wiki:PageType>
+
+ </wiki:PageExists>
+ --%>
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/NewGroupContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/NewGroupContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/NewGroupContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/NewGroupContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,102 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="java.security.Principal" %>
+<%@ page import="java.util.Arrays" %>
+<%@ page import="java.util.ResourceBundle" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.auth.PrincipalComparator" %>
+<%@ page import="org.apache.wiki.auth.authorize.Group" %>
+<%@ page import="org.apache.wiki.auth.authorize.GroupManager" %>
+<%@ page import="org.apache.wiki.util.TextUtil" %>
+<%@ page errorPage="/Error.jsp" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ // Extract the group name and members
+ String name = request.getParameter( "group" );
+
+ Group group = (Group)pageContext.getAttribute( "Group",PageContext.REQUEST_SCOPE );
+ Principal[] members = null;
+
+ if ( group != null )
+ {
+ name = group.getName();
+ members = group.members();
+ Arrays.sort( members, new PrincipalComparator() );
+ }
+
+ // FIXME : find better way to i18nize default group name
+ if ( "MyGroup".equals(name) )
+ {
+ name = LocaleSupport.getLocalizedMessage(pageContext, "newgroup.defaultgroupname");
+ }
+
+ name = TextUtil.replaceEntities(name);
+%>
+
+<div class="page-content">
+
+<h3><fmt:message key="newgroup.heading.create"/></h3>
+
+<wiki:Messages div='error' topic='<%=GroupManager.MESSAGES_KEY%>' prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"newgroup.errorprefix")%>' />
+
+ <form id="createGroup" action="<wiki:Link format="url" jsp="NewGroup.jsp"/>"
+ method="POST" accept-charset="UTF-8">
+
+ <div class="help-block">
+ <fmt:message key="newgroup.instructions.start"/>
+ </div>
+
+ <div class="form-group">
+ <label><fmt:message key="newgroup.name"/></label>
+ <input type="text" name="group" size="30" value="<%=name%>" />
+ <div class="help-block">
+ <fmt:message key="newgroup.name.description"/>
+ </div>
+ </div>
+
+ <!-- Members -->
+ <%
+ StringBuffer s = new StringBuffer();
+ for ( int i = 0; i < members.length; i++ )
+ {
+ s.append( members[i].getName().trim() );
+ s.append( '\n' );
+ }
+ %>
+ <div class="form-group">
+ <label><fmt:message key="group.members"/></label>
+ <textarea id="members" name="members" rows="10" cols="40"><%=TextUtil.replaceEntities(s.toString())%></textarea>
+ <div class="help-block">
+ <fmt:message key="newgroup.members.description"/>
+ </div>
+ </div>
+
+ <input class="btn btn-primary" type="submit" name="ok" value="<fmt:message key="newgroup.creategroup"/>" />
+ <input type="hidden" name="action" value="save" />
+ <div class="help-block">
+ <fmt:message key="newgroup.instructions.end"/>
+ </div>
+ </form>
+
+</div>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageContent.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageContent.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageContent.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,57 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.attachment.*" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ WikiContext c = WikiContext.findContext( pageContext );
+%>
+<%-- Main Content Section --%>
+<%-- This has been source ordered to come first in the markup (and on small devices)
+ but to be to the right of the nav on larger screens --%>
+<div class="page-content">
+
+ <wiki:Include page="PageTab.jsp"/>
+
+ <wiki:PageType type="attachment">
+ <div class="information">
+ <fmt:message key="info.backtoparentpage" >
+ <fmt:param><wiki:Link page="<wiki:ParentPageName/>" ><wiki:ParentPageName/></wiki:Link></fmt:param>
+ </fmt:message>
+ </div>
+ <div><%-- insert the actual attachement, image, etc... --%>
+ <wiki:Translate>[<%= c.getPage().getName()%>]</wiki:Translate>
+ </div>
+ </wiki:PageType>
+
+</div>
+<%--
+ <wiki:PageExists>
+ <wiki:PageType type="page">
+ <wiki:Tab id="attach" title="<%= attTitle %>" accesskey="a">
+ <wiki:Include page="AttachmentTab.jsp"/>
+ </wiki:Tab>
+ </wiki:PageType>
+ </wiki:PageExists>
+--%>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageInfo.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageInfo.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageInfo.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageInfo.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,48 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+
+<wiki:CheckRequestContext context='view|diff|edit|upload|info'>
+<div class="page-footer">
+ <wiki:PageExists>
+ <wiki:CheckVersion mode="latest">
+ <fmt:message key="info.lastmodified">
+ <fmt:param><wiki:PageVersion /></fmt:param>
+ <fmt:param><wiki:DiffLink version="latest" newVersion="previous"><wiki:PageDate format='${prefs["DateFormat"]}'/></wiki:DiffLink></fmt:param>
+ <fmt:param><wiki:Author /></fmt:param>
+ </fmt:message>
+ </wiki:CheckVersion>
+ <wiki:CheckVersion mode="notlatest">
+ <fmt:message key="actions.publishedon">
+ <fmt:param><wiki:PageDate format='${prefs["DateFormat"]}'/></fmt:param>
+ <fmt:param><wiki:Author /></fmt:param>
+ </fmt:message>
+ </wiki:CheckVersion>
+ <wiki:RSSImageLink mode="wiki" />
+ <a href="#top" title="<fmt:message key='actions.gototop'/>" class="btn">Top<span class="caret-up"><span></a>
+ </wiki:PageExists>
+
+ <wiki:NoSuchPage><fmt:message key="actions.notcreated"/></wiki:NoSuchPage>
+</div>
+</wiki:CheckRequestContext>
\ No newline at end of file
Added: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp?rev=1568367&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp (added)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp Fri Feb 14 17:24:32 2014
@@ -0,0 +1,116 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--%>
+
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.util.TextUtil" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %><%--CHECK why is this needed --%>
+<fmt:setLocale value="${prefs.Language}" />
+<fmt:setBundle basename="templates.default"/>
+<%
+ WikiContext c = WikiContext.findContext( pageContext );
+ WikiPage p = c.getPage();
+ String pagename = p.getName();
+ int thisVersion = p.getVersion();
+
+ /* check possible permalink (blogentry) pages */
+ String blogcommentpage="";
+ String mainblogpage="";
+ if( pagename.indexOf("_blogentry_") != -1 )
+ {
+ blogcommentpage = TextUtil.replaceString( pagename, "blogentry", "comments" );
+ mainblogpage = pagename.substring(0, pagename.indexOf("_blogentry_"));
+ }
+%>
+
+<%-- If the page is an older version, then offer a note and a possibility
+ to restore this version as the latest one. --%>
+<wiki:CheckVersion mode="notlatest">
+ <form action="<wiki:Link format='url' jsp='Wiki.jsp'/>"
+ method="get" accept-charset='UTF-8'>
+
+ <input type="hidden" name="page" value="<wiki:Variable var='pagename' />" />
+ <div class="error center">
+ <label>
+ <fmt:message key="view.oldversion">
+ <fmt:param>
+ <%--<wiki:PageVersion/>--%>
+ <select id="version" name="version" onchange="this.form.submit();" >
+<%
+ int latestVersion = c.getEngine().getPage( pagename, WikiProvider.LATEST_VERSION ).getVersion();
+
+ if( thisVersion == WikiProvider.LATEST_VERSION ) thisVersion = latestVersion; //should not happen
+ for( int i = 1; i <= latestVersion; i++)
+ {
+%>
+ <option value="<%= i %>" <%= ((i==thisVersion) ? "selected='selected'" : "") %> ><%= i %></option>
+<%
+ }
+%>
+ </select>
+ </fmt:param>
+ </fmt:message>
+ </label>
+ <div>
+ <a class="btn btn-primary" href="<wiki:Link format='url'/>">
+ <fmt:message key="view.backtocurrent"/>
+ </a>
+ <a class="btn btn-danger" href="<wiki:Link format='url' context='edit' version='<%= Integer.toString(thisVersion) %>'/>">
+ <fmt:message key="view.restore"/>
+ </a>
+ </div>
+ </div>
+
+ </form>
+</wiki:CheckVersion>
+
+<%-- Inserts no text if there is no page. --%>
+<wiki:InsertPage />
+
+
+<%-- Inserts blogcomment if appropriate
+<% if( !blogpage.equals("") ) { %>
+--%>
+
+<% if( ! mainblogpage.equals("") ) { %>
+<wiki:PageExists page="<%= mainblogpage%>">
+
+ <% if( ! blogcommentpage.equals("") ) { %>
+ <wiki:PageExists page="<%= blogcommentpage%>">
+ <div class="weblogcommentstitle"><fmt:message key="blog.commenttitle"/></div>
+ <div class="weblogcomments"><wiki:InsertPage page="<%= blogcommentpage%>" /></div>
+ </wiki:PageExists>
+ <% }; %>
+ <div class="information">
+ <wiki:Link page="<%= mainblogpage %>"><fmt:message key="blog.backtomain"/></wiki:Link>
+ <wiki:Link context="comment" page="<%= blogcommentpage%>" ><fmt:message key="blog.addcomments"/></wiki:Link>
+ </div>
+
+</wiki:PageExists>
+<% }; %>
+
+<wiki:NoSuchPage>
+ <%-- FIXME: Should also note when a wrong version has been fetched. --%>
+ <div class="information" >
+ <fmt:message key="common.nopage">
+ <fmt:param><wiki:EditLink><fmt:message key="common.createit"/></wiki:EditLink></fmt:param>
+ </fmt:message>
+ </div>
+</wiki:NoSuchPage>
\ No newline at end of file