[hmath-commits] org.hmath.server/admin/config users.jsp,NONE,1.1 users.edit.jsp,NONE,1.1 users.list.
Status: Pre-Alpha
Brought to you by:
jsurfer
Update of /cvsroot/hmath/org.hmath.server/admin/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12321/admin/config Added Files: users.jsp users.edit.jsp users.list.jsp finish.jsp search.jsp administrator.jsp localization.jsp proxy.jsp mail.jsp moblog.jsp export.jsp statusbar.jsp application.jsp theme.jsp database.jsp info.jsp import.jsp expert.jsp login.jsp permissions.jsp nav.jsp guide.jsp maintenance.jsp Log Message: misc changes --- NEW FILE: users.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration, org.snipsnap.app.Application, org.snipsnap.container.Components, org.snipsnap.user.UserManager"%> <%-- ** User management ** @author Matthias L. Jugel ** @version $Id: users.jsp,v 1.5 2004/01/17 21:36:27 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <c:choose> <c:when test="${not empty edit}"> <c:import url="config/users.edit.jsp"/> </c:when> <c:otherwise> <div class="users"> <c:import url="config/users.list.jsp"/> </div> </c:otherwise> </c:choose> --- NEW FILE: users.list.jsp --- <%@ page import="org.snipsnap.user.UserManager, org.snipsnap.container.Components, java.util.List" %> <%-- ** User management: list existing users ** @author Matthias L. Jugel ** @version $Id: users.list.jsp,v 1.5 2004/01/17 22:00:01 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <div class="users-pages"> <fmt:message key="config.users.page"/> <% UserManager um = (UserManager) Components.getComponent(UserManager.class); String startStr = request.getParameter("start"); if (startStr != null && !"".equals(startStr)) { session.setAttribute("__usersStart", startStr); } else { session.setAttribute("__usersStart", "0"); } int start = Integer.parseInt((String) session.getAttribute("__usersStart")); String displayCountStr = request.getParameter("show"); if (displayCountStr != null && !"".equals(displayCountStr)) { session.setAttribute("__displayCount", displayCountStr); } else { session.setAttribute("__displayCount", "15"); } int displayCount = Integer.parseInt((String) session.getAttribute("__displayCount")); int pageCounter = 1; List usersList = um.getAll(); for (int count = 0; count < usersList.size(); count += displayCount) { if (count < start || count >= start + displayCount) { out.print(" <a href=\"configure?select=users&start=" + count + "\">" + (pageCounter++) + "</a>"); } else { out.print(" " + pageCounter++); } } pageContext.setAttribute("users", usersList.subList(start, Math.min(usersList.size(), start + displayCount))); %> </div> <table> <tr> <th><fmt:message key="config.users.login"/></th> <th><fmt:message key="config.users.email"/></th> <th><fmt:message key="config.users.roles"/></th> <th><fmt:message key="config.users.lastlogin"/></th> <th colspan="2"><fmt:message key="config.users.action"/></th> </tr> <tr> <td colspan="5"> [<a href="configure?step=users&edit=true&login="><fmt:message key="config.users.create"/></a>]<br/> </td> </tr> <c:forEach items="${users}" var="user" varStatus="idx"> <tr <c:choose> <c:when test="${idx.count mod 2 == 0}">class="users-odd"</c:when> <c:otherwise>class="users-even"</c:otherwise> </c:choose>> <td> <span class="nobr"><b><a href="../space/<c:out value='${user.login}'/>"><c:out value="${user.login}"/></a></b></span> <c:if test="${not empty user.status && user.status != 'not set'}"><br/><fmt:message key="config.users.status"/> <i><c:out value="${user.status}"/></i></c:if><br/> </td> <td> <c:if test="${user.email != null}"> <a href="mailto:<c:out value="${user.email}"/>"><c:out value="${user.email}"/></a> </c:if> </td> <td><span class="nobr"><c:out value="${user.roles}"/></span></td> <td><fmt:formatDate pattern="yyyy-MM-dd hh:mm" value="${user.lastLogin}"/></td> <td> [<a href="configure?step=users&edit=true&login=<c:out value='${user.login}'/>"><fmt:message key="config.users.edit"/></a>] </td> <td> <c:if test="${configuser.login != user.login}"> [<a style="color:red" href="configure?step=users&remove=<c:out value='${user.login}'/>"><fmt:message key="config.users.remove"/></a>] </c:if> </td> </tr> </c:forEach> </table> --- NEW FILE: finish.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration"%> <%-- ** The Finish ** @author Matthias L. Jugel ** @version $Id: finish.jsp,v 1.6 2004/01/22 07:22:21 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <div class="finish"> <div><fmt:message key="config.finish"/></div> <div class="start"><center><input type="submit" name="finish" value="<fmt:message key="config.nav.finish"/>"></center></div> <c:choose> <c:when test="${empty advanced}"> <script type="text/javascript" language="Javascript"> <!-- function enableOnCheck(checkbox) { document.getElementById("submit.advanced").disabled = !checkbox.checked; if(checkbox.name == 'advanced.all') { <%-- document.getElementById("advanced.application").disabled = checkbox.checked;--%> document.getElementById("advanced.theme").disabled = checkbox.checked; document.getElementById("advanced.localization").disabled = checkbox.checked; document.getElementById("advanced.moblog").disabled = checkbox.checked; document.getElementById("advanced.mail").disabled = checkbox.checked; document.getElementById("advanced.proxy").disabled = checkbox.checked; document.getElementById("advanced.database").disabled = checkbox.checked; } } --> </script> <div class="advanced"> <fmt:message key="config.advanced"/> <ul> <%-- <li> <input onClick="enableOnCheck(this);" id="advanced.application" type="checkbox" name="advanced.step.application"> <fmt:message key="config.advanced.application"/> </li> --%> <li> <input onClick="enableOnCheck(this);" id="advanced.theme" type="checkbox" name="advanced.step.theme"> <fmt:message key="config.advanced.theme"/> </li> <li> <input onClick="enableOnCheck(this);" id="advanced.localization" type="checkbox" name="advanced.step.localization"> <fmt:message key="config.advanced.localization"/> </li> <li> <input onClick="enableOnCheck(this);" id="advanced.moblog" type="checkbox" name="advanced.step.moblog"> <fmt:message key="config.advanced.moblog"/> </li> <li> <input onClick="enableOnCheck(this);" id="advanced.mail" type="checkbox" name="advanced.step.mail"> <fmt:message key="config.advanced.mail"/> </li> <li> <input onClick="enableOnCheck(this);" id="advanced.proxy" type="checkbox" name="advanced.step.proxy"> <fmt:message key="config.advanced.proxy"/> </li> <%-- <li>--%> <%-- <input onClick="enableOnCheck(this);" id="advanced.database" type="checkbox" name="advanced.step.database">--%> <%-- <fmt:message key="config.advanced.database"/>--%> <%-- </li>--%> <li> <input onClick="enableOnCheck(this);" type="checkbox" name="advanced.all"> <fmt:message key="config.advanced.all"/> </li> </ul> </div> </c:when> <c:otherwise> <div class="advanced"><fmt:message key="config.advanced.forgot"/></div> </c:otherwise> </c:choose> </div> --- NEW FILE: export.jsp --- <%-- ** Mail Settings ** @author Matthias L. Jugel ** @version $Id: export.jsp,v 1.5 2004/02/11 14:13:57 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <c:choose> <c:when test="${not empty running && not empty running.export}"> <tr> <td> <fmt:message key="config.export.running"/> <fmt:message key="config.refresh.text"/> </td> <td> <c:import url="config/statusbar.jsp"> <c:param name="statusMessage" value="config.status"/> <c:param name="statusMax" value="${running.max}"/> <c:param name="statusCurrent" value="${running.current}"/> </c:import> <br/> <a href="configure?step=export"><fmt:message key="config.refresh"/></a> </td> </tr> </c:when> <c:otherwise> <tr> <td><fmt:message key="config.export.file.text"/></td> <td> <input type="radio" name="export.file" value="download" <c:if test="${empty exportFile || exportFile == 'download'}">checked="checked"</c:if>> <fmt:message key="config.export.download"/> <c:if test="${!empty errors['export.file']}"><img src="images/attention.jpg"></c:if> <input type="radio" name="export.file" value="webinf" <c:if test="${exportFile == 'webinf'}">checked="checked"</c:if>> <fmt:message key="config.export.webinf"/><br/> <div class="hint"> (<c:out value="${newconfig.webInfDir}"/>) </div><br/> </td> </tr> <tr> <td><fmt:message key="config.export.types.text"/></td> <td> <table class="export-options"> <tr><td> <c:if test="${!empty errors['export.types']}"><img src="images/attention.jpg"><br/></c:if> <input type="checkbox" name="export.types" value="snips" <c:if test="${empty exportTypes || exportTypeSnips == 'true'}">checked="checked"</c:if>> <fmt:message key="config.export.types.snips"/> <td><td> <fmt:message key="config.export.match"/><br/> <input type="text" name="export.match" value="<c:out value="${exportMatch}"/>"><br/> <fmt:message key="config.export.ignore"/><br/> <input type="text" name="export.ignore" value="<c:out value="${exportIgnore}"/>"> </td></tr> <tr><td colspan="2"> <input type="checkbox" name="export.types" value="users" <c:if test="${empty exportTypes || exportTypeUsers == 'true'}">checked="checked"</c:if>> <fmt:message key="config.export.types.users"/> </td></tr> </table> </td> </tr> <tr> <td></td> <td> <input type="submit" name="export" value="<fmt:message key="config.export"/>"> </td> </tr> </c:otherwise> </c:choose> </table> --- NEW FILE: statusbar.jsp --- <%-- ** status bar ** @author Matthias L. Jugel ** @version $Id: statusbar.jsp,v 1.2 2004/02/11 14:13:57 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <c:set var="percentage" value="${param.statusCurrent * 100 / param.statusMax}" scope="request"/> <fmt:message key="${param.statusMessage}"> <fmt:param><fmt:formatNumber maxFractionDigits="0" value="${percentage}"/></fmt:param> </fmt:message><br/> <table class="statusbar"> <tr> <c:forEach begin="0" end="99" step="10" var="completed" > <td <c:if test="${percentage > completed}">class="completed"</c:if>></td> </c:forEach> </tr> </table> --- NEW FILE: mail.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration"%> <%-- ** Mail Settings ** @author Matthias L. Jugel ** @version $Id: mail.jsp,v 1.4 2003/12/11 13:24:56 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.app.mail.host.text"/></td> <td> <fmt:message key="config.app.mail.host"/><br/> <input type="text" name="app.mail.host" size="40" value="<c:out value='${newconfig.mailHost}'/>"> <c:if test="${!empty errors['app.mail.host']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.mail.domain.text"/></td> <td> <fmt:message key="config.app.mail.domain"/><br/> <input type="text" name="app.mail.domain" size="40" value="<c:out value='${newconfig.mailDomain}'/>"> <c:if test="${!empty errors['app.mail.domain']}"><img src="images/attention.jpg"></c:if> </td> </tr> </table> --- NEW FILE: permissions.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration"%> <%-- ** Permission settings ** @author Matthias L. Jugel ** @version $Id: permissions.jsp,v 1.5 2003/12/11 13:24:56 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.app.perm.register.text"/></td> <td> <fmt:message key="config.app.perm.register"/><br/> <input type="checkbox" name="app.perm.register" value="allow" <c:if test="${newconfig.permRegister == 'allow'}">checked="checked"</c:if>> </td> </tr> <tr> <td><fmt:message key="config.app.perm.weblogsPing.text"/></td> <td> <fmt:message key="config.app.perm.weblogsPing"/><br/> <input type="checkbox" name="app.perm.weblogsPing" value="allow" <c:if test="${newconfig.permWeblogsPing == 'allow'}">checked="checked"</c:if>> </td> </tr> <tr> <td><fmt:message key="config.app.perm.notification.text"/></td> <td> <fmt:message key="config.app.perm.notification"/><br/> <input type="checkbox" name="app.perm.notification" value="allow" <c:if test="${newconfig.permNotification == 'allow'}">checked="checked"</c:if>> </td> </tr> <tr> <td><fmt:message key="config.app.perm.externalImages.text"/></td> <td> <fmt:message key="config.app.perm.externalImages"/><br/> <input type="checkbox" name="app.perm.externalImages" value="allow" <c:if test="${newconfig.permExternalImages == 'allow'}">checked="checked"</c:if>> </td> </tr> <tr> <td><fmt:message key="config.app.perm.multiplePosts.text"/></td> <td> <fmt:message key="config.app.perm.multiplePosts"/><br/> <input disabled="disabled" type="checkbox" name="app.perm.multiplePosts" value="allow" <c:if test="${newconfig.permMultiplePosts == 'allow'}">checked="checked"</c:if>> </td> </tr> </table> --- NEW FILE: maintenance.jsp --- <%-- ** Maintenance ** @author Matthias L. Jugel ** @version $Id: maintenance.jsp,v 1.4 2004/02/11 14:13:57 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <c:choose> <c:when test="${not empty running && not empty running.maintenance}"> <tr> <td> <fmt:message key="config.maint.${running.maintenance}"/> <fmt:message key="config.refresh.text"/> </td> <td> <c:import url="config/statusbar.jsp"> <c:param name="statusMessage" value="config.status"/> <c:param name="statusMax" value="${running.max}"/> <c:param name="statusCurrent" value="${running.current}"/> </c:import> <br/> <a href="configure?step=maintenance"><fmt:message key="config.refresh"/></a> </td> </tr> </c:when> <c:otherwise> <c:if test="${not empty fixComments}"> <tr> <td><fmt:message key="config.maint.fix.comments"/></td> <td> <select name="fixComments" size="5" disabled="disabled"> <c:forEach items="${fixComments}" var="comment"> <option selected="selected" value="<c:out value='${comment.name}' escapeXml='true'/>"><c:out value="${comment.name}" escapeXml="true"/></option> </c:forEach> </select> </td> </tr> </c:if> <c:if test="${not empty fixParents}"> <tr> <td><fmt:message key="config.maint.fix.parents"/></td> <td> <select name="fixParents" size="5" disabled="disabled"> <c:forEach items="${fixParents}" var="post"> <option selected="selected" value="<c:out value='${post.name}' escapeXml='true'/>"><c:out value="${post.name}" escapeXml="true"/></option> </c:forEach> </select> </td> </tr> </c:if> <c:if test="${not empty duplicates}"> <tr> <td><fmt:message key="config.maint.fix.duplicates"/></td> <td> <select name="duplicates" size="5" disabled="disabled"> <c:forEach items="${duplicates}" var="snip"> <option selected="selected" value="<c:out value='${snip.name}' escapeXml='true'/>"><c:out value="${snip.name}" escapeXml="true"/></option> </c:forEach> </select> </td> </tr> </c:if> <c:if test="${not empty notFixable}"> <tr> <td><fmt:message key="config.maint.not.fixable"/></td> <td> <select name="notFixable" size="5" disabled="disabled"> <c:forEach items="${notFixable}" var="snip"> <option selected="selected" value="<c:out value='${snip.name}' escapeXml='true'/>"><c:out value="${snip.name}" escapeXml="true"/></option> </c:forEach> </select> </td> </tr> </c:if> <tr> <td><fmt:message key="config.maint.info"/></td> <td> <input type="hidden" name="step" value="maintenance"/> <input type="submit" name="check" value="<fmt:message key="config.maint.check"/>" <c:if test="${not empty status}">disabled="disabled"</c:if> /> <input type="submit" name="dorepair" value="<fmt:message key="config.maint.fix"/>" <c:if test="${empty fixComments && empty fixParents}">disabled="disabled"</c:if> /> </td> </tr> </c:otherwise> </c:choose> </table> --- NEW FILE: proxy.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration"%> <%-- ** Proxy Settings ** @author Matthias L. Jugel ** @version $Id: proxy.jsp,v 1.5 2004/01/08 10:29:28 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <script type="text/javascript" language="Javascript"> <!-- function disableOnCheck(checkbox) { document.getElementById("app.real.host").disabled = checkbox.checked; document.getElementById("app.real.port").disabled = checkbox.checked; } --> </script> <table> <tr> <td><fmt:message key="config.app.real.autodetect.text"/></td> <td> <fmt:message key="config.app.real.autodetect"/><br/> <input onClick="disableOnCheck(this);" type="checkbox" name="app.real.autodetect" <c:if test="${newconfig.realAutodetect == 'true'}">checked=checked</c:if>> <div class="hint">(<fmt:message key="config.detected"/>: <c:out value="${newconfig.url}"/>)</div> </td> </tr> <tr> <td><fmt:message key="config.app.real.protocol.text"/></td> <td> <fmt:message key="config.app.real.protocol"/><br/> <select size="1" name="app.real.protocol"> <option value="http" <c:if test="${newconfig.properties['app.real.protocol'] == 'http'}">selected="selected"</c:if>>http</option> <option value="https" <c:if test="${newconfig.properties['app.real.protocol'] == 'https'}">selected="selected"</c:if>>https</option> </select> </td> </tr> <tr> <td><fmt:message key="config.app.real.host.text"/></td> <td> <fmt:message key="config.app.real.host"/><br/> <input <c:if test="${newconfig.realAutodetect == 'true'}">disabled="disabled"</c:if> id="app.real.host" type="text" name="app.real.host" size="40" value="<c:out value='${newconfig.properties["app.real.host"]}'/>"> </td> </tr> <tr> <td><fmt:message key="config.app.real.port.text"/></td> <td> <fmt:message key="config.app.real.port"/><br/> <input <c:if test="${newconfig.realAutodetect == 'true'}">disabled="disabled"</c:if> id="app.real.port" type="text" name="app.real.port" size="40" value="<c:out value='${newconfig.properties["app.real.port"]}'/>"> <c:if test="${!empty errors['app.real.port']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.real.path.text"/></td> <td> <fmt:message key="config.app.real.path"/><br/> <input type="text" name="app.real.path" size="40" value="<c:out value='${newconfig.properties["app.real.path"]}'/>"> </td> </tr> </table> --- NEW FILE: database.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration"%> <%-- ** Database Settings ** @author Matthias L. Jugel ** @version $Id: database.jsp,v 1.4 2003/12/11 13:24:56 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <% // put known drivers in session context if(null == session.getAttribute("jdbcDriver")) { Map knownJdbcDriver = new HashMap(); knownJdbcDriver.put("jdbc.mckoi", "com.mckoi.JDBCDriver"); knownJdbcDriver.put("jdbc.mysql", "com.mysql.jdbc.Driver"); knownJdbcDriver.put("jdbc.postgresql", "org.postgresql.Driver"); //knownJdbcDriver.put("jdbc.oracle", "com.oracle.jdbc.Driver"); Iterator driverIt = knownJdbcDriver.keySet().iterator(); while (driverIt.hasNext()) { String driver = (String) driverIt.next(); try { Class.forName((String)knownJdbcDriver.get(driver)); } catch (Exception e) { driverIt.remove(); } catch(Error err) { driverIt.remove(); } } session.setAttribute("jdbcDriver", knownJdbcDriver); } %> <script type="text/javascript" language="Javascript"> <!-- function selectOptions(select) { var driver = select.options[select.selectedIndex].value; if(driver == 'file') { showParts(document.getElementsByName("file")); hideParts(document.getElementsByName("jdbc")); hideParts(document.getElementsByName("mckoi")); } else if(driver == 'jdbc.mckoi') { showParts(document.getElementsByName("mckoi")); hideParts(document.getElementsByName("file")); hideParts(document.getElementsByName("jdbc")); } else { showParts(document.getElementsByName("jdbc")); hideParts(document.getElementsByName("file")); hideParts(document.getElementsByName("mckoi")); var jdbcField = document.getElementById('app.jdbc.driver'); var jdbcUrl = document.getElementById('app.jdbc.url'); <c:forEach items="${jdbcDriver}" var="driver"> if(driver == '<c:out value="${driver.key}"/>') { jdbcField.value = '<c:out value="${driver.value}"/>'; } </c:forEach> if(driver != 'jdbc') { hideParts(document.getElementsByName("jdbcDriver")); driver = driver.substring(5, driver.length); } else { showParts(document.getElementsByName("jdbcDriver")); jdbcField.value = 'enter driver class here'; driver = 'driver'; } jdbcUrl.value = 'jdbc:' + driver + '://server/snipsnapdb' if(driver == 'postgresql') { jdbcUrl.value = jdbcUrl.value + '?charSet=utf-8'; } } } function showParts(elements) { // iterator over elements and show for(var e = 0; e < elements.length; e++) { elements[e].style.visibility = "visible"; elements[e].style.display = "table-row"; } } function hideParts(elements) { // iterator over elements and for(var e = 0; e < elements.length; e++) { elements[e].style.visibility = "hidden"; elements[e].style.display = "none"; } } --> </script> <table> <tr> <td><fmt:message key="config.app.database.text"/></td> <td> <fmt:message key="config.app.database"/><br/> <select name="app.database" size="1" onChange="selectOptions(this)"> <option value="file" <c:if test="${newconfig.database == 'file'}">selected="selected"</c:if>><fmt:message key="config.app.database.file"/></option> <c:forEach items="${jdbcDriver}" var="driver"> <option value="<c:out value='${driver.key}'/>" <c:if test="${newconfig.database == driver.key}">selected="selected"</c:if>><fmt:message key="config.app.database.${driver.key}"/></option> </c:forEach> <option value="jdbc" <c:if test="${newconfig.database == 'jdbc'}">selected="selected"</c:if>><fmt:message key="config.app.database.jdbc"/></option> </select> </td> </tr> <tr name="jdbc" <c:if test="${newconfig.database == 'file' || newconfig.database == 'jdbc.mckoi'}">style="visibility:hidden; display:none"</c:if>> <td><fmt:message key="config.app.jdbc.url.text"/></td> <td> <fmt:message key="config.app.jdbc.url"/><br/> <input id="app.jdbc.url" type="text" name="app.jdbc.url" size="40" value="<%= ((Configuration)pageContext.findAttribute("newconfig")).getGlobals().getProperty(Configuration.APP_JDBC_URL) %>"> <c:if test="${!empty errors['app.jdbc.url']}"><img src="images/attention.jpg"></c:if> <%--<div class="hint">(<c:out value="${newconfig.jdbcUrl}"/>)</div>--%> </td> </tr> <tr name="jdbcDriver" <c:if test="${newconfig.database == 'file' || newconfig.database == 'jdbc.postgresql' || newconfig.database == 'jdbc.mckoi'}">style="visibility:hidden; display:none"</c:if>> <td><fmt:message key="config.app.jdbc.driver.text"/></td> <td> <fmt:message key="config.app.jdbc.driver"/><br/> <input id="app.jdbc.driver" type="text" name="app.jdbc.driver" size="40" value="<c:out value='${newconfig.jdbcDriver}'/>"> <c:if test="${!empty errors['app.jdbc.driver']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr name="jdbc" <c:if test="${newconfig.database == 'file' || newconfig.database == 'jdbc.mckoi'}">style="visibility:hidden; display:none"</c:if>> <td><fmt:message key="config.app.jdbc.user.text"/></td> <td> <fmt:message key="config.app.jdbc.user"/><br/> <input id="app.jdbc.user" type="text" name="app.jdbc.user" value="<c:out value='${newconfig.jdbcUser}'/>"> <c:if test="${!empty errors['app.jdbc.user']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr name="jdbc" <c:if test="${newconfig.database == 'file' || newconfig.database == 'jdbc.mckoi'}">style="visibility:hidden; display:none"</c:if>> <td><fmt:message key="config.app.jdbc.password.text"/></td> <td> <fmt:message key="config.app.jdbc.password"/><br/> <input id="app.jdbc.password" type="password" name="app.jdbc.password"> <c:if test="${!empty errors['app.jdbc.password']}"><img src="images/attention.jpg"></c:if><br/> <div class="hint"> <c:if test="${not empty newconfig.jdbcPassword}"> <fmt:message key="config.password.set" /> </c:if> </div> </td> </tr> <tr name="file" <c:if test="${newconfig.database != 'file'}">style="visibility:hidden; display:none"</c:if>> <td><fmt:message key="config.app.database.file.text"/></td> <td> <input type="hidden" name="app.file.store" value="<%= ((Configuration) pageContext.findAttribute("newconfig")).getGlobals().getProperty(Configuration.APP_FILE_STORE) %>"> <fmt:message key="config.app.database.noconfig"/><br/> </td> </tr> <tr name="mckoi" <c:if test="${newconfig.database != 'jdbc.mckoi'}">style="visibility:hidden; display:none"</c:if>> <td><fmt:message key="config.app.database.mckoi.text"/></td> <td> <fmt:message key="config.app.database.noconfig"/><br/> </td> </tr> </table> --- NEW FILE: application.jsp --- <%@ page import="org.snipsnap.config.Configuration"%> <%-- ** Basic Settings of the Application ** @author Matthias L. Jugel ** @version $Id: application.jsp,v 1.7 2004/01/22 07:22:21 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.app.name.text"/></td> <td> <fmt:message key="config.app.name"/><br/> <input type="text" name="app.name" value="<c:out value='${newconfig.name}'/>" size="40"> <c:if test="${!empty errors['app.name']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.tagline.text"/></td> <td> <fmt:message key="config.app.tagline"/><br/> <input type="text" name="app.tagline" value="<c:out value='${newconfig.tagline}'/>" size="40"> <c:if test="${!empty errors['app.tagline']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.logo.text"/></td> <td> <fmt:message key="config.app.logo"/><br/> <input type="file" name="file" value="<c:out value='${newconfig.logo}'/>" accept="image/*"> <c:if test="${!empty errors['app.logo']}"><img src="images/attention.jpg"></c:if> </td> </tr> <c:if test="${not newconfig.configured}"> <tr> <td><fmt:message key="config.usage.text"/></td> <td> <input type="radio" name="usage" value="public" <c:if test="${usage == 'public'}">checked="checked"</c:if> ><fmt:message key="config.usage.public"/><br/> <input type="radio" name="usage" value="closed" <c:if test="${usage == 'closed'}">checked="checked"</c:if> ><fmt:message key="config.usage.closed"/><br/> <input type="radio" name="usage" value="intranet" <c:if test="${usage == 'intranet'}">checked="checked"</c:if> ><fmt:message key="config.usage.intranet"/><br/> <input type="radio" name="usage" value="custom" <c:if test="${usage == 'custom'}">checked="checked"</c:if> ><fmt:message key="config.usage.custom"/> </td> </tr> </c:if> </table> --- NEW FILE: theme.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration, java.io.File, org.dom4j.Document, org.dom4j.io.SAXReader, java.io.FileReader, java.io.InputStreamReader, org.dom4j.Element, org.dom4j.Node, java.io.FilenameFilter, org.snipsnap.snip.Snip, org.snipsnap.container.Components, org.snipsnap.snip.SnipSpace, org.snipsnap.net.admin.ThemeHelper"%> <%-- ** Theme selection. ** @author Matthias L. Jugel ** @version $Id: theme.jsp,v 1.7 2004/01/22 07:22:21 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <% Configuration conf = (Configuration) session.getAttribute("newconfig"); Map themes = new HashMap(); if (conf.isConfigured()) { Map installedThemes = ThemeHelper.getInstalledThemes(); Iterator themeIt = installedThemes.keySet().iterator(); while (themeIt.hasNext()) { String themeName = (String) themeIt.next(); themes.put(themeName, ((Snip)installedThemes.get(themeName)).getContent()); } } request.setAttribute("themes", themes); Map newThemes = ThemeHelper.getThemeDocuments(conf, ThemeHelper.CONTENT); Iterator instThemeIt = themes.keySet().iterator(); while (instThemeIt.hasNext()) { String themeName = (String) instThemeIt.next(); if(newThemes.containsKey(themeName)) { newThemes.remove(themeName); } } request.setAttribute("newthemes", newThemes); %> <script type="text/javascript" language="Javascript"> <!-- function selectOptions(select) { var themes = document.getElementsByName("theme"); hideParts(themes); showPart(document.getElementById(select.options[select.selectedIndex].value)); } function showPart(element) { element.style.visibility = "visible"; element.style.display = "table-row"; } function hideParts(elements) { // iterator over elements and for(var e = 0; e < elements.length; e++) { elements[e].style.visibility = "hidden"; elements[e].style.display = "none"; } } --> </script> <table> <tr> <td><fmt:message key="config.app.theme.text"/></td> <td> <fmt:message key="config.app.theme"/><br/> <select name="app.theme" size="1" onChange="selectOptions(this)"> <c:forEach items="${themes}" var="theme"> <option value="<c:out value='${theme.key}'/>" <c:if test="${newconfig.theme == theme.key}">selected="selected"</c:if>><c:out value="${theme.key}"/></option> </c:forEach> <c:forEach items="${newthemes}" var="theme"> <option value="<c:out value='${theme.key}'/>" <c:if test="${newconfig.theme == theme.key}">selected="selected"</c:if>> <c:out value="${theme.key}" escapeXml="true"/> <fmt:message key="config.app.theme.new"/> </option> </c:forEach> </select> </td> </tr> <c:forEach items="${themes}" var="theme"> <tr id="<c:out value='${theme.key}'/>" name="theme" <c:if test="${newconfig.theme != theme.key}">style="visibility:hidden; display:none"</c:if>> <td><c:out value="${theme.value}"/></td> <td> <c:out value="${theme.key}"/> <input type="submit" name="export" value="<fmt:message key='config.app.theme.export'/>"/><br/> <img src="themeimage?name=<c:out value='${theme.key}'/>" alt="<c:out value='${theme.key}'/>" border="0"> </td> </tr> </c:forEach> <c:forEach items="${newthemes}" var="theme"> <tr id="<c:out value='${theme.key}'/>" name="theme" <c:if test="${newconfig.theme != theme.key}">style="visibility:hidden; display:none"</c:if>> <td><c:out value="${theme.value}"/></td> <td> <c:out value="${theme.key}"/><br/> <img src="themeimage?name=<c:out value='${theme.key}'/>" alt="<c:out value='${theme.key}'/>" border="0"> </td> </tr> </c:forEach> </table> --- NEW FILE: nav.jsp --- <%@ page import="java.util.List"%> <%-- ** Navigation ** @author Matthias L. Jugel ** @version $Id: nav.jsp,v 1.10 2004/02/04 16:52:39 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <input type="hidden" name="step" value="<c:out value='${step}'/>"/> <input type="hidden" name="prefix" value="<c:out value="${prefix}"/>"/> <c:choose> <c:when test="${not empty configuser && configuser.admin}"> <c:if test="${not(step == 'import' || step == 'export' || step == 'users' || step == 'search' || step == 'maintenance')}"> <input type="submit" name="save" value="<fmt:message key="config.nav.save"/>"/> </c:if> </c:when> <c:otherwise> <c:if test="${step != 'database' && step != 'login'}"> <input type="submit" name="previous" value="<fmt:message key="config.nav.previous"/>"> </c:if> <c:choose> <c:when test="${step == 'finish'}"> <c:if test="${empty advanced}"> <input type="hidden" name="advanced" value="true"> <input disabled="disabled" id="submit.advanced" type="submit" name="next" value="<fmt:message key="config.nav.advanced"/>"> </c:if> </c:when> <c:otherwise> <input type="submit" name="next" value="<fmt:message key="config.nav.next"/>"> </c:otherwise> </c:choose> </c:otherwise> </c:choose> --- NEW FILE: info.jsp --- <%-- ** Guide Menu ** @author Matthias L. Jugel ** @version $Id: info.jsp,v 1.5 2003/12/11 13:24:56 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <div class="info"> <ul> <li><c:out value="${newconfig.name}"/></li> <li><c:out value="${newconfig.url}"/></li> <li><c:out value="${newconfig.country}(${newconfig.language}) ${newconfig.timezone} ${newconfig.encoding}"/></li> <li><c:out value="${newconfig.theme}"/> <li> <c:out value="${newconfig.adminLogin}"/> <c:if test="${not empty newconfig.adminEmail}"> (<c:out value="${newconfig.adminEmail}"/>) </c:if> </li> </ul> </div> --- NEW FILE: search.jsp --- <%-- ** Search Engine Parameter settings ** @author Matthias L. Jugel ** @version $Id: search.jsp,v 1.3 2004/02/11 14:13:57 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td> <fmt:message key="config.search.reset.text"/> </td> <td> <input <c:if test="${indexerThread.alive}">disabled="disabled"</c:if> type="submit" name="reset" value="<fmt:message key="config.search.reset"/>"/> <c:if test="${indexerThread.alive}"> <br/><span class="hint"><fmt:message key="config.search.running"/></span> </c:if> </td> </tr> </table> --- NEW FILE: expert.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration, java.text.SimpleDateFormat"%> <%-- ** Expert Settings ** @author Matthias L. Jugel ** @version $Id: expert.jsp,v 1.7 2004/01/22 15:01:32 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.app.start.snip.text"/></td> <td> <fmt:message key="config.app.start.snip"/><br/> <input type="text" name="app.start.snip" value="<c:out value='${newconfig.startSnip}'/>"> </td> </tr> <tr> <td><fmt:message key="config.app.perm.createSnip.text"/></td> <td> <fmt:message key="config.app.perm.createSnip"/><br/> <input type="checkbox" value="allow" name="app.perm.createSnip" <c:if test="${newconfig.permCreateSnip == 'allow'}">checked="checked"</c:if>> </td> </tr> <tr> <td><fmt:message key="config.app.logger.text"/></td> <td> <fmt:message key="config.app.logger"/><br/> <select name="app.logger"> <option value="org.radeox.util.logging.NullLogger" <c:if test="${newconfig.logger == 'org.radeox.util.logging.NullLogger'}">selected="selected"</c:if>> <fmt:message key="config.logger.none"/></option> <option value="org.radeox.util.logging.SystemErrLogger" <c:if test="${newconfig.logger == 'org.radeox.util.logging.SystemErrLogger'}">selected="selected"</c:if>> <fmt:message key="config.logger.system.err"/></option> <option value="org.radeox.util.logging.SystemOutLogger" <c:if test="${newconfig.logger == 'org.radeox.util.logging.SystemOutLogger'}">selected="selected"</c:if>> <fmt:message key="config.logger.system.out"/></option> <%-- <option value="org.snipsnap.util.log.ApplicationLogger"--%> <%-- <c:if test="${newconfig.logger == 'org.snipsnap.util.log.ApplicationLogger'}">selected="selected"</c:if>>--%> <%-- <fmt:message key="config.logger.application"/></option>--%> </input> </td> </tr> <tr> <td><fmt:message key="config.app.cache.text"/></td> <td> <fmt:message key="config.app.cache"/><br/> <select disabled="disabled" name="app.cache"> <option value="full" <c:if test="${newconfig.cache == 'full'}">checked="checked"</c:if>> <fmt:message key="config.caching.full"/></option> <option value="cache" <c:if test="${newconfig.cache == 'cache'}">checked="checked"</c:if>> <fmt:message key="config.caching.cache"/></option> </input> </td> </tr> <tr> <td><fmt:message key="config.app.encoding.text"/></td> <td> <fmt:message key="config.app.encoding"/><br/> <select disabled="disabled" name="app.encoding"> <option value="UTF-8" <c:if test="${newconfig.encoding == 'UTF-8'}">checked="checked"</c:if>>UTF-8</option> <option value="UTF-16" <c:if test="${newconfig.encoding == 'UTF-16'}">checked="checked"</c:if>>UTF-16</option> <option value="ISO-8859-1" <c:if test="${newconfig.encoding == 'ISO-8859-1'}">checked="checked"</c:if>>ISO 8859-1</option> <option value="US-ASCII" <c:if test="${newconfig.encoding == 'US-ASCII'}">checked="checked"</c:if>>US-ASCII</option> </input> </td> </tr> </table> --- NEW FILE: import.jsp --- <%-- ** Mail Settings ** @author Matthias L. Jugel ** @version $Id: import.jsp,v 1.3 2004/02/11 14:13:57 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <c:choose> <c:when test="${not empty running && not empty running.import}"> <tr> <td> <fmt:message key="config.import.running"/> <fmt:message key="config.refresh.text"/> </td> <td> <c:import url="config/statusbar.jsp"> <c:param name="statusMessage" value="config.status"/> <c:param name="statusMax" value="${running.max}"/> <c:param name="statusCurrent" value="${running.current}"/> </c:import> <br/> <a href="configure?step=import"><fmt:message key="config.refresh"/></a> </td> </tr> </c:when> <c:otherwise> <tr> <td><fmt:message key="config.import.file.text"/></td> <td> <fmt:message key="config.import.file"/><br/> <input type="file" name="import.file" accept="text/xml" value="<c:out value="${importFile}"/>"> <c:if test="${!empty errors['import.file']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.import.types.text"/></td> <td> <c:if test="${!empty errors['import.types']}"><img src="images/attention.jpg"><br/></c:if> <input type="checkbox" name="import.types" value="snips" <c:if test="${empty importTypes || importTypeSnips == 'true'}">checked="checked"</c:if>> <fmt:message key="config.import.types.snips"/><br/> <input type="checkbox" name="import.types" value="users" <c:if test="${empty importTypes || importTypeUsers == 'true'}">checked="checked"</c:if>> <fmt:message key="config.import.types.users"/> </td> </tr> <tr> <td><fmt:message key="config.import.overwrite.text"/></td> <td> <input type="checkbox" name="import.overwrite" <c:if test="${empty importOverwrite || importOverwrite == 'true'}">checked="checked"</c:if>> <c:if test="${!empty errors['config.import.overwrite']}"><img src="images/attention.jpg"></c:if> <fmt:message key="config.import.overwrite"/><br/> </td> </tr> <tr> <td></td> <td> <input type="submit" name="import" value="<fmt:message key="config.import"/>"> </td> </tr> </c:otherwise> </c:choose> </table> --- NEW FILE: moblog.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration"%> <%-- ** Mobile Blogging Settings ** @author Matthias L. Jugel ** @version $Id: moblog.jsp,v 1.4 2003/12/11 13:24:56 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.app.mail.blog.password.text"/></td> <td> <fmt:message key="config.app.mail.blog.password"/><br/> <input type="text" name="app.mail.blog.password" value="<c:out value='${newconfig.mailBlogPassword}'/>"> <c:if test="${!empty errors['app.mail.blog.password']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.mail.pop3.host.text"/></td> <td> <fmt:message key="config.app.mail.pop3.host"/><br/> <input type="text" name="app.mail.pop3.host" size="40" value="<c:out value='${newconfig.mailPop3Host}'/>"> <c:if test="${!empty errors['app.mail.pop3.host']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.mail.pop3.user.text"/></td> <td> <fmt:message key="config.app.mail.pop3.user"/><br/> <input type="text" name="app.mail.pop3.user" size="40" value="<c:out value='${newconfig.mailPop3User}'/>"> <c:if test="${!empty errors['app.mail.pop3.user']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.mail.pop3.password.text"/></td> <td> <fmt:message key="config.app.mail.pop3.password"/><br/> <input type="password" name="app.mail.pop3.password" value="<c:out value='${newconfig.mailPop3Password}'/>"> <c:if test="${!empty errors['app.mail.pop3.password']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.mail.pop3.interval.text"/></td> <td> <fmt:message key="config.app.mail.pop3.interval"/><br/> <input type="text" name="app.mail.pop3.interval" size="5" value="<c:out value='${newconfig.mailPop3Interval}'/>"> <c:if test="${!empty errors['app.mail.pop3.interval']}"><img src="images/attention.jpg"></c:if> </td> </tr> </table> --- NEW FILE: guide.jsp --- <%@ page import="java.util.List"%> <%-- ** Guide Menu ** @author Matthias L. Jugel ** @version $Id: guide.jsp,v 1.7 2004/01/20 12:24:37 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <div class="guide-menu"> <div class="guide-title"> <c:choose> <c:when test="${step == 'login'}"> <!-- nothing --> </c:when> <c:when test="${not empty configuser && configuser.admin}"> <fmt:message key="config.guide.setup"/> </c:when> <c:otherwise> <fmt:message key="config.guide.title"> <fmt:param><%= ((List) pageContext.findAttribute("steps")).size() %></fmt:param> </fmt:message> </c:otherwise> </c:choose> </div> <ul> <c:forEach items="${steps}" var="current" varStatus="status" > <li <c:if test="${step == current}">class="current-step"</c:if>> <c:choose> <c:when test="${not(step == current) && not empty configuser && configuser.admin}"> <a href="configure?select=<c:out value="${current}"/>"> <fmt:message key="config.step.${current}"/> </a> </c:when> <c:otherwise><fmt:message key="config.step.${current}"/></c:otherwise> </c:choose> </li> </c:forEach> </ul> <ul> <c:if test="${not empty configuser && configuser.admin}"> <li><a href="../space/start"><fmt:message key="config.step.back" /></a></li> </c:if> </ul> </div> --- NEW FILE: login.jsp --- <%-- ** login dialog ** @author Matthias L. Jugel ** @version $Id: login.jsp,v 1.1 2004/01/20 12:24:37 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.login.text"/></td> <td> <fmt:message key="config.login"/><br/> <input type="password" name="key" value=""/> </td> </tr> </table> --- NEW FILE: localization.jsp --- <%@ page import="java.util.*, org.snipsnap.config.Configuration, java.text.SimpleDateFormat, java.text.DateFormat"%> <%-- ** Localization settings. ** @author Matthias L. Jugel ** @version $Id: localization.jsp,v 1.6 2004/01/15 10:22:11 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <% Locale[] locales; Map countries = new TreeMap(); Map languages = new TreeMap(); locales = Locale.getAvailableLocales(); for (int count = 0; count < locales.length; count++) { if(!"".equals(locales[count].getDisplayCountry())) { countries.put(locales[count].getDisplayCountry(), locales[count]); } languages.put(locales[count].getDisplayLanguage(), locales[count]); } pageContext.setAttribute("countries", countries.values()); pageContext.setAttribute("languages", languages.values()); %> <table> <tr> <td><fmt:message key="config.app.country.text"/></td> <td> <fmt:message key="config.app.country"/><br/> <select size="1" name="app.country"> <c:forEach items="${countries}" var="country"> <option value="<c:out value='${country.country}'/>" <c:if test="${newconfig.country == country.country}">selected="selected"</c:if>><c:out value="${country.displayCountry}" /></option> </c:forEach> </select> </td> </tr> <tr> <td><fmt:message key="config.app.language.text"/></td> <td> <fmt:message key="config.app.language"/><br/> <select size="1" name="app.language"> <c:forEach items="${languages}" var="language"> <option value="<c:out value='${language.language}'/>" <c:if test="${newconfig.language == language.language}">selected="selected"</c:if>><c:out value="${language.displayLanguage}" /></option> </c:forEach> </select> </td> </tr> <tr> <td><fmt:message key="config.app.timezone.text"/></td> <td> <fmt:message key="config.app.timezone"/><br/> <select size="1" name="app.timezone"> <% Map timezones = new TreeMap(); for(int count = 0; count <= 12; count++) { String tzString = "GMT+"+count; TimeZone tz = TimeZone.getTimeZone(tzString); timezones.put(tz.getID().substring(0, 6), tz); } for (int count = 11; count > 0; count--) { String tzString = "GMT-" + count; TimeZone tz = TimeZone.getTimeZone(tzString); timezones.put(tz.getID().substring(0, 6), tz); } pageContext.setAttribute("timezones", timezones); %> <c:forEach items="${timezones}" var="timezone"> <option value="<c:out value='${timezone.value.ID}'/>" <c:if test="${newconfig.timezone == timezone.value.ID}">selected="selected"</c:if>><fmt:message key="${timezone.key}"/></option> </c:forEach> </select> </td> </tr> <tr> <td><fmt:message key="config.app.weblogDateFormat.text"/></td> <td> <fmt:message key="config.app.weblogDateFormat"/><br/> <input type="text" name="app.weblogDateFormat" value="<c:out value='${newconfig.weblogDateFormat}'/>"> <c:if test="${!empty errors['app.weblogDateFormat']}"><img src="images/attention.jpg"></c:if> <% Locale current = Locale.getDefault(); Configuration cfg = (Configuration)pageContext.findAttribute("newconfig"); Locale.setDefault(cfg.getLocale()); try { DateFormat df = new SimpleDateFormat(cfg.getWeblogDateFormat()); df.setTimeZone(TimeZone.getTimeZone(cfg.getTimezone())); pageContext.setAttribute("date", df.format(new Date())); } catch (Exception e) { pageContext.setAttribute("date", "???"); } Locale.setDefault(current); %> <div class="hint"> (<c:out value="${date}"/>) <input type="submit" name="preview" value="<fmt:message key='config.nav.preview'/>"> </div> </td> </tr> <tr> <td><fmt:message key="config.app.geoCoordinates.text"/></td> <td> <fmt:message key="config.app.geoCoordinates"/><br/> <input type="text" name="app.geoCoordinates" value="<c:out value='${newconfig.geoCoordinates}'/>"> <c:if test="${!empty errors['app.geoCoordinates']}"><img src="images/attention.jpg"></c:if> </td> </tr> </table> --- NEW FILE: administrator.jsp --- <%-- ** First Login / Admin ** @author Matthias L. Jugel ** @version $Id: administrator.jsp,v 1.6 2003/12/11 13:24:56 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.app.admin.login.text"/></td> <td> <fmt:message key="config.app.admin.login"/><br/> <input type="text" name="app.admin.login" value="<c:out value='${newconfig.adminLogin}' default=""/>"> <c:if test="${!empty errors['app.admin.login']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.app.admin.password.text"/></td> <td> <fmt:message key="config.app.admin.password"/><br/> <input type="password" name="app.admin.password" value=""> <c:if test="${!empty errors['app.admin.password']}"><img src="images/attention.jpg"></c:if><br/> <fmt:message key="config.app.admin.password.vrfy"/><br/> <input type="password" name="app.admin.password.vrfy" value=""> <c:if test="${!empty errors['app.admin.password']}"><img src="images/attention.jpg"></c:if><br/> <div class="hint"> <c:if test="${not empty newconfig.adminPassword}"> <fmt:message key="config.password.set" /> </c:if> </div> </td> </tr> <tr> <td><fmt:message key="config.app.admin.email.text"/></td> <td> <fmt:message key="config.app.admin.email"/><br/> <input type="text" name="app.admin.email" value="<c:out value='${newconfig.adminEmail}' default=""/>"> <c:if test="${!empty errors['app.admin.email']}"><img src="images/attention.jpg"></c:if> </td> </tr> </table> --- NEW FILE: users.edit.jsp --- <%@ page import="java.util.Set"%> <%-- ** User management: edit/create user ** @author Matthias L. Jugel ** @version $Id: users.edit.jsp,v 1.2 2004/01/17 21:36:27 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <table> <tr> <td><fmt:message key="config.users.login.text"/></td> <td> <fmt:message key="config.users.login"/><br/> <c:choose> <c:when test="${not empty create}"> <input type="text" name="config.users.login" value="<c:out value='${editUser.login}' default=""/>"> </c:when> <c:otherwise> <input type="hidden" name="config.users.login" value="<c:out value='${editUser.login}' default=""/>"> <input type="text" name="disabled" value="<c:out value='${editUser.login}' default=""/>" disabled="disabled"> </c:otherwise> </c:choose> <c:if test="${!empty errors['users.login']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.users.password.text"/></td> <td> <fmt:message key="config.users.password"/><br/> <input type="password" name="config.users.password" value=""> <c:if test="${!empty errors['users.password']}"><img src="images/attention.jpg"></c:if><br/> <fmt:message key="config.users.password.vrfy"/><br/> <input type="password" name="config.users.password.vrfy" value=""> <c:if test="${!empty errors['users.password']}"><img src="images/attention.jpg"></c:if><br/> <div class="hint"> <c:if test="${not empty editUser.passwd}"> <fmt:message key="config.password.set" /> </c:if> </div> </td> </tr> <tr> <td><fmt:message key="config.users.email.text"/></td> <td> <fmt:message key="config.users.email"/><br/> <input type="text" name="config.users.email" value="<c:out value='${editUser.email}' default=""/>"> <c:if test="${!empty errors['users.email']}"><img src="images/attention.jpg"></c:if> </td> </tr> <tr> <td><fmt:message key="config.users.roles.text"/></td> <td> <fmt:message key="config.users.roles"/><br/> <c:set var="userRoles" value="${editUser.roles.roleSet}"/> <% Set userRoles = (Set) pageContext.findAttribute("userRoles"); %> <c:forEach items="${editUser.roles.allRoles}" var="role"> <input type="checkbox" name="config.users.roles" value="<c:out value='${role}'/>" <%= userRoles.contains(pageContext.findAttribute("role")) ? "checked=\"checked\"" : "" %>/> <c:out value="${role}"/><br/> </c:forEach> </td> </tr> <tr> <td><fmt:message key="config.users.status.text"/></td> <td> <fmt:message key="config.users.status"/><br/> <input name="config.users.status" type="text" size="20" value="<c:out value='${editUser.status}'/>"/> </td> <tr> <td></td> <td> <c:choose> <c:when test="${empty create}"> <input type="submit" name="save" value="<fmt:message key="config.users.save"/>"> </c:when> <c:otherwise> <input type="submit" name="create" value="<fmt:message key="config.users.create"/>"> </c:otherwise> </c:choose> <input type="submit" name="cancel" value="<fmt:message key="config.users.cancel"/>"> </td> </tr> </table> |