You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2006/10/27 16:51:05 UTC
svn commit: r468397 - in /incubator/roller/trunk/sandbox/planetroller: ./
src/org/apache/roller/planet/ui/forms/ web/WEB-INF/ web/WEB-INF/classes/
web/planet-ui/ web/planet-ui/admin/
Author: snoopdave
Date: Fri Oct 27 07:51:03 2006
New Revision: 468397
URL: http://svn.apache.org/viewvc?view=rev&rev=468397
Log:
OPML import
Added:
incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/UploadOpmlForm.java
incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/uploadOpmlForm.jsp
Modified:
incubator/roller/trunk/sandbox/planetroller/build.xml
incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/SubscriptionForm.java
incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/classes/ApplicationResources.properties
incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/faces-config.xml
incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/web.xml
incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/configForm.jsp
incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/groupForm.jsp
incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/subscriptionForm.jsp
incubator/roller/trunk/sandbox/planetroller/web/planet-ui/planet.css
Modified: incubator/roller/trunk/sandbox/planetroller/build.xml
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/build.xml?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/build.xml (original)
+++ incubator/roller/trunk/sandbox/planetroller/build.xml Fri Oct 27 07:51:03 2006
@@ -74,6 +74,7 @@
<include name="commons-logging-1.0.4.jar"/>
<include name="commons-lang-2.1.jar"/>
<include name="myfaces-api-1.1.4.jar"/>
+ <include name="tomahawk-1.1.3.jar"/>
</fileset>
</path>
Modified: incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/SubscriptionForm.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/SubscriptionForm.java?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/SubscriptionForm.java (original)
+++ incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/SubscriptionForm.java Fri Oct 27 07:51:03 2006
@@ -40,7 +40,7 @@
public class SubscriptionForm implements LoadableForm {
private ResourceBundle bundle =
ResourceBundle.getBundle("ApplicationResources");
- private static Log log = LogFactory.getLog(GroupsListForm.class);
+ private static Log log = LogFactory.getLog(SubscriptionForm.class);
private PlanetSubscriptionData subscription = new PlanetSubscriptionData();
private String groupid = null;
private String subid = null;
@@ -56,8 +56,7 @@
subscription = pmgr.getSubscriptionById(subid);
} else {
subscription = new PlanetSubscriptionData();
- }
- groupid = request.getParameter("groupid");
+ }
return "editSubscription";
}
Added: incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/UploadOpmlForm.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/UploadOpmlForm.java?view=auto&rev=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/UploadOpmlForm.java (added)
+++ incubator/roller/trunk/sandbox/planetroller/src/org/apache/roller/planet/ui/forms/UploadOpmlForm.java Fri Oct 27 07:51:03 2006
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ */
+package org.apache.roller.planet.ui.forms;
+
+import java.io.InputStreamReader;
+import java.util.Iterator;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.custom.fileupload.UploadedFile;
+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.PlanetGroupData;
+import org.apache.roller.planet.pojos.PlanetSubscriptionData;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.input.SAXBuilder;
+
+public class UploadOpmlForm {
+ private static Log log = LogFactory.getLog(UploadOpmlForm.class);
+ private String groupid;
+ private UploadedFile uploadedFile;
+
+ public String load(HttpServletRequest request) throws Exception {
+ setGroupid(request.getParameter("groupid"));
+ return "uploadOpml";
+ }
+
+ public String presentUploadForm() throws Exception {
+ FacesContext fctx = FacesContext.getCurrentInstance();
+ return load((HttpServletRequest)fctx.getExternalContext().getRequest());
+ }
+
+ public UploadedFile getUploadedFile() {
+ return uploadedFile;
+ }
+
+ public void setUploadedFile(UploadedFile uploadedFile) {
+ this.uploadedFile = uploadedFile;
+ }
+
+ public String processUpload() throws Exception {
+ PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
+ PlanetGroupData group = pmgr.getGroupById(getGroupid());
+ SAXBuilder builder = new SAXBuilder();
+ Document doc = builder.build(new InputStreamReader(uploadedFile.getInputStream()));
+ Element body = doc.getRootElement().getChild("body");
+ Iterator iter = body.getChildren().iterator();
+ while (iter.hasNext()) {
+ Element elem = (Element)iter.next();
+ importOpmlElement(group, elem);
+ }
+ PlanetFactory.getPlanet().flush();
+ return "uploadOpml";
+ }
+
+ private void importOpmlElement(PlanetGroupData group, Element elem) throws Exception {
+
+ String text = elem.getAttributeValue("text");
+ String title = elem.getAttributeValue("title");
+ title = null!=title ? title : text;
+
+ String url = elem.getAttributeValue("url");
+ String xmlUrl = elem.getAttributeValue("xmlUrl");
+ xmlUrl = null!=xmlUrl ? xmlUrl : url;
+
+ String htmlUrl = elem.getAttributeValue("htmlUrl");
+ url = null!=htmlUrl ? htmlUrl : url;
+
+ if (elem.getChildren().size()==0) {
+ // Leaf element, store a subscription
+ if (null != title && null != xmlUrl) {
+ PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
+
+ // If subscription already exists in Planet, just use it
+ PlanetSubscriptionData sub = pmgr.getSubscription(xmlUrl);
+
+ // Otherwise create a new one
+ if (sub == null) {
+ sub = new PlanetSubscriptionData();
+ sub.setTitle(title);
+ sub.setFeedURL(xmlUrl);
+ sub.setSiteURL(url);
+ pmgr.saveSubscription(sub);
+ }
+ try {
+ // Save sub and add it to group
+ sub.getGroups().add(group);
+ group.getSubscriptions().add(sub);
+ pmgr.saveSubscription(sub);
+ pmgr.saveGroup(group);
+
+ } catch (RollerException e) {
+ log.debug("ERROR: importing subscription with feedURL: " + xmlUrl);
+ }
+ }
+ } else {
+ // Import folder's children
+ Iterator iter = elem.getChildren("outline").iterator();
+ while ( iter.hasNext() ) {
+ Element subelem = (Element)iter.next();
+ importOpmlElement(group, subelem);
+ }
+ }
+ }
+
+ public String getGroupid() {
+ return groupid;
+ }
+
+ public void setGroupid(String groupid) {
+ this.groupid = groupid;
+ }
+}
Modified: incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/classes/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/classes/ApplicationResources.properties?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/classes/ApplicationResources.properties (original)
+++ incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/classes/ApplicationResources.properties Fri Oct 27 07:51:03 2006
@@ -1,7 +1,7 @@
# application wide
-appTitle=Planet Roller admin console
+appTitle=Roller-Planet admin console
appHome=Home
appConfig=Config
appGroups=Groups
@@ -18,10 +18,10 @@
# configForm.jsp
-configPageTitle=Planet Roller admin console
+configPageTitle=Roller-Planet admin console
configFormTitle=Configuration
configHelp=You can set the title, description and administrator \
-information to be used in all pages and feeds generated by Planet Roller. \
+information to be used in all pages and feeds generated by Roller-Planet. \
You can also set the default group, the aggregation group that will \
be featured on the front page of the site.
configTitle=Planet title
@@ -45,7 +45,7 @@
groupReturnToList=Return to groups list
groupHelp=You can set the title, handle, descrption and list of feeds for \
each group. What's a group? A group is a collection of RSS or Atom feed \
-subscriptions that will be aggregated together to form a Planet. Planet Roller \
+subscriptions that will be aggregated together to form a Planet. Roller-Planet \
will generate a set of HTML, OPML and RSS files for each group you define.
groupHandle=Handle
groupTitle=Title
@@ -59,13 +59,14 @@
groupSubscriptionName=Handle
groupSubscriptionFeedURL=Feed URL
groupSubscriptionSiteURL=Site URL
+groupUploadOpml=Import OPML subscriptions
# groupsList.jsp
-groupsPageTitle=Planet Roller groups
+groupsPageTitle=Roller-Planet groups
groupsListTitle=Groups
-groupsHelp=You can define multiple groups within your Planet Roller server, \
-each made up of one or more RSS or Atom feed subscriptions. Planet Roller will \
+groupsHelp=You can define multiple groups within your Roller-Planet server, \
+each made up of one or more RSS or Atom feed subscriptions. Roller-Planet will \
generate a set of HTML, OPML and RSS files for each group you define. Below \
are the groups you've currently got defined.
groupsNewGroupName=Group name
@@ -80,7 +81,7 @@
# login.jsp
-loginPageTitle=Login to Planet Roller admin console
+loginPageTitle=Login to Roller-Planet admin console
loginUsername=Username
loginPassword=Password
loginButton=Login
@@ -88,10 +89,10 @@
# main.jsp
-mainTitle=Welcome to Planet Roller
-mainPlanetLink=Main page of Planet Roller site
+mainTitle=Welcome to Roller-Planet
+mainPlanetLink=Main page of Roller-Planet site
mainRegistrationLink=Blog registration page
-mainConsoleLink=Planet Roller Admin Console
+mainConsoleLink=Roller-Planet Admin Console
# registrationForm.jsp
@@ -121,10 +122,17 @@
subscriptionPageTitle=Edit subscription
subscriptionHelp=A subscription is an RSS or Atom feed that can be included \
-in one or more Planet Roller groups.
+in one or more Roller-Planet groups.
subscriptionTitle=Title
subscriptionName=Handle
subscriptionFeedURL=Feed URL
subscriptionSiteURL=Site URL
subscriptionReturnToGroup=Return to group
+
+# uploadOpmlForm.jsp
+
+uploadOpmlPageTitle=Import OPML
+uploadOpmlHelp=Import OPML subscriptions to group
+uploadOpmlReturnToGroup=Return to group
+uploadOpmlButton=Upload
Modified: incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/faces-config.xml?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/faces-config.xml (original)
+++ incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/faces-config.xml Fri Oct 27 07:51:03 2006
@@ -7,6 +7,11 @@
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
+ <managed-bean-name>error</managed-bean-name>
+ <managed-bean-class>org.apache.roller.planet.ui.utils.ErrorBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>groupsList</managed-bean-name>
<managed-bean-class>org.apache.roller.planet.ui.forms.GroupsListForm</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
@@ -27,9 +32,9 @@
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
- <managed-bean-name>error</managed-bean-name>
- <managed-bean-class>org.apache.roller.planet.ui.utils.ErrorBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
+ <managed-bean-name>uploadOpmlForm</managed-bean-name>
+ <managed-bean-class>org.apache.roller.planet.ui.forms.UploadOpmlForm</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/*</from-view-id>
@@ -57,6 +62,13 @@
<navigation-case>
<from-outcome>editSubscription</from-outcome>
<to-view-id>/planet-ui/admin/subscriptionForm.faces</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/*</from-view-id>
+ <navigation-case>
+ <from-outcome>uploadOpml</from-outcome>
+ <to-view-id>/planet-ui/admin/uploadOpmlForm.faces</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
Modified: incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/web.xml?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/web.xml (original)
+++ incubator/roller/trunk/sandbox/planetroller/web/WEB-INF/web.xml Fri Oct 27 07:51:03 2006
@@ -21,6 +21,15 @@
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
+ <init-param>
+ <!-- Uploaded OPML files should be fairly small -->
+ <param-name>uploadMaxFileSize</param-name>
+ <param-value>500k</param-value>
+ </init-param>
+ <init-param>
+ <param-name>uploadThresholdSize</param-name>
+ <param-value>100k</param-value>
+ </init-param>
</filter-mapping>
<filter-mapping>
Modified: incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/configForm.jsp
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/configForm.jsp?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/configForm.jsp (original)
+++ incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/configForm.jsp Fri Oct 27 07:51:03 2006
@@ -41,7 +41,7 @@
<h:outputText value="#{msgs.configTitle}" />
<h:panelGroup>
- <h:inputText id="title" value="#{configForm.planetConfig.title}" required="true" size="20">
+ <h:inputText id="title" value="#{configForm.planetConfig.title}" required="true" size="60">
<f:validateLength minimum="1" />
</h:inputText>
<h:message for="title" styleClass="fieldError" />
@@ -65,7 +65,7 @@
<h:outputText value="#{msgs.configAdminName}" />
<h:panelGroup>
- <h:inputText id="adminName" value="#{configForm.planetConfig.adminName}" required="true" size="20">
+ <h:inputText id="adminName" value="#{configForm.planetConfig.adminName}" required="true" size="60">
<f:validateLength minimum="3" />
</h:inputText>
<h:message for="adminName" styleClass="fieldError" />
@@ -73,7 +73,7 @@
<h:outputText value="#{msgs.configAdminEmail}" />
<h:panelGroup>
- <h:inputText id="adminEmail" value="#{configForm.planetConfig.adminEmail}" required="false" size="20">
+ <h:inputText id="adminEmail" value="#{configForm.planetConfig.adminEmail}" required="false" size="60">
<t:validateEmail />
</h:inputText>
<h:message for="adminEmail" styleClass="fieldError" />
Modified: incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/groupForm.jsp
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/groupForm.jsp?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/groupForm.jsp (original)
+++ incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/groupForm.jsp Fri Oct 27 07:51:03 2006
@@ -46,7 +46,7 @@
<h:outputText value="#{msgs.groupTitle}" />
<h:panelGroup>
- <h:inputText id="title" value="#{groupForm.group.title}" required="true" size="20">
+ <h:inputText id="title" value="#{groupForm.group.title}" required="true" size="60">
<f:validateLength minimum="1" />
</h:inputText>
<h:message for="title" styleClass="fieldError" />
@@ -54,7 +54,7 @@
<h:outputText value="#{msgs.groupHandle}" />
<h:panelGroup>
- <h:inputText id="handle" value="#{groupForm.group.handle}" required="true" size="20">
+ <h:inputText id="handle" value="#{groupForm.group.handle}" required="true" size="60">
<f:validateLength minimum="1" />
</h:inputText>
<h:message for="handle" styleClass="fieldError" />
@@ -114,7 +114,7 @@
<f:facet name="header">
<h:outputText value="#{msgs.appAction}" />
</f:facet>
- <h:outputLink value="javascript:removeSubscription('#{sub.id}','#{sub.title}')">
+ <h:outputLink value='javascript:removeSubscription("#{sub.id}","#{sub.title}")'>
<h:graphicImage value="../images/delete.png" />
<h:outputText value="#{msgs.appRemove}" />
</h:outputLink>
@@ -126,6 +126,13 @@
<t:commandLink id="addSubscriptionLink" forceId="true" action="#{subscriptionForm.add}" >
<h:graphicImage style="" value="../images/feed_add.png" />
<h:outputText value="#{msgs.groupAddSubscription}" />
+ <f:param name="groupid" value="#{groupForm.group.id}" />
+</t:commandLink>
+
+<p />
+<t:commandLink id="uploadOpmlLink" forceId="true" action="#{uploadOpmlForm.presentUploadForm}" >
+ <h:graphicImage style="" value="../images/feed_add.png" />
+ <h:outputText value="#{msgs.groupUploadOpml}" />
<f:param name="groupid" value="#{groupForm.group.id}" />
</t:commandLink>
Modified: incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/subscriptionForm.jsp
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/subscriptionForm.jsp?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/subscriptionForm.jsp (original)
+++ incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/subscriptionForm.jsp Fri Oct 27 07:51:03 2006
@@ -51,7 +51,7 @@
<h:outputText value="#{msgs.subscriptionTitle}" />
<h:panelGroup>
- <h:inputText id="title" value="#{subscriptionForm.subscription.title}" required="true" size="20">
+ <h:inputText id="title" value="#{subscriptionForm.subscription.title}" required="true" size="60">
<f:validateLength minimum="1" />
</h:inputText>
<h:message for="title" styleClass="fieldError" />
@@ -59,7 +59,7 @@
<h:outputText value="#{msgs.subscriptionFeedURL}" />
<h:panelGroup>
- <h:inputText id="feedURL" required="true" size="50"
+ <h:inputText id="feedURL" required="true" size="60"
value="#{subscriptionForm.subscription.feedURL}"
validator="#{subscriptionForm.checkURL}" />
<h:message for="feedURL" styleClass="fieldError" />
@@ -67,7 +67,7 @@
<h:outputText value="#{msgs.subscriptionSiteURL}" />
<h:panelGroup>
- <h:inputText id="siteURL" required="false" size="50"
+ <h:inputText id="siteURL" required="false" size="60"
value="#{subscriptionForm.subscription.siteURL}"
validator="#{subscriptionForm.checkURL}"/>
<h:message for="siteURL" styleClass="fieldError" />
Added: incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/uploadOpmlForm.jsp
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/uploadOpmlForm.jsp?view=auto&rev=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/uploadOpmlForm.jsp (added)
+++ incubator/roller/trunk/sandbox/planetroller/web/planet-ui/admin/uploadOpmlForm.jsp Fri Oct 27 07:51:03 2006
@@ -0,0 +1,65 @@
+<%--
+ 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 HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
+<html>
+<f:view>
+<f:loadBundle basename="ApplicationResources" var="msgs" />
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title><h:outputText value="#{msgs.uploadOpmlPageTitle}" /></title>
+ <link rel="stylesheet" type="text/css" href='<c:url value="/planet-ui/planet.css" />' />
+</head>
+<body>
+<div id="wrapper">
+<%@include file="/planet-ui/admin/menu.jsp" %>
+
+<h:form id="uploadOpmlForm" enctype="multipart/form-data" >
+
+<h2><h:outputText value="#{msgs.uploadOpmlPageTitle}" /></h2>
+<p><h:outputText value="#{msgs.uploadOpmlHelp}" /></p>
+
+<c:if test="${uploadOpmlForm.groupid != null}">
+<p><h:outputLink value="./groupForm.faces?groupid=#{uploadOpmlForm.groupid}">
+ <h:outputText value="#{msgs.uploadOpmlReturnToGroup}" />
+</h:outputLink></p>
+</c:if>
+
+<h:inputHidden value="#{uploadOpmlForm.groupid}" />
+
+<t:inputFileUpload id="uploadFileId"
+ value="#{uploadOpmlForm.uploadedFile}" storage="file" required="true"/>
+
+<p />
+<h:commandButton value="#{msgs.uploadOpmlButton}" action="#{uploadOpmlForm.processUpload}" />
+</h:form>
+
+</div>
+</body>
+</f:view>
+</html>
+
+
+
+
+
+
Modified: incubator/roller/trunk/sandbox/planetroller/web/planet-ui/planet.css
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/sandbox/planetroller/web/planet-ui/planet.css?view=diff&rev=468397&r1=468396&r2=468397
==============================================================================
--- incubator/roller/trunk/sandbox/planetroller/web/planet-ui/planet.css (original)
+++ incubator/roller/trunk/sandbox/planetroller/web/planet-ui/planet.css Fri Oct 27 07:51:03 2006
@@ -6,12 +6,11 @@
padding: 15px 20px 15px 20px;
}
-/* TODO: fix hardcoded context reference */
body {
color: #666;
- background-image: url(/planet/planet-ui/images/body-bg-grey.png);
+ background-image: url(images/body-bg-grey.png);
background-repeat: no-repeat;
- background-position: center;
+ background-position: top;
text-align: center;
margin: 0px;
padding: 0px;
@@ -66,8 +65,7 @@
tr.evenRow {
background: #f5f5f5;
}
-/* TODO: fix hardcoded context reference */
table.data th {
- background-image: url(/planet/planet-ui/images/th-bg-grey.png);
+ background-image: url(images/th-bg-grey.png);
}