Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java (original) +++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java Sat Apr 7 11:01:47 2007 @@ -27,6 +27,8 @@ import org.apache.roller.RollerException; import org.apache.roller.planet.business.PlanetFactory; import org.apache.roller.planet.business.PlanetManager; +import org.apache.roller.planet.pojos.PlanetData; +import org.apache.roller.planet.pojos.PlanetGroupData; import org.apache.roller.planet.pojos.PlanetSubscriptionData; import org.apache.roller.pojos.ThemeTemplate; import org.apache.roller.pojos.WebsiteData; @@ -164,7 +166,9 @@ List list = new ArrayList(); try { PlanetManager planetManager = PlanetFactory.getPlanet().getPlanetManager(); - List subs = planetManager.getTopSubscriptions(groupHandle, 0, length); + PlanetData defaultPlanet = planetManager.getPlanet("default"); + PlanetGroupData planetGroup = planetManager.getGroup(defaultPlanet, groupHandle); + List subs = planetManager.getTopSubscriptions(planetGroup, 0, length); for (Iterator it = subs.iterator(); it.hasNext();) { PlanetSubscriptionData sub = (PlanetSubscriptionData) it.next(); // TODO needs pojo wrapping from planet
Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java (original) +++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java Sat Apr 7 11:01:47 2007 @@ -20,16 +20,18 @@ import java.util.ArrayList; import java.util.Calendar; +import java.util.Collections; import java.util.Date; import java.util.Iterator; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.roller.planet.business.Planet; import org.apache.roller.planet.business.PlanetFactory; import org.apache.roller.planet.business.PlanetManager; +import org.apache.roller.planet.pojos.PlanetData; import org.apache.roller.planet.pojos.PlanetEntryData; import org.apache.roller.planet.pojos.PlanetGroupData; +import org.apache.roller.planet.pojos.PlanetSubscriptionData; /** @@ -94,12 +96,20 @@ List rawEntries = null; if (feedURL != null) { - rawEntries = planetManager.getFeedEntries(feedURL, offset, length+1); + PlanetSubscriptionData sub = planetManager.getSubscription(feedURL); + rawEntries = planetManager.getEntries(sub, offset, length+1); } else if (groupHandle != null) { - PlanetGroupData group = planetManager.getGroup(groupHandle); - rawEntries = planetManager.getAggregation(group, startDate, null, offset, length+1); + PlanetData planet = planetManager.getPlanet("default"); + PlanetGroupData group = planetManager.getGroup(planet, groupHandle); + rawEntries = planetManager.getEntries(Collections.singletonList(group), startDate, null, offset, length+1); } else { - rawEntries = planetManager.getAggregation(startDate, null, offset, length+1); + PlanetData planet = planetManager.getPlanet("default"); + PlanetGroupData groupAll = planetManager.getGroup(planet, "all"); + PlanetGroupData groupDefault = planetManager.getGroup(planet, "default"); + List groups = new ArrayList(); + groups.add(groupAll); + groups.add(groupDefault); + rawEntries = planetManager.getEntries(groups, startDate, null, offset, length+1); } // check if there are more results for paging Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/plugins/SmileysPlugin.java URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/plugins/SmileysPlugin.java?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/src/org/apache/roller/ui/rendering/plugins/SmileysPlugin.java (original) +++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/plugins/SmileysPlugin.java Sat Apr 7 11:01:47 2007 @@ -84,7 +84,7 @@ Pattern[] tempP = new Pattern[SmileysPlugin.smileyDefs.size()]; String[] tempS = new String[SmileysPlugin.smileyDefs.size()]; - //System.out.println("# smileys: " + smileyDefs.size()); + System.out.println("# smileys: " + smileyDefs.size()); int count = 0; Enumeration enum1 = SmileysPlugin.smileyDefs.propertyNames(); while(enum1.hasMoreElements()) { @@ -97,7 +97,7 @@ "\" class=\"smiley\"" + " alt=\"" + smileyAlt + "\"" + " title=\"" + smileyAlt +"\" />"; - //System.out.println(smiley + "=" + tempS[count]); + System.out.println(smiley + "=" + tempS[count]); count++; } SmileysPlugin.smileyPatterns = tempP; Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java (original) +++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java Sat Apr 7 11:01:47 2007 @@ -30,10 +30,10 @@ import org.apache.commons.logging.LogFactory; import org.apache.roller.RollerException; import org.apache.roller.config.RollerRuntimeConfig; -import org.apache.roller.planet.business.Planet; import org.apache.roller.planet.business.PlanetFactory; import org.apache.roller.planet.business.PlanetManager; -import org.apache.roller.business.RollerFactory; +import org.apache.roller.planet.pojos.PlanetData; +import org.apache.roller.planet.pojos.PlanetGroupData; import org.apache.roller.pojos.StaticTemplate; import org.apache.roller.pojos.Template; import org.apache.roller.ui.rendering.Renderer; @@ -131,7 +131,8 @@ try { // populate the rendering model if (request.getParameter("group") != null) { - model.put("group", planet.getGroup(request.getParameter("group"))); + PlanetData planetObject = planet.getPlanet("default"); + model.put("group", planet.getGroup(planetObject, request.getParameter("group"))); } model.put("planet", planet); model.put("date", new Date()); Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/cache/PlanetCache.java URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/cache/PlanetCache.java?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/cache/PlanetCache.java (original) +++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/cache/PlanetCache.java Sat Apr 7 11:01:47 2007 @@ -161,7 +161,8 @@ // still null, we need to get a fresh value if(lastModified == null) { - lastModified = PlanetFactory.getPlanet().getPlanetManager().getLastUpdated(); + // TODO: ROLLER40 last updated for planet + lastModified = null; // PlanetFactory.getPlanet().getPlanetManager().getLastUpdated(); if (lastModified == null) { lastModified = new Date(); Added: incubator/roller/trunk/testdata/WEB-INF/security.xml URL: http://svn.apache.org/viewvc/incubator/roller/trunk/testdata/WEB-INF/security.xml?view=auto&rev=526464 ============================================================================== --- incubator/roller/trunk/testdata/WEB-INF/security.xml (added) +++ incubator/roller/trunk/testdata/WEB-INF/security.xml Sat Apr 7 11:01:47 2007 @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" + "http://www.springframework.org/dtd/spring-beans.dtd"> + +<!-- +Minimal security.xml needed for running UI unit tests. +--> + +<beans> + + <!-- ======================== FILTER CHAIN ======================= --> + <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"> + <property name="filterInvocationDefinitionSource"> + <value> + CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON + PATTERN_TYPE_APACHE_ANT + /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,rememberMeProcessingFilter,channelProcessingFilter,remoteUserFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor + </value> + </property> + </bean> + + <!-- ======================== AUTHENTICATION ======================= --> + + <!-- Note the order that entries are placed against the objectDefinitionSource is critical. + The FilterSecurityInterceptor will work from the top of the list down to the FIRST pattern that matches the request URL. + Accordingly, you should place MOST SPECIFIC (ie a/b/c/d.*) expressions first, with LEAST SPECIFIC (ie a/.*) expressions last --> + <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"> + <property name="authenticationManager" ref="authenticationManager"/> + <property name="accessDecisionManager" ref="accessDecisionManager"/> + <property name="objectDefinitionSource"> + <value> + PATTERN_TYPE_APACHE_ANT + /roller-ui/login-redirect.jsp=admin,editor + /roller-ui/yourProfile**=admin,editor + /roller-ui/createWebsite**=admin,editor + /roller-ui/yourWebsites**=admin,editor + /roller-ui/authoring/**=admin,editor + /roller-ui/admin/**=admin + /rewrite-status*=admin + </value> + <!-- Add this to above list for LDAP/SSO configuration --> + <!-- /roller-ui/user.do*=register --> + </property> + </bean> + + <bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager"> + <property name="providers"> + <list> + <ref local="daoAuthenticationProvider"/> + <!-- Uncomment this for LDAP/SSO configuration <ref local="ldapAuthProvider"/> --> + <ref local="anonymousAuthenticationProvider"/> + <!-- rememberMeAuthenticationProvider added programmatically --> + </list> + </property> + </bean> + + <!-- Log failed authentication attempts to commons-logging --> + <bean id="loggerListener" class="org.acegisecurity.event.authentication.LoggerListener"/> + + <bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"> + <property name="userDetailsService" ref="mockAuthenticationDao" /> + <!-- <property name="userDetailsService" ref="jdbcAuthenticationDao"/> --> + <property name="userCache" ref="userCache"/> + </bean> + + <bean id="mockAuthenticationDao" class="org.apache.roller.ui.MockAcegiUserDetailsService" /> + <!-- Read users from database + <bean id="jdbcAuthenticationDao" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl"> + <property name="dataSource"> + <bean class="org.springframework.jndi.JndiObjectFactoryBean"> + <property name="jndiName" value="java:comp/env/jdbc/rollerdb"/> + </bean> + </property> + <property name="usersByUsernameQuery"> + <value>SELECT username,passphrase,isenabled FROM rolleruser WHERE username = ?</value> + </property> + <property name="authoritiesByUsernameQuery"> + <value>SELECT username,rolename FROM userrole WHERE username = ?</value> + </property> + </bean> --> + + <bean id="userCache" class="org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache"> + <property name="cache"> + <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean"> + <property name="cacheManager"> + <bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/> + </property> + <property name="cacheName" value="userCache"/> + </bean> + </property> + </bean> + + <bean id="anonymousAuthenticationProvider" class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider"> + <property name="key" value="anonymous"/> + </bean> + + <bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"> + <property name="rolePrefix" value=""/> + </bean> + + <bean id="accessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased"> + <property name="allowIfAllAbstainDecisions" value="false"/> + <property name="decisionVoters"> + <list> + <ref local="roleVoter"/> + </list> + </property> + </bean> + + <!-- ===================== HTTP REQUEST SECURITY ==================== + <bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/> + + <bean id="authenticationProcessingFilter" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"> + <property name="authenticationManager" ref="authenticationManager"/> + <property name="authenticationFailureUrl" value="/roller-ui/login.do?error=true"/> + <property name="defaultTargetUrl" value="/"/> + <property name="filterProcessesUrl" value="/roller_j_security_check"/> + <property name="rememberMeServices" ref="rememberMeServices"/> + </bean> + + <bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter"> + <property name="key" value="anonymous"/> + <property name="userAttribute" value="anonymous,ROLE_ANONYMOUS"/> + </bean> + + <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter"> + <property name="authenticationEntryPoint" ref="authenticationProcessingFilterEntryPoint"/> + </bean> + + <bean id="remoteUserFilter" class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/> + + <bean id="authenticationProcessingFilterEntryPoint" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint"> + <property name="loginFormUrl" value="/roller-ui/login.do"/> + <property name="forceHttps" value="false"/> + </bean> --> + + <!-- ===================== REMEMBER ME ==================== --> + <bean id="rememberMeProcessingFilter" class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter"> + <property name="authenticationManager" ref="authenticationManager"/> + <property name="rememberMeServices" ref="rememberMeServices"/> + </bean> + + <bean id="rememberMeServices" class="org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices"> + <property name="userDetailsService" ref="mockAuthenticationDao" /> + <!-- <property name="userDetailsService" ref="jdbcAuthenticationDao"/> --> + <property name="key" value="rollerlovesacegi"/> + <property name="parameter" value="rememberMe"/> + </bean> + + <bean id="rememberMeAuthenticationProvider" class="org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider"> + <property name="key" value="rollerlovesacegi"/> + </bean> + + <!-- ===================== SSL SWITCHING ==================== + <bean id="channelProcessingFilter" class="org.acegisecurity.securechannel.ChannelProcessingFilter"> + <property name="channelDecisionManager" ref="channelDecisionManager"/> + <property name="filterInvocationDefinitionSource"> + <value> + PATTERN_TYPE_APACHE_ANT + </value> + </property> + </bean> + + <bean id="channelDecisionManager" class="org.acegisecurity.securechannel.ChannelDecisionManagerImpl"> + <property name="channelProcessors"> + <list> + <bean class="org.acegisecurity.securechannel.SecureChannelProcessor"/> + <bean class="org.acegisecurity.securechannel.InsecureChannelProcessor"/> + </list> + </property> + </bean> --> + +</beans> Modified: incubator/roller/trunk/tools/roller-planet/roller-planet-business.jar URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tools/roller-planet/roller-planet-business.jar?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== Binary files - no diff available. Modified: incubator/roller/trunk/web/WEB-INF/classes/commons-logging.properties URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/classes/commons-logging.properties?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/commons-logging.properties (original) +++ incubator/roller/trunk/web/WEB-INF/classes/commons-logging.properties Sat Apr 7 11:01:47 2007 @@ -14,4 +14,4 @@ # copyright in this work, please see the NOTICE file in the top level # directory of this distribution. -org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory \ No newline at end of file +org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl \ No newline at end of file Added: incubator/roller/trunk/web/WEB-INF/classes/org/apache/xmlrpc/webserver/XmlRpcServlet.properties URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/classes/org/apache/xmlrpc/webserver/XmlRpcServlet.properties?view=auto&rev=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/org/apache/xmlrpc/webserver/XmlRpcServlet.properties (added) +++ incubator/roller/trunk/web/WEB-INF/classes/org/apache/xmlrpc/webserver/XmlRpcServlet.properties Sat Apr 7 11:01:47 2007 @@ -0,0 +1,3 @@ +# Sample ResourceBundle properties file +blogger=org.apache.roller.webservices.xmlrpc.BloggerAPIHandler +metaWeblog=org.apache.roller.webservices.xmlrpc.MetaWeblogAPIHandler Modified: incubator/roller/trunk/web/WEB-INF/classes/planet-hibernate.cfg.xml URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/classes/planet-hibernate.cfg.xml?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/planet-hibernate.cfg.xml (original) +++ incubator/roller/trunk/web/WEB-INF/classes/planet-hibernate.cfg.xml Sat Apr 7 11:01:47 2007 @@ -42,7 +42,8 @@ <!-- Map Planet pojo classes --> - <mapping resource="org/apache/roller/planet/pojos/PlanetConfigData.hbm.xml" /> + <mapping resource="org/apache/roller/planet/pojos/PlanetData.hbm.xml" /> + <mapping resource="org/apache/roller/planet/pojos/PropertyData.hbm.xml" /> <mapping resource="org/apache/roller/planet/pojos/PlanetGroupData.hbm.xml" /> <mapping resource="org/apache/roller/planet/pojos/PlanetEntryData.hbm.xml" /> <mapping resource="org/apache/roller/planet/pojos/PlanetSubscriptionData.hbm.xml" /> Modified: incubator/roller/trunk/web/WEB-INF/classes/planet.properties URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/classes/planet.properties?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/planet.properties (original) +++ incubator/roller/trunk/web/WEB-INF/classes/planet.properties Sat Apr 7 11:01:47 2007 @@ -40,7 +40,7 @@ # properties in this file are accessed like this ... # PlanetConfig.getProperty("propname"); -persistence.planet.classname=org.apache.roller.planet.business.hibernate.HibernateRollerPlanetImpl +persistence.planet.classname=org.apache.roller.planet.business.hibernate.HibernatePlanetImpl # Absolute URL to site site.absoluteurl=http://localhost:8080/planet Added: incubator/roller/trunk/web/WEB-INF/classes/planetRuntimeConfigDefs.xml URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/classes/planetRuntimeConfigDefs.xml?view=auto&rev=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/planetRuntimeConfigDefs.xml (added) +++ incubator/roller/trunk/web/WEB-INF/classes/planetRuntimeConfigDefs.xml Sat Apr 7 11:01:47 2007 @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--> + +<!-- + STOP!!!! This is NOT a Roller configuration file!! + Users of Roller should never need to edit this file. The properties listed + here are changed on the Roller Admin Settings page. + + This file defines what properties are made available to get/set + during the running of the Roller application. These properties + are stored in the database and the code *must* be able to make + use of changed values during runtime. + + Also included in this file is meta-data which defines what class + of property we are dealing with, it's default value, and information + on how to populate the display that allows for changing the value. + + NOTE: order does matter!! the display is populated in a linear fashion + starting from the first display-group and moving down. +--> + +<runtime-configs> + + <!-- + The global-properties represents the base set of roller runtime properties. + In *most* cases you should be putting your properties here and they can + then be changed from the admin configuration page at ... + /admin/rollerConfig.do + --> + <config-def name="global-properties"> + + <!-- Site Settings Group --> + <display-group name="siteSettings" key="ConfigForm.siteSettings" > + + <property-def name="site.name" key="ConfigForm.title"> + <type>string</type> + <default-value>Roller Planet</default-value> + </property-def> + <property-def name="site.description" key="ConfigForm.description"> + <type>string</type> + <default-value>A default install of the Roller Planet open source aggregation server</default-value> + </property-def> + <property-def name="site.adminname" key="ConfigForm.adminName"> + <type>string</type> + <default-value></default-value> + </property-def> + <property-def name="site.adminemail" key="ConfigForm.adminEmail"> + <type>string</type> + <default-value></default-value> + </property-def> + <property-def name="site.absoluteurl" key="ConfigForm.absoluteUrl"> + <type>string</type> + <default-value></default-value> + </property-def> + <property-def name="site.proxyhost" key="ConfigForm.proxyHost"> + <type>string</type> + <default-value></default-value> + </property-def> + <property-def name="site.proxyport" key="ConfigForm.proxyPort"> + <type>string</type> + <default-value>0</default-value> + </property-def> + + </display-group > + + </config-def> + +</runtime-configs> Modified: incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp (original) +++ incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp Sat Apr 7 11:01:47 2007 @@ -15,92 +15,94 @@ copyright in this work, please see the NOTICE file in the top level directory of this distribution. --> +<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %> <%@ include file="/WEB-INF/jsps/taglibs.jsp" %> -<script type="text/javascript"> -<!-- -function refreshEntries() -{ - document.planetConfigForm.method.value = "refreshEntries"; - document.planetConfigForm.submit(); -} -function syncWebsites() -{ - document.planetConfigForm.method.value = "syncWebsites"; - document.planetConfigForm.submit(); -} -// --> -</script> - -<html:form action="/roller-ui/admin/planetConfig" method="post"> - <html:hidden property="id" /> - <html:hidden property="cacheDir" /> - <html:hidden property="templateDir" /> - <html:hidden property="outputDir" /> - <html:hidden property="method" value="saveConfig" /> - - <p class="subtitle"><fmt:message key="planetConfig.subtitle" /></p> - <p><fmt:message key="planetConfig.prompt" /></p> - <table class="formtable"> +<% try { %> - <tr> - <td class="label"><label for="title" /><fmt:message key="planetConfig.title" /></label></td> - <td class="field"><html:text property="title" size="40" maxlength="255" /></td> - <td class="description"><fmt:message key="planetConfig.tip.title" /></td> - </tr> - - <tr> - <td class="label"><label for="description" /><fmt:message key="planetConfig.description" /></label></td> - <td class="field"><html:text property="description" size="40" maxlength="255" /></td> - <td class="description"><fmt:message key="planetConfig.tip.description" /></td> - </tr> - - <tr> - <td class="label"><label for="siteURL" /><fmt:message key="planetConfig.siteUrl" /></label></td> - <td class="field"><html:text property="siteURL" size="40" maxlength="255" /></td> - <td class="description"><fmt:message key="planetConfig.tip.siteUrl" /></td> - </tr> - - <tr> - <td class="label"><label for="adminEmail" /><fmt:message key="planetConfig.adminEmail" /></label></td> - <td class="field"><html:text property="adminEmail" size="40" maxlength="255" /></td> - <td class="description"><fmt:message key="planetConfig.tip.adminEmail" /></td> - </tr> - - <tr> - <td class="label"><label for="proxyHost" /><fmt:message key="planetConfig.proxyHost" /></label></td> - <td class="field"><html:text property="proxyHost" size="40" maxlength="255" /></td> - <td class="description"><fmt:message key="planetConfig.tip.proxyHost" /></td> - </tr> - - <tr> - <td class="label"><label for="proxyPort" /><fmt:message key="planetConfig.proxyPort" /></label></td> - <td class="field"><html:text property="proxyPort" size="6" maxlength="6" /></td> - <td class="description"><fmt:message key="planetConfig.tip.proxyPort" /></td> - </tr> +<%-- Start by parsing our config defs using the jstl xml toolkit --%> +<%-- Then we'll progress through the config defs and print out the form --%> +<x:parse var="configDefs"> + <%= org.apache.roller.planet.config.PlanetRuntimeConfig.getRuntimeConfigDefsAsString() %> +</x:parse> - </table> - <br /> - <div class="control"> - <input type="submit" value='<fmt:message key="planetConfig.button.post" />' /> - </div> - - <br /> - <h3><fmt:message key="planetConfig.title.control" /></h3> - <p><i><fmt:message key="planetConfig.prompt.control" /></i></p> - - <input type="button" name="refresh" - value='<fmt:message key="planetConfig.button.refreshEntries" />' - onclick="refreshEntries()" /> - - <input type="button" name="sync" - value='<fmt:message key="planetConfig.button.syncWebsites" />' - onclick="syncWebsites()" /> +<roller:StatusMessage/> -</html:form> +<p class="subtitle"><fmt:message key="planetConfig.subtitle" /></a> +<p><fmt:message key="configForm.prompt" /></a> +<form action="planetConfig.do" method="post"> +<input type="hidden" name="method" value="update"> + <table class="formtableNoDesc"> + + <x:forEach select="$configDefs//[EMAIL PROTECTED]'global-properties']/display-group"> + <c:set var="displayGroupKey"><x:out select="@key"/></c:set> + + <tr> + <td colspan="3"><h2><fmt:message key="${displayGroupKey}" /></h2></td> + </tr> + + <x:forEach select="property-def"> + <c:set var="propLabelKey"><x:out select="@key"/></c:set> + <c:set var="name"><x:out select="@name"/></c:set> + + <tr> + <td class="label"><fmt:message key="${propLabelKey}" /></td> + + <%-- choose the right html input element for the display --%> + <x:choose> + + <%-- "string" type means use a simple textbox --%> + <x:when select="type='string'"> + <td class="field"><input type="text" name='<c:out value="${name}"/>' value='<c:out value="${PlanetProps[name].value}"/>' size="35" /></td> + </x:when> + + <%-- "text" type means use a full textarea --%> + <x:when select="type='text'"> + <td class="field"> + <textarea name='<c:out value="${name}"/>' rows="<x:out select="rows"/>" cols="<x:out select="cols"/>"><c:out value="${PlanetProps[name].value}"/></textarea> + </td> + </x:when> + + <%-- "boolean" type means use a checkbox --%> + <x:when select="type='boolean'"> + <c:choose> + <c:when test="${PlanetProps[name].value eq 'true'}"> + <td class="field"><input type="checkbox" name='<c:out value="${name}"/>' CHECKED></td> + </c:when> + <c:otherwise> + <td class="field"><input type="checkbox" name='<c:out value="${name}"/>'></td> + </c:otherwise> + </c:choose> + </x:when> + + <%-- if it's something we don't understand then use textbox --%> + <x:otherwise> + <td class="field"><input type="text" name='<c:out value="${name}"/>' size="50" /></td> + </x:otherwise> + </x:choose> + + <td class="description"><%-- <fmt:message key="" /> --%></td> + </tr> + + </x:forEach> + + <tr> + <td colspan="2"> </td> + </tr> + + </x:forEach> + + </table> + + <div class="control"> + <input class="buttonBox" type="submit" value="<fmt:message key="configForm.save"/>"/> + </div> + +<form> +<% } catch (Exception e) { e.printStackTrace(); } %> Modified: incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetGroups.jsp URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetGroups.jsp?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetGroups.jsp (original) +++ incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetGroups.jsp Sat Apr 7 11:01:47 2007 @@ -30,118 +30,114 @@ } // --> </script> -<c:if test="${!(model.unconfigured)}" > - <p class="subtitle"><fmt:message key="planetGroups.subtitle" /></p> +<p class="subtitle"><fmt:message key="planetGroups.subtitle" /></p> - <p> - <c:if test="${empty planetSubscriptionForm.id}" > - <fmt:message key="planetGroups.prompt.add" /> - </c:if> - <c:if test="${!empty planetSubscriptionForm.id}" > - <fmt:message key="planetGroups.prompt.edit" /> - </c:if> - </p> - - <html:form action="/roller-ui/admin/planetGroups" method="post"> - <html:hidden property="method" value="saveGroup" /> - <html:hidden property="id" /> - - <div class="formrow"> - <label for="title" class="formrow" /> - <fmt:message key="planetGroups.title" /></label> - <html:text property="title" size="40" maxlength="255" /> - <img src="../images/help.png" alt="help" - title='<fmt:message key="planetGroups.tip.title" />' /> - </div> - - <div class="formrow"> - <label for="handle" class="formrow" /> - <fmt:message key="planetGroups.handle" /></label> - <html:text property="handle" size="40" maxlength="255" /> - <img src="../images/help.png" alt="help" - title='<fmt:message key="planetGroups.tip.handle" />' /> - </div> - - <p /> - <div class="formrow"> - <label class="formrow" /> </label> - <input type="submit" - value='<fmt:message key="planetGroups.button.save" />' /> - - <input type="button" - value='<fmt:message key="planetGroups.button.cancel" />' - onclick="cancelEditing()"/> - <c:if test="${!empty planetGroupForm.id}" > - - <input type="button" - value='<fmt:message key="planetGroups.button.delete" />' - onclick="deleteGroup()" /> - </c:if> - </div> - - </html:form> - - <br style="clear:left" /> - - <h2><fmt:message key="planetGroups.existingTitle" /></h2> - <p><i><fmt:message key="planetGroups.existingPrompt" /></i></p> - - <table class="rollertable"> - <tr class="rHeaderTr"> - <th class="rollertable" width="30%"> - <fmt:message key="planetGroups.column.title" /> - </th> - <th class="rollertable" width="50%"> - <fmt:message key="planetGroups.column.handle" /> - </th> - <th class="rollertable" width="10%"> - <fmt:message key="planetGroups.column.edit" /> - </th> - <th class="rollertable" width="10%"> - <fmt:message key="planetGroups.column.subscriptions" /> - </th> - </tr> - <c:forEach var="group" items="${model.groups}" > - <roller:row oddStyleClass="rollertable_odd" evenStyleClass="rollertable_even"> - - <td class="rollertable"> - <c:out value="${group.title}" /> - </td> - - <td class="rollertable"> - <c:out value="${group.handle}" /> - </td> - - <td class="rollertable"> - <roller:link page="/roller-ui/admin/planetGroups.do"> - <roller:linkparam - id="method" value="getGroups" /> - <roller:linkparam - id="groupHandle" name="group" property="handle" /> - <img src='<c:url value="/images/page_white_edit.png"/>' border="0" alt="icon" - title="<fmt:message key='planetGroups.edit.tip' />" /> - </roller:link> - </td> - - <td class="rollertable"> - <roller:link page="/roller-ui/admin/planetSubscriptions.do"> - <roller:linkparam - id="method" value="getSubscriptions" /> - <roller:linkparam - id="groupHandle" name="group" property="handle" /> - <img src='<c:url value="/images/page_white_edit.png"/>' border="0" alt="icon" - title="<fmt:message key='planetGroups.subscriptions.tip' />" /> - </roller:link> - </td> - - </roller:row> - </c:forEach> - </table> +<p> +<c:if test="${empty planetSubscriptionForm.id}" > + <fmt:message key="planetGroups.prompt.add" /> </c:if> -<c:if test="${model.unconfigured}" > - <fmt:message key="planetGroups.unconfigured" /> +<c:if test="${!empty planetSubscriptionForm.id}" > + <fmt:message key="planetGroups.prompt.edit" /> </c:if> +</p> + +<html:form action="/roller-ui/admin/planetGroups" method="post"> + <html:hidden property="method" value="saveGroup" /> + <html:hidden property="id" /> + + <div class="formrow"> + <label for="title" class="formrow" /> + <fmt:message key="planetGroups.title" /></label> + <html:text property="title" size="40" maxlength="255" /> + <img src="../images/help.png" alt="help" + title='<fmt:message key="planetGroups.tip.title" />' /> + </div> + + <div class="formrow"> + <label for="handle" class="formrow" /> + <fmt:message key="planetGroups.handle" /></label> + <html:text property="handle" size="40" maxlength="255" /> + <img src="../images/help.png" alt="help" + title='<fmt:message key="planetGroups.tip.handle" />' /> + </div> + + <p /> + <div class="formrow"> + <label class="formrow" /> </label> + <input type="submit" + value='<fmt:message key="planetGroups.button.save" />' /> + + <input type="button" + value='<fmt:message key="planetGroups.button.cancel" />' + onclick="cancelEditing()"/> + <c:if test="${!empty planetGroupForm.id}" > + + <input type="button" + value='<fmt:message key="planetGroups.button.delete" />' + onclick="deleteGroup()" /> + </c:if> + </div> + +</html:form> + +<br style="clear:left" /> + +<h2><fmt:message key="planetGroups.existingTitle" /></h2> +<p><i><fmt:message key="planetGroups.existingPrompt" /></i></p> + +<table class="rollertable"> + <tr class="rHeaderTr"> + <th class="rollertable" width="30%"> + <fmt:message key="planetGroups.column.title" /> + </th> + <th class="rollertable" width="50%"> + <fmt:message key="planetGroups.column.handle" /> + </th> + <th class="rollertable" width="10%"> + <fmt:message key="planetGroups.column.edit" /> + </th> + <th class="rollertable" width="10%"> + <fmt:message key="planetGroups.column.subscriptions" /> + </th> + </tr> + <c:forEach var="group" items="${model.groups}" > + <roller:row oddStyleClass="rollertable_odd" evenStyleClass="rollertable_even"> + + <td class="rollertable"> + <c:out value="${group.title}" /> + </td> + + <td class="rollertable"> + <c:out value="${group.handle}" /> + </td> + + <td class="rollertable"> + <roller:link page="/roller-ui/admin/planetGroups.do"> + <roller:linkparam + id="method" value="getGroups" /> + <roller:linkparam + id="groupHandle" name="group" property="handle" /> + <img src='<c:url value="/images/page_white_edit.png"/>' border="0" alt="icon" + title="<fmt:message key='planetGroups.edit.tip' />" /> + </roller:link> + </td> + + <td class="rollertable"> + <roller:link page="/roller-ui/admin/planetSubscriptions.do"> + <roller:linkparam + id="method" value="getSubscriptions" /> + <roller:linkparam + id="groupHandle" name="group" property="handle" /> + <img src='<c:url value="/images/page_white_edit.png"/>' border="0" alt="icon" + title="<fmt:message key='planetGroups.subscriptions.tip' />" /> + </roller:link> + </td> + + </roller:row> + </c:forEach> +</table> + Modified: incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetSubscriptions.jsp URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetSubscriptions.jsp?view=diff&rev=526464&r1=526463&r2=526464 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetSubscriptions.jsp (original) +++ incubator/roller/trunk/web/WEB-INF/jsps/admin/PlanetSubscriptions.jsp Sat Apr 7 11:01:47 2007 @@ -30,141 +30,133 @@ } // --> </script> -<c:if test="${!(model.unconfigured)}" > - <h1> - <fmt:message key="planetSubscriptions.title" /> +<h1> + <fmt:message key="planetSubscriptions.title" /> + <c:if test='${planetSubscriptionFormEx.groupHandle != "external"}' > + [group: <c:out value="${planetSubscriptionFormEx.groupHandle}" />] + </c:if> +</h1> + +<c:choose> + <c:when test='${empty planetSubscriptionFormEx.id && planetSubscriptionFormEx.groupHandle == "external"}' > + <p class="subtitle"><fmt:message key="planetSubscriptions.subtitle.addMain" /></p> + <p><fmt:message key="planetSubscriptions.prompt.addMain" /></p> + </c:when> + <c:when test='${empty planetSubscriptionFormEx.id && planetSubscriptionFormEx.groupHandle != "external"}' > + <p class="subtitle"> + <fmt:message key="planetSubscriptions.subtitle.add" > + <fmt:param value="${planetSubscriptionFormEx.groupHandle}" /> + </fmt:message> + </p> + <p><fmt:message key="planetSubscriptions.prompt.add" /></p> + </c:when> + <c:when test="${!empty planetSubscriptionFormEx.id}" > + <p class="subtitle"><fmt:message key="planetSubscriptions.subtitle.edit" /></p> + <p><fmt:message key="planetSubscriptions.prompt.edit" /></p> + </c:when> +</c:choose> + +<html:form action="/roller-ui/admin/planetSubscriptions" method="post"> + <html:hidden property="method" value="saveSubscription" /> + <html:hidden property="id" /> + <html:hidden property="groupHandle" /> + <html:hidden property="inboundlinks" /> + <html:hidden property="inboundblogs" /> + + <div class="formrow"> + <label for="title" class="formrow" /> + <fmt:message key="planetSubscription.title" /></label> + <html:text property="title" size="40" maxlength="255" /> + <img src="../images/help.png" alt="help" + title='<fmt:message key="planetSubscription.tip.title" />' /> + </div> + + <div class="formrow"> + <label for="feedURL" class="formrow" /> + <fmt:message key="planetSubscription.feedUrl" /></label> + <html:text property="feedURL" size="40" maxlength="255" /> + <img src="../images/help.png" alt="help" + title='<fmt:message key="planetSubscription.tip.feedUrl" />' /> + </div> + + <div class="formrow"> + <label for="siteURL" class="formrow" /> + <fmt:message key="planetSubscription.siteUrl" /></label> + <html:text property="siteURL" size="40" maxlength="255" /> + <img src="../images/help.png" alt="help" + title='<fmt:message key="planetSubscription.tip.siteUrl" />' /> + </div> + + <p /> + <div class="formrow"> + <label class="formrow" /> </label> + <input type="submit" + value='<fmt:message key="planetSubscriptions.button.save" />' /> + + <input type="button" + value='<fmt:message key="planetSubscriptions.button.cancel" />' + onclick="cancelEditing()"/> + <c:if test="${!empty planetSubscriptionFormEx.id}" > + + <input type="button" + value='<fmt:message key="planetSubscriptions.button.delete" />' + onclick="deleteSubscription()" /> + </c:if> + </div> + + <br style="clear:left" /> + + <h2> + <fmt:message key="planetSubscriptions.existingTitle" /> <c:if test='${planetSubscriptionFormEx.groupHandle != "external"}' > [group: <c:out value="${planetSubscriptionFormEx.groupHandle}" />] - </c:if> - </h1> - - <c:choose> - <c:when test='${empty planetSubscriptionFormEx.id && planetSubscriptionFormEx.groupHandle == "external"}' > - <p class="subtitle"><fmt:message key="planetSubscriptions.subtitle.addMain" /></p> - <p><fmt:message key="planetSubscriptions.prompt.addMain" /></p> - </c:when> - <c:when test='${empty planetSubscriptionFormEx.id && planetSubscriptionFormEx.groupHandle != "external"}' > - <p class="subtitle"> - <fmt:message key="planetSubscriptions.subtitle.add" > - <fmt:param value="${planetSubscriptionFormEx.groupHandle}" /> - </fmt:message> - </p> - <p><fmt:message key="planetSubscriptions.prompt.add" /></p> - </c:when> - <c:when test="${!empty planetSubscriptionFormEx.id}" > - <p class="subtitle"><fmt:message key="planetSubscriptions.subtitle.edit" /></p> - <p><fmt:message key="planetSubscriptions.prompt.edit" /></p> - </c:when> - </c:choose> - - <html:form action="/roller-ui/admin/planetSubscriptions" method="post"> - <html:hidden property="method" value="saveSubscription" /> - <html:hidden property="id" /> - <html:hidden property="groupHandle" /> - <html:hidden property="inboundlinks" /> - <html:hidden property="inboundblogs" /> - - <div class="formrow"> - <label for="title" class="formrow" /> - <fmt:message key="planetSubscription.title" /></label> - <html:text property="title" size="40" maxlength="255" /> - <img src="../images/help.png" alt="help" - title='<fmt:message key="planetSubscription.tip.title" />' /> - </div> - - <div class="formrow"> - <label for="feedURL" class="formrow" /> - <fmt:message key="planetSubscription.feedUrl" /></label> - <html:text property="feedURL" size="40" maxlength="255" /> - <img src="../images/help.png" alt="help" - title='<fmt:message key="planetSubscription.tip.feedUrl" />' /> - </div> - - <div class="formrow"> - <label for="siteURL" class="formrow" /> - <fmt:message key="planetSubscription.siteUrl" /></label> - <html:text property="siteURL" size="40" maxlength="255" /> - <img src="../images/help.png" alt="help" - title='<fmt:message key="planetSubscription.tip.siteUrl" />' /> - </div> - - <p /> - <div class="formrow"> - <label class="formrow" /> </label> - <input type="submit" - value='<fmt:message key="planetSubscriptions.button.save" />' /> - - <input type="button" - value='<fmt:message key="planetSubscriptions.button.cancel" />' - onclick="cancelEditing()"/> - <c:if test="${!empty planetSubscriptionFormEx.id}" > - - <input type="button" - value='<fmt:message key="planetSubscriptions.button.delete" />' - onclick="deleteSubscription()" /> - </c:if> - </div> - - <br style="clear:left" /> - - <h2> - <fmt:message key="planetSubscriptions.existingTitle" /> - <c:if test='${planetSubscriptionFormEx.groupHandle != "external"}' > - [group: <c:out value="${planetSubscriptionFormEx.groupHandle}" />] - </c:if> - </h2> - <p><i><fmt:message key="planetSubscriptions.existingPrompt" /></i></p> - - <table class="rollertable"> - <tr class="rHeaderTr"> - <th class="rollertable" width="30%"> - <fmt:message key="planetSubscriptions.column.title" /> - </th> - <th class="rollertable" width="60%"> - <fmt:message key="planetSubscriptions.column.feedUrl" /> - </th> - <th class="rollertable" width="10%"> - <fmt:message key="planetSubscriptions.column.edit" /> - </th> - </tr> - <c:forEach var="subscription" items="${model.subscriptions}" > - <roller:row oddStyleClass="rollertable_odd" evenStyleClass="rollertable_even"> - - <td class="rollertable"> - <c:out value="${subscription.title}" /> - </td> - - <td class="rollertable"> - <str:left count="100" > - <c:out value="${subscription.feedURL}" /> - </str:left> - </td> - - <td class="rollertable"> - <roller:link page="/roller-ui/admin/planetSubscriptions.do"> - <roller:linkparam - id="method" value="getSubscriptions" /> - <roller:linkparam - id="groupHandle" - name="planetSubscriptionFormEx" - property="groupHandle" /> - <roller:linkparam - id="feedUrl" name="subscription" property="feedURL" /> - <img src='<c:url value="/images/page_white_edit.png"/>' border="0" alt="icon" - title="<fmt:message key='planetSubscription.edit.tip' />" /> - </roller:link> - </td> - - </roller:row> - </c:forEach> - </table> - - </html:form> - - -</c:if> -<c:if test="${model.unconfigured}" > - <fmt:message key="planetSubscriptions.unconfigured" /> -</c:if> + </c:if> + </h2> + <p><i><fmt:message key="planetSubscriptions.existingPrompt" /></i></p> + + <table class="rollertable"> + <tr class="rHeaderTr"> + <th class="rollertable" width="30%"> + <fmt:message key="planetSubscriptions.column.title" /> + </th> + <th class="rollertable" width="60%"> + <fmt:message key="planetSubscriptions.column.feedUrl" /> + </th> + <th class="rollertable" width="10%"> + <fmt:message key="planetSubscriptions.column.edit" /> + </th> + </tr> + <c:forEach var="subscription" items="${model.subscriptions}" > + <roller:row oddStyleClass="rollertable_odd" evenStyleClass="rollertable_even"> + + <td class="rollertable"> + <c:out value="${subscription.title}" /> + </td> + + <td class="rollertable"> + <str:left count="100" > + <c:out value="${subscription.feedURL}" /> + </str:left> + </td> + + <td class="rollertable"> + <roller:link page="/roller-ui/admin/planetSubscriptions.do"> + <roller:linkparam + id="method" value="getSubscriptions" /> + <roller:linkparam + id="groupHandle" + name="planetSubscriptionFormEx" + property="groupHandle" /> + <roller:linkparam + id="feedUrl" name="subscription" property="feedURL" /> + <img src='<c:url value="/images/page_white_edit.png"/>' border="0" alt="icon" + title="<fmt:message key='planetSubscription.edit.tip' />" /> + </roller:link> + </td> + + </roller:row> + </c:forEach> + </table> +</html:form>
