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 2015/07/26 21:50:42 UTC
svn commit: r1692754 [2/2] - in /jspwiki/trunk/jspwiki-war/src/main:
config/wro/ java/org/apache/wiki/ java/org/apache/wiki/tags/
java/org/apache/wiki/ui/ java/org/apache/wiki/util/ resources/META-INF/
resources/templates/ scripts/behaviors/ scripts/mo...
Modified: 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=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupTab.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/GroupTab.jsp Sun Jul 26 19:50:41 2015
@@ -17,177 +17,162 @@
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.AuthorizationManager" %>
<%@ page import="org.apache.wiki.auth.PrincipalComparator" %>
<%@ page import="org.apache.wiki.auth.authorize.Group" %>
+<%@ page import="org.apache.wiki.auth.permissions.GroupPermission" %>
<%@ 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://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" %>
+<%@ page import="javax.servlet.jsp.jstl.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\":[" );
+<%
+ WikiContext c = WikiContext.findContext( pageContext );
- for( int j=0; j < m.length; j++ ) {
- ss.append( "\""+m[j].getName().trim()+"\"" );
- if(j+1 < m.length) ss.append( "," );
- }
+ // Extract the group name and members
+ //String name = request.getParameter( "group" );
+ //Group group = (Group)pageContext.getAttribute( "Group",PageContext.REQUEST_SCOPE );
+
+ AuthorizationManager authMgr = c.getEngine().getAuthorizationManager();
+ GroupManager groupMgr = c.getEngine().getGroupManager();
+
+ Principal[] groups = groupMgr.getRoles();
+ Arrays.sort( groups, new PrincipalComparator() );
+
+ String name = null;
+ Group group = null;
+ Principal[] members = null;
+ StringBuffer membersAsString = null;
- 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( "}" );
+%>
+<c:set var="groups" value="<%= groups %>" />
- return ss.toString();
+<wiki:CheckRequestContext context="!createGroup"><c:set var="createFormClose" value="-close"/></wiki:CheckRequestContext>
+<wiki:Permission permission="createGroups">
+ <form action="<wiki:Link format='url' jsp='NewGroup.jsp'/>"
+ class="accordion${createFormClose}"
+ method="post" accept-charset="<wiki:ContentEncoding />" >
- }
+ <h4><fmt:message key="newgroup.heading.create"/></h4>
+ <input type="hidden" name="action" value="save" />
-%>
-<wiki:Messages div="error" topic="<%=GroupManager.MESSAGES_KEY%>" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"group.errorprefix")%>'/>
+ <fmt:message key='newgroup.errorprefix' var="msg"/>
+ <wiki:Messages div="alert alert-danger form-col-offset-20 form-col-50" topic="group" prefix="${msg}"/>
-<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">
+ <div class="form-group">
+ <label class="control-label form-col-20"><fmt:message key="group.name" /></label>
<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>
+ name="group" id="group"
+ placeholder="<fmt:message key="grp.newgroupname"/>" >
+ </div>
-<div class="form-group">
- <label class="control-label form-col-20"><fmt:message key="group.members" /></label>
+ <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="5" cols="30"
+ name="members" id="members" ></textarea>
+ </div>
+ <div class="help-block form-col-offset-20"><fmt:message key="editgroup.memberlist"/></div>
+ <%--<p class="help-block form-col-offset-20"><fmt:message key="grp.formhelp"/></p>--%>
- <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"/>'
- data-modal='<fmt:message key="grp.deletegroup.confirm"/>'
- xxonclick="confirm( '<fmt:message key="grp.deletegroup.confirm"/>' )
- && WikiGroup.onSubmit( this.form, '<wiki:Link format='url' jsp='DeleteGroup.jsp' />' );" />
- </wiki:Permission>
- </form>
+ <input class="btn btn-primary form-col-offset-20" type="submit" value="<fmt:message key='grp.savenewgroup'/>" />
- <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" );
---%>
+ </form>
+</wiki:Permission>
-</div>
\ No newline at end of file
+<wiki:CheckRequestContext context="!createGroup">
+ <fmt:message key='group.errorprefix' var="msg"/>
+ <wiki:Messages div="alert alert-danger" topic="group" prefix="${msg}" />
+</wiki:CheckRequestContext>
+
+<form action="<wiki:Link format='url' jsp='DeleteGroup.jsp'/>"
+ class="hidden"
+ name="deleteGroupForm" id="deleteGroupForm"
+ data-modal="<fmt:message key='grp.deletegroup.confirm'/>"
+ method="POST" accept-charset="UTF-8">
+ <input type="hidden" name="group" value="${group.name}" />
+ <input type="submit" name="ok" value="<fmt:message key="actions.deletegroup"/>" />
+</form>
+
+<div class="table-filter-sort-condensed-striped">
+ <table class="table">
+ <thead>
+ <th><fmt:message key="group.name"/></th>
+ <th><fmt:message key="group.members"/></th>
+ <th><fmt:message key="group.created"/></th>
+ <th><fmt:message key="group.thecreator"/></th>
+ <th><fmt:message key="group.modified"/></th>
+ <th><fmt:message key="group.themodifier"/></th>
+ <th><fmt:message key="group.actions"/></th>
+ </thead>
+ <tbody>
+ <%
+ for( int g = 0; g < groups.length; g++ )
+ {
+ if ( groups[g] instanceof GroupPrincipal )
+ {
+ name = groups[g].getName();
+ group = groupMgr.getGroup( name );
+ members = group.members();
+ Arrays.sort( members, new PrincipalComparator() );
+
+ membersAsString = new StringBuffer();
+ for ( int i = 0; i < members.length; i++ )
+ {
+ membersAsString.append( members[i].getName().trim() );
+ if( i+1 < members.length ){ membersAsString.append( ", " ); }
+ }
+
+ %>
+ <c:set var="group" value="<%= group %>" />
+ <c:set var="members" value="<%= membersAsString %>" />
+ <tr class="${param.group == group.name ? 'highlight' : ''}">
+ <%--<td><wiki:Link jsp='Group.jsp'><wiki:Param name='group' value='${group.name}'/>${group.name}</wiki:Link></td>--%>
+ <td><c:if test="${group.name =='Admin'}"><span class="icon-unlock-alt"></span></c:if> ${group.name}</td>
+ <td>${members}</td>
+
+ <td><fmt:formatDate value="${group.created}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" /></td>
+ <td>${group.creator}</td>
+ <td><fmt:formatDate value="${group.lastModified}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" /></td>
+ <td>${group.modifier}</td>
+
+ <td class="nowrap">
+ <%--
+ We can't use wiki:Permission, cause we are in a loop; so let's just borrow some code from PermissionTag.java
+ --%>
+ <c:if test='<%= authMgr.checkPermission( c.getWikiSession(), new GroupPermission( name, "edit" ) ) %>'>
+ <%-- <wiki:Permission permission="editGroup"> --%>
+ <a class="btn btn-xs btn-primary"
+ href="<wiki:Link format='url' jsp='EditGroup.jsp'><wiki:Param name='group' value='${group.name}' /></wiki:Link>" >
+ <fmt:message key="actions.editgroup" />
+ </a>
+ <%--</wiki:Permission>--%>
+ </c:if>
+
+ <c:if test='<%= authMgr.checkPermission( c.getWikiSession(), new GroupPermission( name, "delete" ) ) %>'>
+ <%-- <wiki:Permission permission="deleteGroup"> --%>
+ <button class="btn btn-xs btn-danger" onclick="document.deleteGroupForm.group.value ='${group.name}';document.deleteGroupForm.ok.click();">
+ <fmt:message key="actions.deletegroup"/>
+ </button>
+ <%--</wiki:Permission>--%>
+ </c:if>
+ </td>
+ </tr>
+ <%
+ } /* end of if-GroupPrincipal */
+ } /* end of for loop */
+ %>
+ </tbody>
+ </table>
+</div>
Modified: 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=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp Sun Jul 26 19:50:41 2015
@@ -52,7 +52,11 @@
<div class="pagename" title="<wiki:PageName />">
<wiki:CheckRequestContext context='view'><wiki:PageName /></wiki:CheckRequestContext>
- <wiki:CheckRequestContext context='!view'><wiki:Link><wiki:PageName/></wiki:Link></wiki:CheckRequestContext>
+ <wiki:CheckRequestContext context='!view'>
+ <wiki:CheckRequestContext context='viewGroup|createGroup|editGroup'><span class="icon-group"></span></wiki:CheckRequestContext>
+ <wiki:PageType type="attachment"><span class="icon-paper-clip"></span></wiki:PageType>
+ <wiki:Link><wiki:PageName/></wiki:Link>
+ </wiki:CheckRequestContext>
</div>
<div class="breadcrumb">
Modified: 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=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp Sun Jul 26 19:50:41 2015
@@ -17,7 +17,6 @@
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.*" %>
@@ -26,9 +25,11 @@
<%@ 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://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" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
<fmt:setLocale value="${prefs.Language}" />
<fmt:setBundle basename="templates.default"/>
<%
@@ -73,38 +74,30 @@
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;
+ 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 ... */
%>
+<%--
+FIXME
+When deleting an Attachment, the Delete.jsp still redirects to InfoContent.jsp, iso Upload.jsp !
+As we currently do not want to touch the top-level JSP's and keep them compatible with the
+defaul template, let's fix this here
+--%>
+<c:choose>
+<c:when test="${param.tab == 'attach'}"><wiki:Include page="AttachmentTab.jsp"/></c:when>
+<c:otherwise>
<div class="page-content">
<wiki:PageExists>
-
<wiki:PageType type="page">
-<%-- part 1 : normal wiki pages
-
- <wiki:TabbedSection defaultTab="info">
-
- FIXME!!! =>>> <wiki:TabbedSection defaultTab="${param.tab}">
- JSPWIKI-867) Deleting attachments should retain focus on the Attach
-
-
- <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><span class="badge"><wiki:PageVersion >1</wiki:PageVersion></span></fmt:param>
<fmt:param>
<a href="<wiki:DiffLink format='url' version='latest' newVersion='previous' />"
title="<fmt:message key='info.pagediff.title' />" >
@@ -142,7 +135,7 @@
<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" />
+ <input type="checkbox" name="references" id="references" checked="checked" />
<fmt:message key="info.updatereferrers"/>
</label>
</form>
@@ -168,19 +161,15 @@
</div>
- <div class="tabbedAccordion">
- <div class="tab-History">
- <%--
- <wiki:CheckVersion mode="first"><fmt:message key="info.noversions"/></wiki:CheckVersion>
- --%>
- <%-- if( itemcount > 1 ) { --%>
+ <div class="tabs">
+ <h4 id="history">History</h4>
<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="table-filter-hover-sort zebra-table">
- <table class="wikitable" >
+ <div class="table-filter-sort-condensed-striped">
+ <table class="table" >
<tr>
<th><fmt:message key="info.version"/></th>
<th><fmt:message key="info.date"/></th>
@@ -191,85 +180,76 @@
</tr>
<wiki:HistoryIterator id="currentPage">
- <% if( ( startitem == -1 ) ||
- ( ( currentPage.getVersion() > startitem )
- && ( currentPage.getVersion() <= startitem + pagesize ) ) )
- {
- %>
+ <c:set var="first" value="<%= startitem %>"/>
+ <c:set var="last" value="<%= startitem + pagesize %>"/>
+ <c:if test="${ first == -1 || ((currentPage.version > first ) && (currentPage.version <= last )) }">
<tr>
<td>
- <wiki:Link version="<%=Integer.toString(currentPage.getVersion())%>">
+ <wiki:Link version="${currentPage.version}">
<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 class="nowrap" jspwiki:sortvalue="${currentPage.lastModified.time}">
+ <fmt:formatDate value="${currentPage.lastModified}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
</td>
- <td class="nowrap text-right">
+
+ <td class="nowrap">
<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>
+ <td class="nowrap">
<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>
+ <c:set var="changenote" value="<%= (String)currentPage.getAttribute( WikiPage.CHANGENOTE ) %>" />
+ <td class="changenote">${changenote}</td>
</tr>
- <% } %>
+ </c:if>
</wiki:HistoryIterator>
</table>
</div>
${pagination}
- <%-- } /* itemcount > 1 */ --%>
- </div>
- <div class="tab-PageReferences">
- <table class="wikitable table-condensed">
+ <h4 id="page-refs">Page References</h4>
+ <table class="table">
<tr>
<th><fmt:message key="info.tab.incoming" /></th>
<th><fmt:message key="info.tab.outgoing" /></th>
</tr>
<tr>
<td>
- <div class="list-nostyle list-hover">
+ <div class="tree list-hover">
<wiki:Link><wiki:PageName /></wiki:Link>
<wiki:Plugin plugin="ReferringPagesPlugin" args="before='*' after='\n' " />
</div>
</td>
<td>
- <div class="list-nostyle list-hover">
+ <div class="tree list-hover">
<wiki:Plugin plugin="ReferredPagesPlugin" args="depth='1' type='local'" />
</div>
</td>
</tr>
- </table>
- </div>
+ </table>
<%-- DIFF section --%>
<wiki:CheckRequestContext context='diff'>
- <div class="tab-Difference">
+ <h4 data-activePane id="diff">Difference</h4>
<wiki:Include page="DiffTab.jsp"/>
- </div>
</wiki:CheckRequestContext>
</div>
-
</wiki:PageType>
@@ -277,12 +257,11 @@
<wiki:PageType type="attachment">
<%
int MAXATTACHNAMELENGTH = 30;
- String progressId = c.getEngine().getProgressManager().getNewProgressIdentifier();
%>
-
+<c:set var="progressId" value="<%= 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>"
+ <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/>"
@@ -315,7 +294,7 @@
<%--<input type="hidden" name="action" value="upload" />--%>
</div>
<div class="hidden form-col-offset-20 form-col-50 progress progress-striped active">
- <div class="progress-bar" data-progressid="<%=progressId%>" style="width: 100%;"></div>
+ <div class="progress-bar" data-progressid="${progressId}" style="width: 100%;"></div>
</div>
</form>
@@ -324,28 +303,34 @@
<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%>' />"
+
+<form action="<wiki:Link format='url' context='<%=WikiContext.DELETE%>' />"
class="form-group"
id="deleteForm"
method="post" accept-charset="<wiki:ContentEncoding />"
data-modal="<fmt:message key='info.confirmdelete'/>" >
- <input class="btn btn-danger" type="submit" name="delete-all" id="delete-all"
+ <c:set var="parentPage"><wiki:ParentPageName/></c:set>
+ <a class="btn btn-default" href="<wiki:Link page='${parentPage}' format='url' />" >
+ <fmt:message key="info.backtoparentpage" >
+ <fmt:param>${parentPage}</fmt:param>
+ </fmt:message>
+ </a>
+
+ <wiki:Permission permission="delete">
+ <input class="btn btn-danger" type="submit" name="delete-all" id="delete-all"
value="<fmt:message key='info.deleteattachment.submit' />" />
- </form>
-</wiki:Permission>
+ </wiki:Permission>
+</form>
-<%-- FIXME why not add pagination here - number of attach versions of one page limited ?--%>
+<%-- TODO why no pagination here - number of attach versions of one page limited ?--%>
<%--<h4><fmt:message key='info.attachment.history' /></h4>--%>
-
- <div class="table-filter-hover-sort slimbox-attachments">
+ <div class="slimbox-attachments table-filter-sort-condensed-striped">
<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.attachment.type"/></th>
+ <th><fmt:message key="info.attachment.name"/></th>
<th><fmt:message key="info.size"/></th>
<th><fmt:message key="info.date"/></th>
<th><fmt:message key="info.author"/></th>
@@ -358,31 +343,25 @@
</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><wiki:LinkTo version="${att.version}"><wiki:PageVersion /></wiki:LinkTo></td>
+
+ <%-- see styles/fontjspwiki/icon.less : icon-file-<....>-o --%>
+ <c:set var="parts" value="${fn:split(att.fileName, '.')}" />
+ <c:set var="type" value="${ fn:length(parts)>1 ? parts[fn:length(parts)-1] : ''}" />
+ <td class="attach-type"><span class="icon-file-${type}-o">${type}</span></td>
+
+ <td class="attach-name">${att.fileName}</td>
+
+ <td class="nowrap">
+ <fmt:formatNumber value='${att.size/1000.0}' 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 class="nowrap" jspwiki:sortvalue="${att.lastModified.time}">
+ <fmt:formatDate value="${att.lastModified}" 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.
@@ -394,10 +373,10 @@
</td>
</wiki:Permission>
--%>
- <td class='changenote'>
- <% String changenote = (String) att.getAttribute( WikiPage.CHANGENOTE ); %>
- <%= (changenote==null) ? "" : changenote %>
- </td>
+
+ <c:set var="changenote" value="<%= (String)att.getAttribute( WikiPage.CHANGENOTE ) %>" />
+ <td class="changenote">${changenote}</td>
+
</tr>
</wiki:HistoryIterator><%-- </wiki:AttachmentsIterator> --%>
@@ -415,3 +394,6 @@
</wiki:NoSuchPage>
</div>
+
+</c:otherwise>
+</c:choose>
Modified: 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=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/LoginContent.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/LoginContent.jsp Sun Jul 26 19:50:41 2015
@@ -17,30 +17,30 @@
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://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" %>
<%@ 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();
+ String loginURL = "";
if( mgr.isContainerAuthenticated() )
{
- postURL = "j_security_check";
+ loginURL = "j_security_check";
}
else
{
String redir = (String)ctx.getVariable("redirect");
if( redir == null ) redir = ctx.getEngine().getFrontPage();
- postURL = ctx.getURL( WikiContext.LOGIN, redir );
+ loginURL = ctx.getURL( WikiContext.LOGIN, redir );
}
%>
@@ -51,56 +51,82 @@
<wiki:UserCheck status="notauthenticated">
<%--<wiki:Include page='LoginTab.jsp'/>--%>
-<div class="accordion center form-col-50">
+<div class="tabs" >
-<h3><fmt:message key="login.heading.login"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message></h3>
+<h3 id="section-login"><fmt:message key="login.tab"/></h3>
-<form action="<%=postURL%>"
+<form action="<%= loginURL %>"
id="login"
- class=""
+ class="login-form"
method="post" accept-charset="<wiki:ContentEncoding />" >
+ <p class="login-header">
+ <fmt:message key="login.heading.login">
+ <fmt:param><wiki:Variable var="applicationname" /></fmt:param>
+ </fmt:message>
+ </p>
<%--<div class="help-block"><fmt:message key="login.help"></fmt:message></div>--%>
- <wiki:Messages div="error from-group" topic="login"
- prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"login.errorprefix")%>' />
+ <fmt:message key="login.errorprefix" var="msg"/>
+ <wiki:Messages div="alert alert-danger" topic="login" prefix="${msg}" />
<div class="form-group">
- <%--<label class="control-label form-col-20" for="j_username"><fmt:message key="login.login"/></label>--%>
- <input autofocus="autofocus" class="form-control xform-col-50" type="text" size="24" value="<wiki:Variable var='uid' default='' />"
- placeholder="<fmt:message key='login.login'/>"
- name="j_username" id="j_username" />
+ <input class="form-control"
+ value="<wiki:Variable var='uid' default='' />"
+ placeholder="<fmt:message key='login.login'/>"
+ type="text" size="24" autofocus="autofocus" name="j_username" id="j_username" />
</div>
+
<div class="form-group">
- <%--<label class="control-label form-col-20"for="j_password"><fmt:message key="login.password"/></label>--%>
- <input class="form-control xform-col-50" type="password" size="24"
- placeholder="<fmt:message key='login.password'/>"
- name="j_password" id="j_password" />
+ <input class="form-control"
+ placeholder="<fmt:message key='login.password'/>"
+ type="password" size="24" name="j_password" id="j_password" />
</div>
+
+ <div class="form-group clearfix"><%-- need clearfix ico no-cookies-auth allowed; ensure the right floated btn gets proper spacing -- ugh! --%>
<c:if test="${allowsCookieAuthentication}">
- <div class="form-group">
- <label class="control-label xform-col-20" for="j_remember"><fmt:message key="login.remember"/></label>
- <input type="checkbox"
- name="j_remember" id="j_remember" />
- </div>
+ <label class="btn" for="j_remember">
+ <input type="checkbox" name="j_remember" id="j_remember" />
+ <fmt:message key="login.remember"/>
+ </label>
</c:if>
+
+ <a class="btn btn-link pull-right" href="#section-lostpw"><fmt:message key="login.lostpw" /></a>
+ </div>
+
<div class="form-group">
- <input type="hidden" name="redirect" value="<wiki:Variable var='redirect' default='' />" />
- <input class="btn btn-primary btn-block xform-col-offset-20" type="submit" name="submitlogin" value="<fmt:message key='login.submit.login'/>" />
+ <input type="hidden" name="redirect" value="<wiki:Variable var='redirect' default='' />" />
+ <input class="btn btn-primary btn-block"
+ type="submit" name="submitlogin" value="<fmt:message key='login.submit.login'/>" />
</div>
+ <hr />
+
+ <%--CHECKME only allow to register new uses when no container auth !? --%>
+ <%-- <wiki:UserProfile property="canChangeLoginName"> --%>
+ <p class="login-ref">
+ <fmt:message key="login.nopassword"/>
+ <a class="" href="#section-register">
+ <fmt:message key="login.registernow">
+ <fmt:param><wiki:Variable var="applicationname" /></fmt:param>
+ </fmt:message>
+ </a>
+ </p>
+ <%-- </wiki:UserProfile> --%>
+
</form>
<%-- Lost pasword functionality --%>
-<h3><%=LocaleSupport.getLocalizedMessage(pageContext, "login.lostpw.tab")%></h3>
+<c:set var="lostpwTab" value="${param.tab == 'lostpassword' ? 'data-activePane': ''}"/>
+<h3 ${lostpwTab} id="section-lostpw"><fmt:message key="login.lostpw.tab"/></h3>
<form action="<wiki:Link jsp='LostPassword.jsp' format='url'><wiki:Param name='tab' value='lostpassword'/></wiki:Link>"
id="lostpw"
- class=""
+ class="login-form"
method="post" accept-charset="<wiki:ContentEncoding />" >
- <%--<h3><fmt:message key="login.lostpw.heading" /></h3>--%>
+ <p class="login-header"><fmt:message key="login.lostpw.title" /></p>
<c:choose>
<c:when test="${passwordreset == 'done' }">
@@ -112,46 +138,44 @@
</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")%>' />
+ <div class="form-group help-block">
+ <fmt:message key="login.errorprefix" var="msg"/>
+ <wiki:Messages div="alert alert-danger" topic="resetpw" prefix="${msg}" />
<wiki:Messages div="information" topic="resetpwok" />
- </div>
+ </div>
</c:if>
<div class="form-group">
- <%--<label class="control-label form-col-20" for="name"><fmt:message key="login.lostpw.name"/></label>--%>
- <input class="form-control xform-col-50" type="text" size="24"
- placeholder="<fmt:message key='login.lostpw.name'/>"
- name="name" id="name" />
+ <p class="help-block"><fmt:message key="login.lostpw.help"></fmt:message></p>
+ <%--<label class="control-label" for="name"><fmt:message key="login.lostpw.name"/></label>--%>
+ <input class="form-control" type="text" size="24"
+ placeholder="<fmt:message key='login.lostpw.name'/>"
+ name="name" id="name" />
</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 btn-block xform-col-offset-20" type="submit" name="Submit" value="<fmt:message key='login.lostpw.submit'/>" />
+ <input type="hidden" name="action" value="resetPassword"/>
+ <input class="btn btn-primary btn-block" 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>
---%>
+ <hr />
+
+ <p class="login-ref">
+ <fmt:message key="login.invite"/>
+ <a href="#section-login"
+ title="<fmt:message key='login.title'/>" >
+ <fmt:message key="login.heading.login"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message>
+ </a>
+ </p>
+ <p class="login-ref">
+ <fmt:message key="login.nopassword"/>
+ <a class="" href="#section-register">
+ <fmt:message key="login.registernow">
+ <fmt:param><wiki:Variable var="applicationname" /></fmt:param>
+ </fmt:message>
+ </a>
+ </p>
+
</c:otherwise>
</c:choose>
@@ -160,13 +184,95 @@
</wiki:UserCheck>
<%-- Register new user profile --%>
-
<wiki:Permission permission='editProfile'>
-<h3><%=LocaleSupport.getLocalizedMessage(pageContext, "login.register.tab")%></h3>
- <wiki:Include page='ProfileTab.jsp'/>
-</wiki:Permission>
+<c:set var="registerTab" value="${param.tab == 'register' ? 'data-activePane': ''}"/>
+<h3 ${registerTab} id="section-register"><fmt:message key="login.register.tab" /></h3>
-</div>
+<%-- <wiki:Include page='ProfileTab.jsp'/> --%>
+<form action="<wiki:Link jsp='Login.jsp' format='url'><wiki:Param name='tab' value='register'/></wiki:Link>"
+ id="editProfile"
+ class="login-form"
+ method="post" accept-charset="UTF-8">
+
+ <input type="hidden" name="redirect" value="<wiki:Variable var='redirect' default='' />" />
+
+ <p class="login-header"><fmt:message key="login.registernow.title" /></p>
+
+ <fmt:message key="prefs.errorprefix.profile" var="msg"/>
+ <wiki:Messages div="alert alert-danger" topic="profile" prefix="${msg}" />
+
+ <%-- Login name --%>
+ <%-- TODO: can be simplified in case of registering a new user --%>
+ <div class="form-group">
+ <wiki:UserProfile property="canChangeLoginName">
+ <input class="form-control" type="text" name="loginname" id="loginname" size="20"
+ placeholder="<fmt:message key='prefs.loginname' />"
+ value="<wiki:UserProfile property='loginname' />" />
+ </wiki:UserProfile>
+
+ <wiki:UserProfile property="!canChangeLoginName">
+ <!-- If user can't change their login name, it's because the container manages the login -->
+ <wiki:UserProfile property="new">
+ <div class="warning"><fmt:message key="prefs.loginname.cannotset.new"/></div>
+ </wiki:UserProfile>
+ <wiki:UserProfile property="exists">
+ <span class="form-control-static"><wiki:UserProfile property="loginname"/></span>
+ <div class="warning"><fmt:message key="prefs.loginname.cannotset.exists"/></div>
+ </wiki:UserProfile>
+ </wiki:UserProfile>
+ </div>
+
+ <%-- Password field; not displayed if container auth used --%>
+ <wiki:UserProfile property="canChangePassword">
+ <div class="form-group">
+ <input class="form-control" type="password" name="password" id="password" size="20"
+ placeholder="<fmt:message key='prefs.password' />"
+ value="" />
+ </div>
+ <div class="form-group">
+ <input class="form-control" type="password" name="password2" id="password2" size="20"
+ placeholder="<fmt:message key='prefs.password2' />"
+ value="" />
+ <%-- FFS: extra validation ? min size, allowed chars? password-strength js check --%>
+ </div>
+ </wiki:UserProfile>
+
+ <%-- Full name --%>
+ <div class="form-group">
+ <input class="form-control" type="text" name="fullname" id="fullname" size="20"
+ placeholder="<fmt:message key='prefs.fullname'/>"
+ value="<wiki:UserProfile property='fullname' />" />
+ <p class="help-block"><fmt:message key="prefs.fullname.description"/></p>
+ </div>
+
+ <%-- E-mail --%>
+ <div class="form-group">
+ <input class="form-control" type="text" name="email" id="email" size="20"
+ placeholder="<fmt:message key='prefs.email'/>"
+ value="<wiki:UserProfile property='email' />" />
+ <p class="help-block"><fmt:message key="prefs.email.description"/></p>
+ </div>
+
+ <div class="form-group">
+ <button class="btn btn-primary btn-block" type="submit" name="action" value="saveProfile">
+ <fmt:message key='prefs.newprofile' />
+ </button>
+ </div>
+
+ <hr />
+
+ <p class="login-ref">
+ <fmt:message key="login.invite"/>
+ <a href="#section-login"
+ title="<fmt:message key='login.title'/>" >
+ <fmt:message key="login.heading.login"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message>
+ </a>
+ </p>
+
+</form>
+
+</wiki:Permission>
</div>
+</div>
\ No newline at end of file
Modified: 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=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp Sun Jul 26 19:50:41 2015
@@ -56,28 +56,19 @@
</li>
</wiki:CheckRequestContext>
--%>
- <wiki:PageType type="attachment">
- <li>
- <wiki:LinkToParent><%-- <wiki:Link page="<wiki:ParentPageName/>" > --%>
- <fmt:message key="info.backtoparentpage" >
- <fmt:param><span class="label label-info label-sm"><wiki:ParentPageName/></span></fmt:param>
- </fmt:message>
- </wiki:LinkToParent>
- </li>
- </wiki:PageType>
<%-- attachment --%>
- <wiki:CheckRequestContext context='view|info|rename|edit'>
- <wiki:PageType type="page">
+ <wiki:CheckRequestContext context='view|info|diff|rename|edit'>
<li id="attach">
- <wiki:Link context="upload" accessKey="a" >
- <fmt:message key='attach.tab'/>
- <c:if test="${attachments > 0}">
- <span class="badge">${ attachments }</span>
- </c:if>
+ <c:set var="page">
+ <wiki:PageType type="page"><wiki:PageName/></wiki:PageType>
+ <wiki:PageType type="attachment"><wiki:ParentPageName/></wiki:PageType>
+ </c:set>
+ <wiki:Link page="${page}" context="upload" accessKey="a" >
+ <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 --%>
@@ -221,7 +212,7 @@
<wiki:Permission permission="comment">
<wiki:PageType type="page">
<li>
- <wiki:Link context="comment" title="<fmt:message key='actions.comment.title' />">
+ <wiki:Link context="comment">
<fmt:message key="actions.comment" />
</wiki:Link>
</li>
@@ -244,14 +235,14 @@
<wiki:CheckRequestContext context='!workflow'>
<wiki:UserCheck status="authenticated">
<li>
- <wiki:Link jsp='Workflow.jsp' title="<fmt:message key='actions.workflow.title' />">
+ <wiki:Link jsp="Workflow.jsp">
<fmt:message key='actions.workflow' />
</wiki:Link>
</li>
</wiki:UserCheck>
</wiki:CheckRequestContext>
- <%-- GROUPS --%>
+ <%-- GROUPS : moved to the UserBox.jsp
<wiki:CheckRequestContext context='!creategroup' >
<wiki:Permission permission="createGroups">
<li>
@@ -261,11 +252,12 @@
</li>
</wiki:Permission>
</wiki:CheckRequestContext>
+ --%>
<%-- divider --%>
<wiki:PageExists page="MoreMenu">
- <wiki:CheckRequestContext context='view|info|diff|upload|workflow|createGroup'>
+ <wiki:CheckRequestContext context='view|info|diff|upload|createGroup'>
<li class="divider "></li>
</wiki:CheckRequestContext>
<wiki:CheckRequestContext context='prefs|edit'>
Modified: 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=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/NewGroupContent.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/NewGroupContent.jsp Sun Jul 26 19:50:41 2015
@@ -14,89 +14,8 @@
"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.
+ 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
+<wiki:Include page="PreferencesContent.jsp" ></wiki:Include>
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesContent.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesContent.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesContent.jsp Sun Jul 26 19:50:41 2015
@@ -17,37 +17,42 @@
under the License.
--%>
-<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
<%@ page import="org.apache.wiki.*" %>
<%@ page import="org.apache.wiki.ui.*" %>
+<%@ 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" %>
<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
<fmt:setLocale value="${prefs.Language}" />
<fmt:setBundle basename="templates.default"/>
-<%
- WikiContext context = WikiContext.findContext( pageContext );
- TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT,
- context.getURL( WikiContext.NONE, "scripts/haddock-prefs.js" ) );
-%>
+
<div class="page-content">
-<div class="rightAccordion">
+<div class="tabs">
- <h3><fmt:message key="prefs.tab.prefs" /></h3>
+ <h3 id="section-prefs">
+ <fmt:message key="prefs.tab.prefs" />
+ </h3>
<wiki:Include page="PreferencesTab.jsp" />
<%-- <wiki:UserCheck status="authenticated"> --%>
<wiki:Permission permission="editProfile">
- <%-- <wiki:UserProfile property="exists"> --%>
- <h3><fmt:message key="prefs.tab.profile"/></h3>
+ <wiki:UserProfile property="exists">
+ <c:set var="profileTab" value="${param.tab == 'profile' ? 'data-activePane' : ''}"/>
+ <h3 ${profileTab} id="section-profile"><fmt:message key="prefs.tab.profile"/></h3>
<wiki:Include page="ProfileTab.jsp" />
<%-- <%=LocaleSupport.getLocalizedMessage(pageContext, "prefs.tab.profile")%> --%>
- <%-- </wiki:UserProfile> --%>
+ </wiki:UserProfile>
</wiki:Permission>
<%-- </wiki:UserCheck> --%>
- <wiki:Permission permission="createGroups"> <%-- FIXME check right permissions --%>
- <h3><fmt:message key="group.tab" /></h3>
+ <wiki:Permission permission="createGroups"><%-- use WikiPermission --%>
+ <c:set var="groupTab" value="${param.tab == 'groups' ? 'data-activePane' : ''}"/>
+ <wiki:CheckRequestContext context='viewGroup|editGroup|createGroup'>
+ <c:set var="groupTab">data-activePane</c:set>
+ </wiki:CheckRequestContext>
+ <h3 ${groupTab} id="section-groups"><fmt:message key="group.tab" /></h3>
<wiki:Include page="GroupTab.jsp" />
+
</wiki:Permission>
</div>
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp Sun Jul 26 19:50:41 2015
@@ -44,8 +44,7 @@
%>
<form action="<wiki:Link jsp='UserPreferences.jsp' format='url'><wiki:Param name='tab' value='prefs'/></wiki:Link>"
- class=""
- id="preferences" <%-- setCookie --%>
+ id="preferences" <%-- see Prefs.js; setCookie --%>
method="post" accept-charset="<wiki:ContentEncoding />" >
<input type="hidden" name="redirect" value="<wiki:Variable var='redirect' default='' />" />
@@ -53,6 +52,7 @@
<div class="form-group ">
<span class="form-col-20 control-label"></span>
+
<span class="dropdown" style="display:inline-block" >
<button class="btn btn-primary" type="submit" name="action" value="setAssertedName">
<fmt:message key='prefs.save.prefs.submit'/>
@@ -76,7 +76,8 @@
<c:if test="${param.tab eq 'prefs'}" >
<div class="">
<span class="form-col-20 control-label"></span>
- <wiki:Messages div="error form-col-50" topic="prefs" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"prefs.errorprefix.prefs")%>'/>
+ <fmt:message key="prefs.errorprefix.prefs" var="msg"/>
+ <wiki:Messages div="alert alert-danger form-col-50" topic="prefs" prefix="${msg}" />
</div>
</c:if>
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp Sun Jul 26 19:50:41 2015
@@ -17,11 +17,11 @@
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.user.*" %>
<%@ page errorPage="/Error.jsp" %>
+<%@ 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" %>
<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
@@ -37,7 +37,7 @@
action="<wiki:CheckRequestContext
context='login'><wiki:Link jsp='Login.jsp' format='url'><wiki:Param name='tab'
value='profile'/></wiki:Link></wiki:CheckRequestContext><wiki:CheckRequestContext
- context='prefs'><wiki:Link jsp='UserPreferences.jsp' format='url'><wiki:Param name='tab'
+ context='!login'><wiki:Link jsp='UserPreferences.jsp' format='url'><wiki:Param name='tab'
value='profile'/></wiki:Link></wiki:CheckRequestContext>"
class=""
id="editProfile">
@@ -63,7 +63,15 @@
<c:if test="${param.tab eq 'profile'}" >
<div class="">
<span class="form-col-20 control-label"></span>
- <wiki:Messages div="error form-col-50" topic="profile" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"prefs.errorprefix.profile")%>'/>
+ <fmt:message key="prefs.errorprefix.profile" var="msg"/>
+ <wiki:Messages div="alert alert-danger form-col-50" topic="profile" prefix="${msg}" />
+ <%-- seems not to work .?
+ <wiki:Messages div="error form-col-50" prefix="<fmt:message key='prefs.errorprefix.profile' />" topic="profile" />
+ this is ok..
+ <wiki:Messages div="error form-col-50" topic="profile" >
+ <jsp:attribute name="prefix" ><fmt:message key="prefs.errorprefix.profile"/></jsp:attribute>
+ </wiki:Messages>
+ --%>
</div>
</c:if>
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/UserBox.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/UserBox.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/UserBox.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/UserBox.jsp Sun Jul 26 19:50:41 2015
@@ -61,35 +61,50 @@
<li class="dropdown-header">
<%--
+ user preferences button
+ --%>
+ <wiki:CheckRequestContext context='!prefs'>
+ <wiki:CheckRequestContext context='!preview'>
+ <a href="<wiki:Link jsp='UserPreferences.jsp' format='url' ><wiki:Param name='redirect' value='${redirect}'/></wiki:Link>"
+ class="btn btn-default btn-block">
+ <fmt:message key="actions.prefs" />
+ </a>
+ <wiki:Permission permission="createGroups">
+ <a href="<wiki:Link jsp='UserPreferences.jsp' format='url' ><wiki:Param name='redirect' value='${redirect}'/><wiki:Param name='tab' value='groups'/></wiki:Link>"
+ class="btn btn-default btn-block icon-group" >
+ <fmt:message key="actions.groups" />
+ </a>
+ </wiki:Permission>
+ </wiki:CheckRequestContext>
+ </wiki:CheckRequestContext>
+ <%--
login button
--%>
<wiki:UserCheck status="notAuthenticated">
<wiki:CheckRequestContext context='!login'>
<wiki:Permission permission="login">
- <a href="<wiki:Link jsp='Login.jsp' format='url'><wiki:Param name='redirect' value='${redirect}'/></wiki:Link>"
- class="btn btn-primary btn-block login icon-signin"
- <%-- title="<fmt:message key='actions.login.title'/>" --%> ><fmt:message key="actions.login"/></a>
+ <a href="<wiki:Link jsp='Login.jsp' format='url' ><wiki:Param name='redirect' value='${redirect}'/></wiki:Link>"
+ class="btn btn-primary btn-block login icon-signin">
+ <fmt:message key="actions.login" />
+ </a>
+ </wiki:Permission>
+ <wiki:Permission permission='editProfile'>
+ <a href="<wiki:Link jsp='Login.jsp' format='url' ><wiki:Param name='redirect' value='${redirect}'/><wiki:Param name='tab' value='register'/></wiki:Link>"
+ class="btn btn-link btn-block register">
+ <fmt:message key="actions.registernow" />
+ </a>
</wiki:Permission>
</wiki:CheckRequestContext>
</wiki:UserCheck>
<%--
- user preferences button
- --%>
- <wiki:CheckRequestContext context='!prefs'>
- <wiki:CheckRequestContext context='!preview'>
- <a href="<wiki:Link jsp='UserPreferences.jsp' format='url' ><wiki:Param name='redirect' value='${redirect}'/></wiki:Link>"
- class="btn btn-default btn-block prefs"
- <%-- title="<fmt:message key='actions.prefs.title'/>" --%> ><fmt:message key="actions.prefs" /></a>
- </wiki:CheckRequestContext>
- </wiki:CheckRequestContext>
- <%--
logout button
--%>
<wiki:UserCheck status="authenticated">
<a href="<wiki:Link jsp='Logout.jsp' format='url' />"
class="btn btn-default btn-block logout icon-signout"
- <%-- title="<fmt:message key='actions.logout.title'/>" --%>
- data-modal="<fmt:message key='actions.confirmlogout'/>"><fmt:message key="actions.logout"/></a>
+ data-modal="<fmt:message key='actions.confirmlogout'/>">
+ <fmt:message key="actions.logout"/>
+ </a>
</wiki:UserCheck>
</li>
</ul>
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp Sun Jul 26 19:50:41 2015
@@ -23,7 +23,7 @@
<%@ page import="org.apache.wiki.*" %>
<fmt:setBundle basename="templates.default"/>
<!doctype html>
-<html lang="en" name="top">
+<html lang="${prefs.Language}" name="top">
<head>
<title>
@@ -51,6 +51,10 @@
<wiki:Include page="Header.jsp" />
<wiki:Include page="Nav.jsp" />
<c:set var="sidebar"><wiki:Variable var='sidebar' /></c:set>
+ <wiki:CheckRequestContext context='login|prefs|createGroup|viewGroup'>
+ <c:set var="sidebar">off</c:set>
+ </wiki:CheckRequestContext>
+
<div class="content <c:if test='${sidebar != "off"}'>active</c:if>" data-toggle="li#menu,.sidebar>.close">
<div class="page">
<wiki:Content/>
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/WorkflowContent.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/WorkflowContent.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/WorkflowContent.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/WorkflowContent.jsp Sun Jul 26 19:50:41 2015
@@ -14,7 +14,7 @@
"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.
+ under the License.
--%>
<%@ page errorPage="/Error.jsp" %>
@@ -22,164 +22,163 @@
<%@ 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" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
<fmt:setLocale value="${prefs.Language}" />
<fmt:setBundle basename="templates.default"/>
-<script language="JavaScript">
- function SubmitOutcomeIfSelected(selectId)
- {
- if ( selectId.selectedIndex > 0 )
- {
- // alert(selectId.selectedIndex);
- selectId.form.submit();
- }
- }
-</script>
-<%
- int i = 0;
- String evenOdd;
-%>
-<div class="page-content">
+<div class="page-content table-filter-sort">
+
+<wiki:UserCheck status="authenticated">
<h3><fmt:message key="workflow.heading" /></h3>
<p><fmt:message key="workflow.instructions"/></p>
-<!-- Pending Decisions -->
-<h4><fmt:message key="workflow.decisions.heading" /></h4>
+<%-- Pending Decisions --%>
+<div class="tabs">
+<h4>
+ <fmt:message key="workflow.decisions.heading" />
+ <span class="badge">${empty decisions ? "empty" : fn:length(decisions)}</span>
+</h4>
<c:if test="${empty decisions}">
- <div class="information">
- <fmt:message key="workflow.noinstructions"/>
- </div>
+ <div class="information"><fmt:message key="workflow.noinstructions"/></div>
</c:if>
<c:if test="${!empty decisions}">
- <div class="help-block">
- <fmt:message key="workflow.actor.instructions"/>
- </div>
- <table class="">
- <thead>
- <th width="5%" align="center"><fmt:message key="workflow.id"/></th>
- <th width="45%" align="left"><fmt:message key="workflow.item"/></th>
- <th width="15%" align="left"><fmt:message key="workflow.actions"/></th>
- <th width="15%" align="left"><fmt:message key="workflow.requester"/></th>
- <th width="20%" align="left"><fmt:message key="workflow.startTime"/></th>
+
+ <p><fmt:message key="workflow.actor.instructions"/></p>
+
+ <table class="table table-striped table-condensed">
+ <thead><%-- 5/45/15/15/20--%>
+ <th><fmt:message key="workflow.id"/></th>
+ <th><fmt:message key="workflow.item"/></th>
+ <th><fmt:message key="workflow.requester"/></th>
+ <th><fmt:message key="workflow.startTime"/></th>
+ <th><fmt:message key="workflow.actions"/></th>
</thead>
<tbody>
- <% i = 1; %>
<c:forEach var="decision" items="${decisions}">
- <% evenOdd = (i % 2 == 0) ? "even" : "odd"; %>
- <tr class="<%=evenOdd%>">
- <!-- Workflow ID -->
- <td align="center"><c:out value="${decision.workflow.id}"/></td>
- <!-- Name of item -->
- <td align="left">
+ <tr>
+
+ <%-- Workflow ID --%>
+ <td>${decision.workflow.id}</td>
+
+ <%-- Name of item --%>
+ <td>
<fmt:message key="${decision.messageKey}">
<c:forEach var="messageArg" items="${decision.messageArguments}">
- <fmt:param><c:out value="${messageArg}"/></fmt:param>
+ <fmt:param>${messageArg}</fmt:param>
</c:forEach>
</fmt:message>
</td>
- <!-- Possible actions (outcomes) -->
- <td align="left">
- <form id="<c:out value='decision.${decision.id}'/>"
- action="<wiki:Link jsp='Workflow.jsp' format='url'/>" method="POST" accept-charset="UTF-8">
+
+ <%-- Requester --%>
+ <td>${decision.owner.name}</td>
+
+ <%-- When did the actor start this step? --%>
+ <td>
+ <fmt:formatDate value="${decision.startTime}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
+ </td>
+
+ <%-- Possible actions (outcomes) --%>
+ <td class="nowrap">
+ <form action="<wiki:Link jsp='Workflow.jsp' format='url'/>"
+ id="decision.${decision.id}"
+ method="POST" accept-charset="UTF-8">
<input type="hidden" name="action" value="decide" />
- <input type="hidden" name="id" value="<c:out value='${decision.id}' />" />
- <select name="outcome" onchange="SubmitOutcomeIfSelected(this)">
- <option value="-"><fmt:message key="select.one"/></option>
- <c:forEach var="outcome" items="${decision.availableOutcomes}"><option value="${outcome.messageKey}"><fmt:message key="${outcome.messageKey}"/></option>
- </c:forEach>
- </select>
+ <input type="hidden" name="id" value="${decision.id}" />
+ <c:forEach var="outcome" items="${decision.availableOutcomes}">
+ <button class="btn btn-xs btn-default" type="submit" name="outcome" value="${outcome.messageKey}">
+ <fmt:message key="${outcome.messageKey}"/>
+ </button>
+ </c:forEach>
</form>
</td>
- <!-- Requester -->
- <td align="left"><c:out value="${decision.owner.name}"/></td>
- <!-- When did the actor start this step? -->
- <td align="left">
- <fmt:formatDate value="${decision.startTime}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
- </td>
+
</tr>
- <!-- Hidden row with Decision details, if there are any -->
+
<c:if test="${!empty decision.facts}">
- <tr class="<%=evenOdd%>" class="hideDiv">
- <td> </td>
- <td colspan="4" class="split">
- <a href="#"
- title="<fmt:message key='workflow.details.title' />"
- onclick="$('decision.<c:out value="${decision.workflow.id}"/>').toggle();" >
- <fmt:message key="workflow.details" />
- </a>
- <div class="hideDiv" id="<c:out value='decision.${decision.workflow.id}'/>">
+ <tr class="workflow-details">
+ <td colspan="5">
<c:forEach var="fact" items="${decision.facts}">
- <h5><fmt:message key="${fact.messageKey}" /></h5>
- <p><c:out escapeXml="false" value="${fact.value}"/></p>
+ <p><fmt:message key="${fact.messageKey}" /></p>
+ <pre><c:out escapeXml="false" value="${fn:trim(fact.value)}" /></pre>
+ <%-- may contain a full dump for a version diff, ico save-wiki-page approval flow --%>
</c:forEach>
- </div>
- </td>
- </tr>
+ </td>
+ </tr>
</c:if>
-
- <% i++; %>
+
</c:forEach>
</tbody>
</table>
</c:if>
<!-- Running workflows for which current user is the owner -->
-<h4><fmt:message key="workflow.workflows.heading" /></h4>
+<h4>
+ <fmt:message key="workflow.workflows.heading" />
+ <span class="badge">${empty workflows ? "empty" : fn:length(workflows)}</span>
+</h4>
<c:if test="${empty workflows}">
- <div class="information">
- <fmt:message key="workflow.noinstructions"/>
- </div>
+ <div class="information"><fmt:message key="workflow.noinstructions"/></div>
</c:if>
<c:if test="${!empty workflows}">
- <div class="help-block">
- <fmt:message key="workflow.owner.instructions"/>
- </div>
- <table class="">
+
+ <p><fmt:message key="workflow.owner.instructions"/></p>
+
+ <table class="table">
<thead>
- <th width="5%" align="center"><fmt:message key="workflow.id"/></th>
- <th width="45%" align="left"><fmt:message key="workflow.item"/></th>
- <th width="15%" align="left"><fmt:message key="workflow.actions"/></th>
- <th width="15%" align="left"><fmt:message key="workflow.actor"/></th>
- <th width="20%" align="left"><fmt:message key="workflow.startTime"/></th>
+ <th><fmt:message key="workflow.id"/></th>
+ <th><fmt:message key="workflow.item"/></th>
+ <th><fmt:message key="workflow.actor"/></th>
+ <th><fmt:message key="workflow.startTime"/></th>
+ <th><fmt:message key="workflow.actions"/></th>
</thead>
- <% i = 1; %>
<tbody>
<c:forEach var="workflow" items="${workflows}">
- <% evenOdd = (i % 2 == 0) ? "even" : "odd"; %>
- <tr class="<%=evenOdd%>">
- <!-- Workflow ID -->
- <td align="center"><c:out value="${workflow.id}"/></td>
- <!-- Name of item -->
- <td align="left">
+ <tr>
+ <%-- Workflow ID --%>
+ <td>${workflow.id}</td>
+
+ <%-- Name of item --%>
+ <td>
<fmt:message key="${workflow.messageKey}">
<c:forEach var="messageArg" items="${workflow.messageArguments}">
<fmt:param><c:out value="${messageArg}"/></fmt:param>
</c:forEach>
</fmt:message>
</td >
- <!-- Actions -->
- <td align="left">
- <form id="<c:out value='workflow.${workflow.id}'/>" action="<wiki:Link jsp='Workflow.jsp' format='url'/>" method="POST" accept-charset="UTF-8">
- <input type="submit" name="submit" value="<fmt:message key="outcome.step.abort" />" />
+
+ <%-- Current actor --%>
+ <td><${workflow.currentActor.name}</td>
+
+ <%-- When did the actor start this step? --%>
+ <td>
+ <fmt:formatDate value="${workflow.currentStep.startTime}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
+ </td>
+
+ <%-- Actions --%>
+ <td>
+ <form id="workflow.${workflow.id}"
+ action="<wiki:Link jsp='Workflow.jsp' format='url'/>"
+ method="POST" accept-charset="UTF-8">
+ <input class="btn btn-danger btn-xs" type="submit" name="submit" value="<fmt:message key="outcome.step.abort" />" />
<input type="hidden" name="action" value="abort" />
- <input type="hidden" name="id" value="<c:out value="${workflow.id}" />" />
+ <input type="hidden" name="id" value="${workflow.id}" />
</form>
</td>
- <!-- Current actor -->
- <td align="left"><c:out value="${workflow.currentActor.name}"/></td>
- <!-- When did the actor start this step? -->
- <td align="left">
- <fmt:formatDate value="${workflow.currentStep.startTime}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
- </td>
+
</tr>
- <% i++; %>
</c:forEach>
</tbody>
</table>
</c:if>
+</div><%-- class=tabs --%>
+</wiki:UserCheck>
+
+<wiki:UserCheck status="notAuthenticated">
+ <div class="info"><fmt:message key="workflow.beforelogin"/></div>
+</wiki:UserCheck>
</div>
\ No newline at end of file
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp Sun Jul 26 19:50:41 2015
@@ -257,6 +257,12 @@ Wiki.add("[name=htmlPageText]", function
//allowedContent:"div(tabs)",
//allowedContent:" ... ",
disallowedContent:"h1;h5;h6;blockquote",
+ /*
+ protectedSouce:[
+ /<a class="hashlink"[^>]+>#<\/a>/g,
+ /<img class="outlink"[^>]+>/g
+ ],
+ */
language: Wiki.prefs.get( "Language" ), //"${prefs.Language}",
height: Wiki.prefs.get( "EditorCookie" ),
startupFocus: true
Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp?rev=1692754&r1=1692753&r2=1692754&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp Sun Jul 26 19:50:41 2015
@@ -37,10 +37,9 @@
WikiContext context = WikiContext.findContext( pageContext );
WikiEngine engine = context.getEngine();
- TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT,
- context.getURL( WikiContext.NONE, "scripts/haddock-edit.js" ) );
String usertext = EditorManager.getEditedText( pageContext );
%>
+<wiki:RequestResource type="script" resource="scripts/haddock-edit.js" />
<wiki:CheckRequestContext context="edit">
<wiki:NoSuchPage> <%-- this is a new page, check if we're cloning --%>
<%